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

Lock icon only shows up in explorer when clicking on the file #235208

Closed
Tyriar opened this issue Dec 3, 2024 · 7 comments
Closed

Lock icon only shows up in explorer when clicking on the file #235208

Tyriar opened this issue Dec 3, 2024 · 7 comments
Assignees
Labels
file-explorer Explorer widget issues under-discussion Issue is under discussion for relevance, priority, approach

Comments

@Tyriar
Copy link
Member

Tyriar commented Dec 3, 2024

Notice that terminalSuggestMain.js does not have the lock icon:

Image

This is because it's showing up only after I open the file. After I close the file it remains, leading to a weird inconsistent state.

@benibenj
Copy link
Contributor

benibenj commented Dec 4, 2024

@Tyriar you did not use the find widget in this scenario right (just to make sure it was not caused by some recent work)
@lramos15 you aware of this?

@bpasero
Copy link
Member

bpasero commented Dec 5, 2024

I think we could do this but it will also add noise:

Image

The explorer maintains decorations here:

If we decide to really show the 🔒 for all files that are readonly, just add:

if (fileStat.isReadonly) {
	return {
		letter: Codicon.lockSmall,
		tooltip: localize('readonly', "Read-only"),
	};
}

to the end.

Today decorations only appear for resolved models, coming in from:

provideDecorations(uri: URI): IDecorationData | undefined {

and

provideDecorations(uri: URI): IDecorationData | undefined {

@bpasero bpasero added file-explorer Explorer widget issues under-discussion Issue is under discussion for relevance, priority, approach labels Dec 5, 2024
@benibenj benibenj removed their assignment Dec 5, 2024
@Tyriar
Copy link
Member Author

Tyriar commented Dec 5, 2024

@bpasero how about making it resolved model + open in an editor since the former is invisible to the end user? If you disagree feel free to close.

@bpasero
Copy link
Member

bpasero commented Dec 5, 2024

I think I would either make it consistently showing in all cases or keep what we have now but not add something new that is still not consistent.

@Tyriar
Copy link
Member Author

Tyriar commented Dec 5, 2024

I'm on the fence, up to you. FWIW after #195701 I don't think I'll care if it's readonly until I try to edit or delete it.

@bpasero
Copy link
Member

bpasero commented Dec 5, 2024

Yeah I will try to do that one in cleanup iteration.

@lramos15
Copy link
Member

lramos15 commented Jan 6, 2025

Sounds like we can close this as won't fix for now to not do anything confusing since #195701 has been resolved?

@bpasero bpasero closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
file-explorer Explorer widget issues under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

4 participants