Deprioritize git-ignored files#705
Conversation
|
Have you considered using |
Instead of doing that, style the I can provide a code snippet if it helps you with this. |
@eyelash, I haven't. I'll have a look at it once I am able to work on this again. Thanks!
@lainsce, oh. I never knew about that class. I'm not sure if there is a |
|
I'd also consider marking the item as insensitive instead of applying a class on the label itself, though that does probably imply that you wouldn't be able to edit that file. I guess I'm not sure if we'd want that or not. |
|
I think it'd be best if we go for applying the class to the label instead of marking it as insensitive.
|
…sting and a small UI design fix.
|
In my latest commit, I used When catching any error What is the recommended log level to use in the case I presented? Is there a convention specific for elementaryOS codebases that details which log level to use? |
| item.activatable = null; | ||
|
|
||
| if (is_file_gitignored (item)) { | ||
| item.markup = Markup.printf_escaped ("<span fgalpha='50%'>%s</span>", item.name); |
There was a problem hiding this comment.
It feels weird to have this repeated as well as in deprioritize_gitignored_files (), could we just re-use that method?
| foreach (var child in top_level_item.children) { | ||
| var item = child as Item; | ||
| if (is_file_gitignored (item)) { | ||
| item.markup = Markup.printf_escaped ("<span fgalpha='50%'>%s</span>", item.name); |
jeremypw
left a comment
There was a problem hiding this comment.
See inline. Looks like you cannot use style classes as Item is an Object not a Widgets and does not offer styling functionality.
| item.markup = Markup.printf_escaped ("<span fgalpha='50%'>%s</span>", item.name); | ||
| } else { | ||
| item.markup = null; | ||
| } |
There was a problem hiding this comment.
Repeated code. Rather than repeat this code, call deprioritize_git_ignored_files () after resetting.
|
|
||
| private void deprioritize_gitignored_files (Item top_level_item) { | ||
| foreach (var child in top_level_item.children) { | ||
| var item = child as Item; |
There was a problem hiding this comment.
Check for null child or child that is not an Item to avoid critical terminal messages when .gitignore is updated.

Currently working on addressing #653. The image below shows my current progress.
I still have not worked on supporting glob patterns inside.gitignorefiles. It'll be up as soon as I am able to work on this again.Glob patterns inside.gitignorefiles are now supported. However, skipping certain files from being ignored (as done via!) is not yet fully supported. Deprioritizing files inside an ignored folder is not yet done.I have added the feature that deprioritizes files. Changes to
.gitignoreautomatically gets mirrored in the sidebar now.It still needs additional testing with folders and multiple project folders.I also need an opinion from the UI team with regards what should the colour be for the text of the deprioritized files. At the moment, I have set the text colour toInstead of changing the text colour of the deprioritized files to#BFBFBF.#BFBFBF, I modified their opacity instead and set it to 50%. The decision to change the opacity instead of the text colour is based on the property ofdim-labelin the default elementaryOS stylesheet. Choosingdim-labelas the basis for the aforementioned decision is due to @lainsce's suggestion of usingGtk.STYLE_CLASS_DIM_LABEL, which is the GTK enum constant of thedim-labelCSS class. I originally set the opacity from 75%, as specified bydim-label, but reduced it to 50% since the text didn't look deprioritized enough.