-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Convert filters and search text into query params #5248
base: master
Are you sure you want to change the base?
Convert filters and search text into query params #5248
Conversation
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.
Nice work.
One thing that I noticed during testing is that if you "navigate away", the query is removed:
=> could you change the links to the parts of the UI that deal with editing,cloning, adding monitors, .. which keep you on the same page visually?
About the error handling:
I think this currently looks a bit weird as noted in your last comment.
Could you add a bit of error handing around this?
Imo just ignoring errors and logging them to the console log is likely fine for this, but having a toast prop up might be better..
Co-authored-by: Frank Elsinga <[email protected]>
…b.com/Suven-p/uptime-kuma into feat-3672-use_query_params_for_filter
Done. But I really don't like how this is implemented. Let me know if you have any suggestions. |
This reverts commit 2e18a19.
This comment was marked as outdated.
This comment was marked as outdated.
@CommanderStorm I have addressed all requested changes. |
@CommanderStorm Would you add hacktoberfest-accepted label to this PR? |
Using router hooks, it can be easilly managed! Here is a link to a Stackoverflow answer about this: https://stackoverflow.com/a/47195471/7826809. Also a link to Vue doc (the Stackoverflow answer seems to be for Vue2, ig it would also works for Vue 3, but anyway): https://router.vuejs.org/guide/advanced/navigation-guards.html. Don't hesitate if you need help! |
That is the current approach. I meant I couldn't figure out without using global router hook. Had it worked, using in-component guards would be clearer since all updates would be handled by same component. With current approach, there are two places that update the same filter query params. |
I'm facing an issue: I can't select more than one filter. Here is vieo recordings: 386790589-78bad66a-4ecc-437c-91f0-7067084c109c.mp4This PR (not working) (I'm clicking on the different items I hover), started using 386790609-85f93335-6090-4591-93b9-41ed3715b60a.mp4 |
The latest commit should have fixed that. |
Confirmed, it's working as the prod version! |
Found another issue. Modifying filter parameters from add monitor page with partially formed fields causes the form to be reset. |
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
Fixes #3672
Type of change
Please delete any options that are not relevant.
Checklist
Screenshots (if any)