feat(scm): 'Open File' in graph opens current file, add 'Open File at Commit'#307882
Open
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
Open
feat(scm): 'Open File' in graph opens current file, add 'Open File at Commit'#307882yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @lszomoruMatched files:
|
Previously the "Open File" toolbar button in the SCM Graph history item change context opened the historical (read-only) version of the file at that commit. The user has no action to switch to the current working tree version without manually finding the file. This changes the "Open File" action to open the current (working tree) version of the file, matching what users expect from a button labeled "Open File". A new "Open File at Commit" action is added to the context menu to retain access to the historical snapshot view. Fixes microsoft#250938
1c43c40 to
4275d36
Compare
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
Fixes #250938.
Previously the Open File toolbar button in the SCM Graph history item change context opened the historical (read-only) version of the file at that commit. When a user wanted to edit or view the current working-tree version of that file, they had to use Go to File and type the file name manually — a slow, all-manual routine.
This PR:
The historical diff view for a file is still shown when the user clicks the row in the graph, so the two entry points remain:
Changes
src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.ts— updated theworkbench.scm.action.graph.openFileaction and added a newworkbench.scm.action.graph.openFileAtCommitactionTest plan
(commit-id)label