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

[FEAT] A parent tree item should be expanded if there is an active/selected tree item within it #2931

Open
xelaint opened this issue Jul 23, 2024 · 9 comments · May be fixed by #2938
Open
Assignees
Labels
feat a new feature, enhancement, or improvement package: design @daffodil/design
Milestone

Comments

@xelaint
Copy link
Member

xelaint commented Jul 23, 2024

💡 Feature request

Feature Name

A parent tree item should be expanded if there is an active/selected tree item within it

The Desired Behavior

Your Use Case

Prior Work

Environment


Daffodil version: X.Y.Z
Angular version: X.Y.Z 

 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

@xelaint xelaint added feat a new feature, enhancement, or improvement package: design @daffodil/design labels Jul 23, 2024
@xelaint xelaint added this to the Daffodil v1.0 milestone Jul 23, 2024
@damienwebdev
Copy link
Member

@xelaint is this permanently open? Or only open upon initial render?

@xelaint
Copy link
Member Author

xelaint commented Jul 23, 2024

@xelaint is this permanently open? Or only open upon initial render?

I think it should be permanent. If a user is on next.daff.io/docs/packages/cart/extension, and I refresh the page, the @daffodil/cart tree item should remain expanded so the user knows what page they're on and are able to find the related pages easily. Currently, if I navigate to Extension and refresh the page, the @daffodil/cart tree item is closed.

Screen Shot 2024-07-23 at 8 35 50 AM

@damienwebdev
Copy link
Member

Ok. If I'm on that page and I click:

image

What should happen?

Should the click do nothing?

@griest024
Copy link
Member

I disagree. I think the feature should only cover what happens on initial render. I also think that it should scroll the active item into view.

@xelaint
Copy link
Member Author

xelaint commented Jul 23, 2024

So if you're on the "Extension" page and decide to refresh to page, you wouldn't want to see that the Extension page is still the selected item in the sidebar?

@xelaint
Copy link
Member Author

xelaint commented Jul 23, 2024

What I expect in a sidebar navigation where items are hidden:

  1. User can collapse or expand a tree item, but the state resets upon refresh.
  2. The selected tree item should be visible at all times.

Based on this UI, how does a user easily know where they are in the nav sidebar?

Screen Shot 2024-07-23 at 8 50 56 AM

If a tree item isn't nested (i.e. I click on @daffodil/authorizenet), it's apparent to me that that's the active link. Why shouldn't that be the case for nested tree items?

@griest024
Copy link
Member

griest024 commented Jul 23, 2024

So if you're on the "Extension" page and decide to refresh to page, you wouldn't want to see that the Extension page is still the selected item in the sidebar?

refreshing the page is an "initial render"

the way I interpret "remain expanded" is that the accordion cannot be closed, even by user interaction.

@xelaint xelaint changed the title [FEAT] A parent tree item should remain expanded if there is an active/selected tree item within it [FEAT] A parent tree item should be expanded if there is an active/selected tree item within it Jul 23, 2024
@griest024
Copy link
Member

my proposed UX:

  • upon initial render (page load) the accordion that holds the active nested item (if the active one is nested) is expanded
  • upon initial render the active nav item is scrolled into view

@xelaint
Copy link
Member Author

xelaint commented Jul 23, 2024

Gotcha. I interpreted "initial render" as literally the first initial render and nothing after that. I think we're on the same page then.

@griest024 griest024 linked a pull request Jul 23, 2024 that will close this issue
3 tasks
@griest024 griest024 assigned damienwebdev and unassigned griest024 Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat a new feature, enhancement, or improvement package: design @daffodil/design
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants