-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Set search conditions to query parameters #303
Set search conditions to query parameters #303
Conversation
This is awesome @yktakaha4, thank you! There are a few bugs I have identified which I hope you can maybe fix in your PR:
You are are able to take a look at those issues for then then great (I suspect the last point I made will be "too hard" so just leave that), but if the rest are too complicated for you (I think you've done a great job so far) then let me know and I'll do some work on it (I'm really busy at the moment, so I'm not sure when I will get to this). Just let me know please so we don't end up both doing the same thing? |
e8f9327
to
807c058
Compare
@axllent Thank you for your kind review and sorry for not checking enough. I fixed it in the following commit. When accessing Initialize start in the tag URL. Initialize URL when I also fixed the last issue, but I am not confident. demo.mp4 |
It's working now pretty nicely for me, well done and thank you @yktakaha4! I will merge this into a new feature branch on Mailpit, and I will make a few minor changes (for instance I do not think one needs to convert the start & limit to a string every time). Thank you very much for all your hard work ❤️ |
* Set search conditions to query parameters * Fixed by review * Update query parameters when new message notified
@yktakaha4 I have made a number of small changes to the feature/query-parameters branch which I would really appreciate your feedback (and testing) on - if possible:
The only issue I have found so far (which I don't think can be resolved without a lot of complicated work) is the back browser button doesn't trigger a reload of messages (eg: you click next page, next page, next page, and then click the back browser button). This did not work before your changes either, so it's not new, but it is the only "issue" I can find now. Apart from that, I think this implementation is working very well. |
I tested it locally and worked fine, thanks.
As far as I know, we can suppress history generation by using |
Thanks for the suggestion, but I don't think it actually resolves anything or prevents any confusion (in this case). The back browser button still loads a URL which does not change the message listing. Don't worry, it's not an issue unless someone makes it an issue, so I think I'll do a bit more testing and get this branch merged into Great work, and thank you for your contribution! |
@yktakaha4 I managed to solve the browser back/forward navigation, shifting around some of the logic plus a few other changes 🥳 I haven't found any other issues in my testing. Thanks again for your hard work, I really appreciate it! This functionality has now been released in v1.18.5. |
This great OSS always helps me.
I use this every day, and I thought it would be more convenient if it was reflected in the query parameters when changing paging or limits.
This makes it easier to share search results with others.
I tested it in my local environment, but I don't know all the features so I may be missing something.
I'm not a front-end expert, so please let me know if you have any concerns.
only paging:
/?start=0&limit=100
with search condition:
/search?q=python+99&start=25&limit=25
tag search:
/search?q=tag%3A10&start=50&limit=50