This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Add custom style for files/dirs matching core:ignoredNames #1048
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Git-ignored files/dirs have the custom class
status-ignored
which gives the entry a more subtle color indicating that it's ignored. This PR contains a change that yields the same result for matches ofcore:ignoredNames
setting:I.e. if the tree-view config setting
tree-view:hideIgnoredNames
is set to false it displays the entries but with the custom style, too.Extracted the
ignoredPatterns
from the tree-view into a separate object (IgnoredNames
), which is now reused for both theDirectory
andFile
model. The git status of an ignored entry still have precedence over the ignored status.Alternate Designs
Considered only changing the view but the logic would have complicated their code.
Benefits
Visual cue of what files/precedence that are ignored.
Possible Drawbacks
Potential bugs/regressions not covered by current test suite, I guess.