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

fix(front): Fix buttons in DatasetHeader #120

Merged
merged 2 commits into from
Feb 8, 2024
Merged

Conversation

cpvannier
Copy link
Member

Issue

Fixes #119

Description

  • Add missing tooltips for back button and dataset navigation buttons
  • Make back button go to the parent page (home page if on dataset page, dataset page if on item page), instead of behaving like the Pixano logo button

- Go back to home page if on dataset page
- Go back to dataset page if on item page
- Pixano logo already goes back to home page regardless of current page
@cpvannier cpvannier added enhancement New feature or request scope: front Related to Pixano frontend labels Feb 8, 2024
@cpvannier cpvannier added this to the Pixano 0.5.0 milestone Feb 8, 2024
@cpvannier cpvannier self-assigned this Feb 8, 2024
@@ -105,22 +105,25 @@
<button on:click={() => navigateTo("/")} class="h-10 w-10">
<img src={pixanoLogo} alt="Logo Pixano" class="w-8 h-8 mx-2" />
</button>
<IconButton on:click={() => navigateTo("/")}>
<IconButton
on:click={() => navigateTo(currentItemId ? `/${datasetName}/dataset` : "/")}
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we could just implement a "go back" feature for this button ? https://stackoverflow.com/a/71585077/22966091
I'm also wondering if this button is really useful since there are always a way to go back to dataset (with the dedicated button) or home (with the logo).

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess an actual "Go back" button is not really necessary since we can use the browser's own "Go back" and "Go forward" buttons now.

I made this change because the button is included in the Sketch template, but otherwise I would have considered deleting it, since like you said there is the logo and the dedicated button. Then again having that button is maybe more intuitive for users. This probably deserves a discussion with Janro.

@cpvannier cpvannier merged commit f4cf099 into develop Feb 8, 2024
5 checks passed
cpvannier added a commit that referenced this pull request Feb 15, 2024
* fix(front): Add tooltips for navigation buttons

* fix(front): Use back button to go to parent page

- Go back to home page if on dataset page
- Go back to dataset page if on item page
- Pixano logo already goes back to home page regardless of current page
@cpvannier cpvannier deleted the fix/header_buttons branch February 20, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scope: front Related to Pixano frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix buttons in DatasetHeader
3 participants