Skip to content

Conversation

@duncpro
Copy link
Contributor

@duncpro duncpro commented Oct 24, 2024

Closes #231298

Changes

  1. Introduced ExplorerResourceParentReadOnlyContext to track whether or not the parent of the selected explorer item is read only.
  2. Updated the preconditions of createNewFile and createNewFolder.

Testing

  1. Select a file nested in a readonly directory. The create-new-file and create-new- folder buttons will be grey and unclickable. (This is aligned with the actual behavior of the buttons when clicked. Previously they were clickable but did nothing.)
  2. Select a readonly file in a writable directory. The buttons will not be grey, they will be clickable.
  3. Select a readonly directory. The buttons will be grey and unclickable.

@duncpro
Copy link
Contributor Author

duncpro commented Oct 24, 2024

@microsoft-github-policy-service agree

Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bpasero bpasero added this to the November 2024 milestone Oct 25, 2024
@bpasero bpasero enabled auto-merge (squash) October 25, 2024 05:42
@bpasero bpasero merged commit 02094f5 into microsoft:main Oct 25, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Dec 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"New File" and "New Folder" buttons are greyed out if a readonly file is selected

4 participants