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
Add inline actions for file changes. #738
Conversation
this._disposables.push(vscode.commands.registerCommand('review.openFile', (uri: vscode.Uri) => { | ||
let params = fromReviewUri(uri); | ||
this._disposables.push(vscode.commands.registerCommand('review.openFile', (value: GitFileChangeNode | vscode.Uri) => { | ||
let params: ReviewUriParams; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about files that have been deleted? In the SCM changes view, clicking the "Open File" button on such a change is a no-op, maybe we should do the same instead of having an error notification show up. Or show a warning notification that the file has been deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified the context for file change node to contain GitChangeType info and then we can filter deleted out.
return ''; | ||
} | ||
|
||
priority(status: GitChangeType): number { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does priority do? is this the priority of the decoration if there are other providers registered? why not assign the same priority to every change type?
Looks good, just had one question on the decoration provider |
@RMacfarlane good catch! Update the priority for all our decorations provider, now
For decorations we add to Tree Item, the file change decoration is always placed on the right |
The only difference between file changes in PR tree view and SCM is the way we render File Change Type.