-
Notifications
You must be signed in to change notification settings - Fork 14
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
Refine Feature Flags and Segments List Sorting #1992
Conversation
@ppratikcr7 Just for your info, I realized that I can confirm that the values are correctly stored to and read from the local storage (you can search I think setting the default
But this is also how it's implemented in the Anyway, I'm not sure how to make the Feature Flags root table keep the previous sorting state even after a refresh, just like other pages. I think it's OK to merge this for now unless anyone has specific ideas or suggestions to fix this minor issue. |
@VivekFitkariwala @ppratikcr7 @Yagnik56 Please feel free to approve this PR. |
@zackcl Yeah, it looks good. I also tried to check but you are correct, the code is similar for segments and experiment, couldn't find why on refresh its always ASC order. Maybe we can create a separate ticket for that and tackle that later. |
@@ -66,7 +93,8 @@ export class LocalStorageService { | |||
}; | |||
|
|||
const state = { | |||
experiments: experimentState, // experiment state, | |||
experiments: experimentState, | |||
featureFlagState: featureFlagState, |
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.
@zackcl Change this to featureFlags
for local storage to work correctly
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.
That worked, thank you! I created a PR that fixes this: #2005
This PR fixes the incorrect sorting of the Segments list after refreshing the page. It also updates the Feature Flags sorting to work just like the Segments and Experiments list tables, ensuring that the previous sorting state remains after a page refresh by storing the sorting states in local storage.
The Feature Flags sorting works fine in general, except that it always defaults to sorting by "Name" in ascending order upon page refresh, even though I can confirm that the previous value is stored in local storage. I would appreciate any ideas on how to fix this. We can also merge this one for now and address that issue later, as it's still an improvement over the current.