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: persist memo filters with url query #4239

Merged

Conversation

chriscurrycc
Copy link
Contributor

  • Implemented synchronization of memo filters with URL search parameters.
  • Enhanced memo store to manage current request state for fetching memos, allowing for request cancellation, avoiding the race conditions.

This is very helpful in this situation: Applying filters on the list page, viewing a single memo detail page, and then returning will keep the applied filters intact.

We can also share or save the URL with filters to quickly access our filtered memos.

- Implemented synchronization of memo filters with URL search parameters.
- Enhanced memo store to manage current request state for fetching memos, allowing for request cancellation, avoiding the race conditions.
@RoccoSmit
Copy link
Contributor

For some context:

This use to be a feature in v0.22.0 and was then removed when the filter UX changed.

Some code samples from v0.22.0: MemoFilter.tsx, filter.ts, useFilterWithUrlParams

This issue has been requested since the change, e.g. https://github.com/orgs/usememos/discussions/3999, https://github.com/orgs/usememos/discussions/3809 but has not got much traction.

Might need some feedback from @boojack or @johnnyjoygh on if this feature is part of their future vision of Memos

@chriscurrycc
Copy link
Contributor Author

Thank you for providing the context. However, I would like to know why this feature was removed since v0.22.0. I believe it is a core feature.

@chriscurrycc
Copy link
Contributor Author

By the way, I used to be a Flomo user, but recently migrated all my notes to Memos. Thank you for building such a great open-source software.

I plan to contribute to Memos in the future. I have also written an article on how I developed Memos. I will submit PRs for bug fixes, optimizations, etc. If it's something more personalized, I will modify it in my own repository. Thank you again for your hard work, and I hope to contribute to helping you as well.

Copy link
Collaborator

@johnnyjoygh johnnyjoygh left a comment

Choose a reason for hiding this comment

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

LGTM

web/src/components/MemoFilters.tsx Outdated Show resolved Hide resolved
web/src/layouts/RootLayout.tsx Outdated Show resolved Hide resolved
@johnnyjoygh johnnyjoygh merged commit e3b378b into usememos:main Jan 2, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants