-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
BrowseDashboards: Add RadioButtonGroup
to be able to chose between 'Browse' or 'List' view
#77561
Conversation
… is no route params
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.
couple of q's, otherwise looks good 👍
@@ -10,7 +10,6 @@ export function BrowseFilters() { | |||
return ( | |||
<div> | |||
<ActionRow | |||
hideLayout |
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 know i've asked this before and i can't quite remember the response... are we expecting to be able to remove this when nestedFolders
GAs or not? 🤔 if so, we could do something like hideLayout={config.featureToggles.isEnabled('nestedFolders')}
. if not, disregard this! 😅
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 we are not going to remove it but I might be wrong. @joshhunt can you tell us the answer? We will remember it as it will be written down 😅
// Set list layout since folders layout implies sort to be undefined | ||
stm.onLayoutChange(SearchLayout.List); | ||
|
||
// Verify that they have been set | ||
expect(stm.state.query).toBe('hello'); | ||
expect(stm.state.sort).toBe('alpha-asc'); | ||
expect(stm.state.sort).toBeUndefined(); |
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.
can you explain these changes a bit more? i don't understand. the comment implies that folder layout will make sort undefined
, but then you set to list layout and sort is still undefined
. i think if you set list layout before calling initStateFromUrl()
this test can remain the same as it was? 🤔
RadioButtonGroup
to be able to chose between 'Browse' or 'List' view
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.
test looks good now 👍
What is this feature?
This PR restores the "List view" button.
Why do we need this feature?
To let the user select the most appropriate view for their needs.
Who is this feature for?
Everybody
Which issue(s) does this PR fix?:
Fixes #77121
Special notes for your reviewer:
Please check that: