Skip to content

feat(InfiniteStoryBase): a new property disableSetUrl, when set to true will not execute setUrl#102

Merged
chchitti merged 4 commits intomasterfrom
make-maybeseturl-toggable
Aug 26, 2019
Merged

feat(InfiniteStoryBase): a new property disableSetUrl, when set to true will not execute setUrl#102
chchitti merged 4 commits intomasterfrom
make-maybeseturl-toggable

Conversation

@chchitti
Copy link
Contributor

@chchitti chchitti commented Aug 26, 2019

The context is for some publishers, in the story pages after the story we are showing a set of story snapshots created using stories fetched from InfiniteStoryPage component. The InfiniteStoryPage Component will set the url to the next story when the next story comes into focus. When the snapshot loads, the url is changed to the next story url by the InfiniteStoryPage component and we want to make this tog gable.

Example:
<InfiniteStoryBase
render={this.getStoryTemplate()}
loadItems={this.storyPageLoadItems}
onInitialItemFocus={item => this.onInitialItemFocusHandler(item)}
onItemFocus={() =>{}}
doNotChangeUrl={true} />
This will disable updating of url and title of the page when the next story loads

@chchitti chchitti requested review from Jeevan-Kishore and gja August 26, 2019 08:30
@chchitti chchitti changed the title a new property disableSetUrl, when set to true will not execute setUrl InfiniteStoryBase: a new property disableSetUrl, when set to true will not execute setUrl Aug 26, 2019
@Jeevan-Kishore
Copy link
Contributor

What is this for? What does it do?

@gja gja changed the title InfiniteStoryBase: a new property disableSetUrl, when set to true will not execute setUrl feat(InfiniteStoryBase): a new property disableSetUrl, when set to true will not execute setUrl Aug 26, 2019
Copy link
Contributor

@gja gja left a comment

Choose a reason for hiding this comment

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

Please add documentation and an example.

@gja
Copy link
Contributor

gja commented Aug 26, 2019

@chchitti please update the README.md explaining how to use your new options

@chchitti chchitti force-pushed the make-maybeseturl-toggable branch from 2d45d8f to d0d62d7 Compare August 26, 2019 10:52
@chchitti chchitti merged commit b1fb402 into master Aug 26, 2019
@delete-merged-branch delete-merged-branch bot deleted the make-maybeseturl-toggable branch August 26, 2019 10:52
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