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

ENH: Introduce a dataset back button #368

Merged
merged 2 commits into from
Sep 30, 2023
Merged

ENH: Introduce a dataset back button #368

merged 2 commits into from
Sep 30, 2023

Conversation

jsheunis
Copy link
Member

This PR:

The additions introduce changes to html (to show and hide the back button), to css (for the back button styling together with home button and dataset title), and to JS. The latter handles logic for when to show and hide the back button. Upon create() the superdataset file is fetched in order to store the id and version on the component, and the back button is hidden. Upon internal navigation (using beforeRouteUpdate()), the JS checks if the route that is navigated to is the same as the home page by comparing the new id and version to the stored super id and version. If they are different, show the back button; if they are the same, hide the back button.

This introduces changes to html (to show and hide the back button),
to css (for the back button styling together with home button and dataset title),
and to JS. The latter handles logic for when to show and hide the back button.
Upon 'create()' the superdataset file is fetched in order to store the id and version
on the component, and the back button is hidden. Upon internal navigation, the JS
checks if the route that is navigated to is the same as the home page by comparing
the new id and version to the stored super id and version. If they are different,
show the back button; if they are the same, hide the back button.
@codecov-commenter
Copy link

codecov-commenter commented Sep 30, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (f91d4c2) 86.19% compared to head (4c87105) 86.19%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #368   +/-   ##
=======================================
  Coverage   86.19%   86.19%           
=======================================
  Files          43       43           
  Lines        2709     2709           
=======================================
  Hits         2335     2335           
  Misses        374      374           
Flag Coverage Δ
unittests 79.07% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jsheunis jsheunis merged commit a75c06b into main Sep 30, 2023
9 checks passed
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.

Allow more explicit back-navigation
2 participants