Skip to content
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

Test extension provided read-only message #186170

Closed
2 tasks done
alexr00 opened this issue Jun 26, 2023 · 1 comment
Closed
2 tasks done

Test extension provided read-only message #186170

alexr00 opened this issue Jun 26, 2023 · 1 comment

Comments

@alexr00
Copy link
Member

alexr00 commented Jun 26, 2023

Refs: #166971

Complexity: 2

Create Issue


We have a new API proposal for extension that have a read-only file system provider to provide markdown for the message that is shown when the user ties to edit a read-only file:

export function registerFileSystemProvider(scheme: string, provider: FileSystemProvider, options?: { readonly isCaseSensitive?: boolean; readonly isReadonly?: boolean | MarkdownString }): Disposable;
}

The GitHub Pull Requests and Issues extension uses the this proposal to show a useful message if you try to edit a file in a PR that isn't currently checked out.

To verify:

  1. Install the pre-release version of GitHub Pull Requests and issues
  2. Open a folder that contains a clone of a GitHub repo.
  3. From the "Pull Requests" view, expand a PR and open a file diff
  4. Try to edit the diff
  5. Verify that you see a message that instructs you to check out the PR to edit.
  6. Verify that you can click on the "Check out" in the message to check out the PR.
@daviddossett
Copy link
Contributor

Works great! Just a few nits.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants