fix: version tags toggling every supported version and freezing the page - #6967
Open
LarpinWBD wants to merge 1 commit into
Open
fix: version tags toggling every supported version and freezing the page#6967LarpinWBD wants to merge 1 commit into
LarpinWBD wants to merge 1 commit into
Conversation
Fixes modrinth#6601. Clicking any game version tag on the versions tab passed the release's entire game_versions array to toggleFilters, so clicking 26.x (or even a single version tag) selected every version the release supports. On projects supporting many versions this also froze the page for seconds: toggleFilters awaited a needlessly-async toggleFilter per version, which let Vue flush a full re-render between every iteration (~90 flushes on the reported project). - formatVersionsForDisplay's grouping now also returns the member versions per displayed range (getVersionGroupsForDisplay), so version tags toggle exactly the versions they represent - toggleFilters applies the whole batch synchronously in one update, and selects the missing versions unless all are already selected (instead of blindly inverting each one) Co-Authored-By: Claude <noreply@anthropic.com>
Member
Pull request changelogAppAddedChangedDeprecatedRemovedFixedSecurityWebsiteAddedChangedDeprecatedRemovedFixedSecurityHostingAddedChangedDeprecatedRemovedFixedSecurity |
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.
Fixes #6601
Clicking any game version tag on the versions tab passed the whole game_versions array of the release to toggleFilters, so clicking 26.x (or even a single version tag) selected every version the release supports. On projects supporting a lot of versions this also froze the page for a few seconds, since toggleFilters awaited a needlessly async toggleFilter per version, which let Vue do a full re-render between every iteration (~90 renders on the project from the issue).
Changes:
Tested the grouping refactor against the old implementation on a bunch of version list shapes (full ranges, partial ranges, snapshots, legacy versions) and the labels come out identical.