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: persistent search queries #4624

Merged
merged 4 commits into from
Sep 6, 2023
Merged

feat: persistent search queries #4624

merged 4 commits into from
Sep 6, 2023

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Sep 6, 2023

About the changes

We remember last search/filter.

Screenshot 2023-09-06 at 13 54 33

Details:

  • if your search has unique id you store your saved query in local storage
  • if your search doesn't have unique id, then it stores the saved query in memory state
  • saved queries are clickable and can populate the input
  • only non-empty queries are persisted

Important files

Discussion points

@vercel
Copy link

vercel bot commented Sep 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2023 1:11pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Sep 6, 2023 1:11pm

@@ -307,6 +307,7 @@ export const ChangeRequestsTabs = ({
onChange={setSearchValue}
hasFilters
getSearchContext={getSearchContext}
id="changeRequestList"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with unique id we can store each saved query in a local storage

>
{firstFilterOption(filter)}
</StyledCode>
<ConditionallyRender
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't show environment:undefined for empty tables

@kwasniew kwasniew merged commit a0fbad2 into main Sep 6, 2023
11 of 14 checks passed
@kwasniew kwasniew deleted the persistent-search-queries branch September 6, 2023 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants