Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prototype implementation of narratives for mobile #857

Merged
merged 36 commits into from
Jan 31, 2020

Conversation

jameshadfield
Copy link
Member

Current status: very early prototype.

Needs extensive testing and addition of features. Not tested with sidebar (theme) customisations.

@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 29, 2020 03:35 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 29, 2020 20:34 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 29, 2020 21:26 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 29, 2020 21:43 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 29, 2020 21:46 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 29, 2020 21:51 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 29, 2020 21:52 Inactive
return (
<>
<MobileContentContainer height={contentHeight}>
{this.pageNarrativeContent()}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

block 0 is the title page & shouldn't display viz / main-markdown (see sketch file for more notes if needed). It'll probably need special styling too to correctly display the header / authors etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still relevant? I don't know that I fully understand what you're saying here. Sorry I missed it earlier.

@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 29, 2020 22:12 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 29, 2020 22:17 Inactive
</MobileBannerBottom>
)

PreviousButton = (props) => (
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cool - I didn't know fat-arrow functions would bind this when used inside classes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me neither!

@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 29, 2020 22:37 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 30, 2020 01:16 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 30, 2020 01:25 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 30, 2020 01:27 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 30, 2020 01:28 Inactive
@@ -89,9 +89,7 @@ class MobileNarrativeDisplay extends React.Component {
}
const block = this.props.blocks[this.props.currentInFocusBlockIdx];
return (
<div
id={`MobileNarrativeBlock_${this.props.currentInFocusBlockIdx}`}
Copy link
Member Author

@jameshadfield jameshadfield Jan 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used for scrolling to a particular block via the URL query parameter. While this doesn't always work (bugs separate to this work) I'd like to preserve these id's here please. Actually this isn't needed for mobile since we can just jump to the page. Disregard.

@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 30, 2020 01:59 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 30, 2020 02:02 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 30, 2020 02:15 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 30, 2020 02:30 Inactive
When using the previous and next buttons to navigate between pages on
mobile narratives view, jump to the top of the progress bar rather than
the top of the narrative content.
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 30, 2020 22:38 Inactive
ivan-aksamentov and others added 2 commits January 30, 2020 23:51
This fixes navigation progress buttons to not align properly in flexbox container when browsing using Internet Explorer (any version).

This is a browser bug, so called "flexbug-15" as described in:
https://github.com/philipwalton/flexbugs#flexbug-15
I applied the workaround as described there.

Originally reported by @emmahodcroft at: #655
When the user reaches the end of the narrative page, allow them to exit
the page by clicking on the progress bar or clicking on the previous
button.
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 31, 2020 02:33 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 31, 2020 03:01 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 31, 2020 03:36 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 31, 2020 03:39 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 31, 2020 03:44 Inactive
Don't allow paragraphs on mobile narratives to go to the right edge of
the screen.
Standardize font size across paragraphs on mobile narratives.
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 31, 2020 03:46 Inactive
…g-15

fix(styles): navigation progress buttons to not align properly on IE
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 31, 2020 03:56 Inactive
We can use array indexes as keys because the arrays are not modified.
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-mobil-gafj5i January 31, 2020 06:09 Inactive
@jameshadfield jameshadfield marked this pull request as ready for review January 31, 2020 06:10
@jameshadfield jameshadfield merged commit 7f0cbc1 into master Jan 31, 2020
@jameshadfield
Copy link
Member Author

Thanks for this work @kairstenfay. I'm merging & releasing this now as it's a huge improvement over previous versions. Will make issues for the remaining bugs / work to do.

@jameshadfield jameshadfield deleted the narrative-mobile branch January 31, 2020 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants