-
Notifications
You must be signed in to change notification settings - Fork 225
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(frontend): Automatically open download modal when filter queries are present (on the main mod page) #3133
feat(frontend): Automatically open download modal when filter queries are present (on the main mod page) #3133
Conversation
This is marked as draft as I think this may need discussion/feedback from the Modrinth team and possibly changes to the queries used |
LGTM @Prospector |
I was a bit unsure on how the query could be done to provide the data the modal I'll set it as ready for review now |
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 think this is good, but I feel like some part of the URL should be clearer that it's opening the download modal? Maybe require a #download URL fragment which, on its own, opens the download modal but then can be filtered with the query params?
The other option I had considered was passing a JSON, like I also wanted to mention I did make it so you can't open the modal without preselected values on purpose, as I don't see a reason to open automatically the modal without a preset version or loader. This is my opinion, but if the Modrinth team and/or community think that an option to just open the modal should be part of this feature I will do it. |
true, but someone could have all the information on their own website or something so the Modrinth page might be redundant. I think the main thing would be it should just say download somewhere in the URL to indicate it's for opening the download UI |
You have a point, I have update the code. I made the query filters independent of the modal now as it allows them to be used for more than just the download modal in the future, and allows for presetting the values without opening the modal, allowing someone to read the mod page. |
nice, yeah that's a good idea! One more idea I had was maybe it should fill the URL automatically as you use the page? Like if you open the download modal it adds the hash and if you start selecting version/loader it gets added to the parameters? If you wanna do that it'd be cool but otherwise I think it's fine to merge as-is |
oh, I should have posted a comment that I was working on it >.< |
not the end of the world, can always make it another PR |
Adds an option to open the download modal with a preselected version and loader.
This is a QoL, while
https://modrinth.com/[type]/[id]/version/latest?version=<game_version>&loader=<loader>
exists, the download modal has a much more intuitive and friendlier UI, showing the latest release, beta and alpha separate and offering a link to the Modrinth AppThe link format is similar to the existing alternative
https://modrinth.com/[type]/[id]?version=<game_version>&loader=<loader>
version
is the game versionloader
is the platformBoth are optional, with at least one being required to open the modal on page load
If version or loader are not a valid option for the project the modal will not open