-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
restore-file
UX improvements
#6621
Conversation
if (!file) { | ||
// The file was created by this PR. | ||
// This code won’t be reached if `highlight-deleted-and-added-files-in-diffs` works. | ||
throw new Error('Nothing to drop. Delete file instead'); |
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.
// This code won’t be reached if `highlight-deleted-and-added-files-in-diffs` works. | ||
throw new Error('Nothing to drop. Delete file instead'); | ||
if (file?.isTruncated) { | ||
throw new Error('File too big, you’ll have to use git'); |
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.
Improved error message, including solution
|
||
const {nameWithOwner, branch: prBranch} = getBranches().head; | ||
progress(menuItem.closest('[data-file-deleted="true"]') ? 'Undeleting…' : 'Committing…'); | ||
progress('Committing…'); |
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.
It's not necessary to differentiate the status here. In every case we're "Committing…"
Much better |
restore-file
and use new API #6596Changes
Test URLs
https://github.com/refined-github/sandbox/pull/16/files
Screenshot
Prior art
GitHub Desktop
VS Code
cc @134130