Open
Conversation
Introduce a new diff utility (web/src/lib/diff-utils.ts) and accompanying test (web/src/lib/diff-utils.test.ts), add a test npm script to package.json to run the test, and update source viewer and learning pages to consume the new utility. Also update generated docs and versions data to reflect the changes.
Expose version comparison targets and UI so users can select a previous version to diff against. Introduces VersionCompareTarget type and updates page/client props (currentVersionId, defaultCompareVersionId, compareTargets). The page now builds compareTargets from generated versions and passes them to the client. SourceViewer was refactored to add a compare dropdown, improved diff/source toggle, and uses the selected target's source for computeDiffRows (with selection reset when currentVersionId changes). Also adds i18n keys (compare_with, select_compare_target) for en/ja/zh and various UI/animation refinements.
Remove the empty/placeholder clear button from the compare dropdown and stop force-switching back to source when a base becomes unavailable. Clicking the Diff button now attempts to auto-select a fallback compare target (defaultCompareVersionId or the first compare target) before entering diff mode, and an empty-state message is shown when no base is selected. Also replace a motion.label with motion.div and simplify diff button classes to support the new flow and animations.
|
@Toubat is attempting to deploy a commit to the crazyboym's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
Add a diff mode to the version page code viewer so readers can compare the current session against another version
What changed
VersionCompareTargetand passed compare metadata through the version page clientSourceViewerwith:View Source/View Difftogglediff-utils.tsand tests