datalad / datalad-catalog

Create a user-friendly data catalog from structured metadata
https://datalad-catalog.netlify.app
MIT License
14 stars 12 forks source link

ENH: Introduce a dataset back button #368

Closed jsheunis closed 9 months ago

jsheunis commented 9 months ago

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.

codecov-commenter commented 9 months ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #368 +/- ## ======================================= Coverage 86.19% 86.19% ======================================= Files 43 43 Lines 2709 2709 ======================================= Hits 2335 2335 Misses 374 374 ``` | [Flag](https://app.codecov.io/gh/datalad/datalad-catalog/pull/368/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/datalad/datalad-catalog/pull/368/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad) | `79.07% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.