-
Notifications
You must be signed in to change notification settings - Fork 225
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
frontend: global searchbar: Fix multiple clusterSettings items #2907
frontend: global searchbar: Fix multiple clusterSettings items #2907
Conversation
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.
Pretty sure the cluster settings items are ordered alphabetically by context name, maybe keep the option related to the open context rather than just the first in the list? That probably makes the most sense here
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.
I think there's a little confusion about why this is happening.
The duplicated items are not duplicated per cluster.
The reason there are two search items called "Cluster Settings" is because we have two routes with the label "Cluster Settings". Check out router.tsx:781
There's one "Cluster Settings" with path /settings
And there's another "Cluster Settings" with path /settings/cluster
The first one is an old one and just redirects to the second one.
We should only show the second "Cluster Settings" (settingsClusterHomeContext
) route in the search results.
I'd suggest filtering it out by the key settingsCluster
, the same way it's done in router.tsx:977
2ad3b93
to
2e1cd19
Compare
2e1cd19
to
865e320
Compare
Thanks for the reviews,
Yup verified by creating 3 clusters, it was only showing 2
Regarding the old path, yes I've filtered that as suggested, and now it is showing only 1 cluster setting item referencing key |
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.
My apologies for the confusion, LGTM
865e320
to
0099b31
Compare
Signed-off-by: Faakhir30 <[email protected]>
0099b31
to
426801a
Compare
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.
looks good, thanks!
Thanks @Faakhir30 ! |
Fixes #2902
Fixed by only displaying the
cluster settings
page once.