-
Notifications
You must be signed in to change notification settings - Fork 162
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
Conversation
ef696a4
to
a27d0ff
Compare
fcf0346
to
408c5d0
Compare
408c5d0
to
b5623af
Compare
b5623af
to
2db00b7
Compare
2db00b7
to
58903f6
Compare
return ( | ||
<> | ||
<MobileContentContainer height={contentHeight}> | ||
{this.pageNarrativeContent()} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
01cc998
to
35f9975
Compare
</MobileBannerBottom> | ||
) | ||
|
||
PreviousButton = (props) => ( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me neither!
bb9e03d
to
19e9387
Compare
19e9387
to
06b557e
Compare
06b557e
to
06e2297
Compare
@@ -89,9 +89,7 @@ class MobileNarrativeDisplay extends React.Component { | |||
} | |||
const block = this.props.blocks[this.props.currentInFocusBlockIdx]; | |||
return ( | |||
<div | |||
id={`MobileNarrativeBlock_${this.props.currentInFocusBlockIdx}`} |
There was a problem hiding this comment.
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.
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.
d0b5333
to
c288c23
Compare
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.
fc079a6
to
9760833
Compare
Don't allow paragraphs on mobile narratives to go to the right edge of the screen.
Standardize font size across paragraphs on mobile narratives.
9760833
to
b2b0015
Compare
…g-15 fix(styles): navigation progress buttons to not align properly on IE
We can use array indexes as keys because the arrays are not modified.
Previous logic of an early return caused the `scrollToTop` to not fire when we were going to a main-markdown-page
53ce834
to
e0cbff4
Compare
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. |
Current status: very early prototype.
Needs extensive testing and addition of features. Not tested with sidebar (theme) customisations.