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

Version selection on package page #112

Conversation

boatbomber
Copy link
Contributor

Turns the Version metadata into a dropdown, and allows users to inspect and install older versions.

image

Additionally, the URL will now include ?version=X.X.X, allowing users to share links that are guaranteed to always be a specific version. This may be useful for project documentation where a specific version of a package is necessary. Sharing a link with no version param will make it default to the latest version.
The URL will remain up to date acc. to the user's selection, and supports back/forward navigation shortcuts. The addition of the latest version to a default link does not add a navigation waypoint, since there was no user action and should be silent.

@boatbomber
Copy link
Contributor Author

Oh, there's a problem. For some reason, using the search doesn't work correctly anymore. It takes you to a default link, but for some reason it isn't defaulting to latest. Refreshing the page does though, so it must be something about the way search navigates?

@boatbomber boatbomber marked this pull request as draft March 6, 2023 02:20
@boatbomber
Copy link
Contributor Author

boatbomber commented Mar 6, 2023

Oh, it gets more interesting than that. Search works from the home page, but not when searching from a package page.

@boatbomber
Copy link
Contributor Author

boatbomber commented Mar 6, 2023

Whoops, I had made it default when the state version was blank instead of the URL version. This meant it worked on a fresh page (ie: reload) but not page to page, like search.

@boatbomber boatbomber marked this pull request as ready for review March 6, 2023 02:33
@boatbomber
Copy link
Contributor Author

With this, the dependency links can now go to the correct version and not just the latest!

Copy link
Member

@magnalite magnalite left a comment

Choose a reason for hiding this comment

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

This looks good! Thanks :D

@magnalite magnalite merged commit 79f6692 into UpliftGames:main Mar 8, 2023
@boatbomber boatbomber deleted the feature/version-selection-on-package-page branch March 10, 2023 15:56
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.

2 participants