-
Notifications
You must be signed in to change notification settings - Fork 74
feat: Display saved searches in modal #3079
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
base: main
Are you sure you want to change the base?
feat: Display saved searches in modal #3079
Conversation
2c30c8f to
16d4f97
Compare
| with %Logflare.SavedSearch{} = saved_search <- SavedSearches.get(saved_search_id), | ||
| true <- Sources.get_by_user_access(user, saved_search.source_id) |> is_struct(), | ||
| {:ok, _response} <- SavedSearches.delete_by_user(saved_search) do | ||
| _ = SavedSearches.Cache.bust_by(source_id: saved_search.source_id) |
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 found busting the cache directly was required. The ContextCache buster wasn't clearing the cached list in time for the UI to fetch it.
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.
Would be better to do the busting in the context instead.
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.
Would be better to do the busting in the context instead.
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 realised it would be simpler to just fetch the saved searches from the database directly. It's an async request for the user anyway, and we optimistically remove the deleted search from the UI so there's no UI delay.
dce198c to
7c022ae
Compare
|
@msmithstubbs instead of a consolidated modal on the dashboard, I think a separate modal icon button on the left of the icon button for each source will be much better, so that users can open up the same search modal and go to a saved search quickly. |
| </li> | ||
| <li> | ||
| <.modal_link component={LogflareWeb.SearchLive.SavedSearchesModalComponent} modal_id={:saved_searches_link} title="Saved Searches"> | ||
| <i class="fas fa-bookmark"></i><span class="hide-on-mobile"> saved searches </span> |
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.
Should use bookmark icon for the save button as well then, so that there is some connection between to the two functions.
Maybe "saved" is enough?
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.
edcb8a7 to
6584412
Compare
6584412 to
587298d
Compare


CleanShot.2026-01-15.at.11.57.27.mp4
ANL-1178