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

Narrative: explore data & leave narrative #881

Merged
merged 2 commits into from
Feb 1, 2020

Conversation

joverlee521
Copy link
Contributor

This PR resolves #871

  1. Hide "Explore the data yourself" button when on main display markdown page
  2. Clicking on "Leave the narrative..." button completely exits the narrative and changes to the dataset page.

When the narrative page is the MainDisplayMarkdown, we don't have
any data, so hide the "Explore the data yourself" button.
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-explo-hzpqu6 February 1, 2020 00:28 Inactive
Copy link
Member

@jameshadfield jameshadfield left a comment

Choose a reason for hiding this comment

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

@joverlee521 -- thanks for this. Works great for non-mobile, but needs to be added to the mobile view (i.e. your fix in narratives/index.js needs to also be here: https://github.com/nextstrain/auspice/blob/master/src/components/narrative/MobileNarrativeDisplay.js#L64.

Clicking on "Leave the narrative & explore the data yourself" completely
leaves the narrative and goes to the dataset page.
@jameshadfield jameshadfield temporarily deployed to auspice-narrative-explo-hzpqu6 February 1, 2020 00:39 Inactive
@jameshadfield
Copy link
Member

Works well, thanks @joverlee521.

If we ever want to revisit this, since the data is already loaded we should be able to show the dataset view & modify state via the JSON-set defaults without needing to reload the entire page. But this would only be a minor improvement & would require more complex code.

@jameshadfield jameshadfield merged commit ee4014b into master Feb 1, 2020
@jameshadfield jameshadfield deleted the narrative-explore-data-button branch February 1, 2020 00:47
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.

Clicking "Leave the narrative & explore the data yourself" leads to an incomplete page
2 participants