Add version selector to web demo#283
Merged
zaneduffield merged 2 commits intoNov 11, 2025
Merged
Conversation
Contributor
Author
|
I have a live version running over on my own GitHub pages site: https://zaneduffield.github.io/pasfmt/ |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
c0c3c34 to
4cb5f25
Compare
jgardn3r
requested changes
Nov 11, 2025
This involves switching to dynamic loading of the WASM module, and also involves changing how the GitHub pages is built and deployed. The idea is that the latest version of the web demo site should be backwards compatible with all the previous versions of the WASM module, and the `gh-pages` branch will simply keep all the old WASM module builds, while new ones are added and the web demo site is updated. The default module version loaded is whatever is first in the versions.json file that exists at the root of the `gh-pages` branch, which the workflow makes sure to sort according to `sort -Vr` (version sort in descending order). This means that the latest tagged version should be first, and all the branches will be after all the tags. - https://www.gnu.org/software/coreutils/manual/html_node/Version-sort-overview.html In order to make switching between and comparing versions more streamlined, I also implemented a function to migrate the settings as you change the selected version. This comments and uncomments lines that correspond to settings that were removed or added when moving between versions. The selected version is also a query parameter now, so old examples shared via URL should remain stable as new versions are released.
4cb5f25 to
823fbad
Compare
jgardn3r
approved these changes
Nov 11, 2025
Collaborator
jgardn3r
left a comment
There was a problem hiding this comment.
Looks good to me! A cool change with a cool feature for the web demo.
353bcaa
into
integrated-application-development:master
7 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This involves switching to dynamic loading of the WASM module, and also
involves changing how the GitHub pages is built and deployed.
The idea is that the latest version of the web demo site should be
backwards compatible with all the previous versions of the WASM module,
and the
gh-pagesbranch will simply keep all the old WASM modulebuilds, while new ones are added and the web demo site is updated.
The default module version loaded is whatever is first in the
versions.json file that exists at the root of the
gh-pagesbranch,which the workflow makes sure to sort according to
sort -Vr(versionsort in descending order). This means that the latest tagged version
should be first, and all the branches will be after all the tags.
In order to make switching between and comparing versions more
streamlined, I also implemented a function to migrate the settings as
you change the selected version. This comments and uncomments lines that
correspond to settings that were removed or added when moving between
versions.
The selected version is also a query parameter now, so old examples
shared via URL should remain stable as new versions are released.