-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Scopes: Nested scope navigations #113394
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
base: main
Are you sure you want to change the base?
Scopes: Nested scope navigations #113394
Conversation
| // Expand the group that matches the current path, if it is not already expanded | ||
| private onLocationChange = (pathname: string) => { | ||
| private onLocationChange = async (pathname: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to verify this functionality and how it handles expanion
| url: string; | ||
| // Used for testid and keys | ||
| id: string; | ||
| hasSubScope?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be needed on the status.
| const isCurrent = isCurrentPath(locPathname, to); | ||
|
|
||
| // Use exchange-alt icon for subScope items | ||
| const iconName = hasSubScope ? 'exchange-alt' : linkIcon; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subScope items should be rendered as folders, so no need for this here.
| const isEmpty = | ||
| Object.keys(currentFolder.folders).length === 0 && Object.keys(currentFolder.suggestedNavigations).length === 0; | ||
|
|
||
| if (isEmpty) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do an early return instead
What is this feature?
Why do we need this feature?
To easier move between context
Who is this feature for?
Scopes users
Which issue(s) does this PR fix?:
Closes https://github.com/grafana/hyperion-planning/issues/446
Special notes for your reviewer:
Please check that: