-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show unstaged file names in default colour
Previously, we had the following rules: * file names were in red when unstaged or partially staged * directory names were in red if unstaged, yellow if partially staged, and green if fully staged Red text on a black background can be hard to read, so instead I'm changing it so that unstaged and partially staged files have their names in the default text colour. So for files, the new rules are: * unstaged and partially staged files use the default colour * fully staged files are in green You can tell the difference between an unstaged and partially staged file by looking at the status characters (one of them will be in red so we do have some colour to indicate the difference). As for directories, the new rules are: * unstaged directories have their names in the default colour * partially staged directories have their folder arrows in green * fully staged directories have their folder arrows in green and their names in green I'm scrapping the yellow colour for partially staged directories because I always found it awkward and it never really clicked in my head as being halfway between green and red. I find having a little bit of green vs a lot of green a better indicator of the difference between partially staged and fully staged. I considered just leaving directories in the default colour regardless of their status, but that causes issues when a directory is collapsed. It's also nice to know if you've staged the last unstaged file in an directory. I've also applied the same pattern in the commit files view. Previously, partially staged files would also be yellow, and now they're the default colour but with a green status character (a half-filled circle). Fully staged files have a green name with a green full-circle status character. Also, if the default colour represents 'unstaged', but directories always have the default colour, then it's hard to know at a glance whether every file is staged. With the current rules (like before) if everything is staged, everything is green. I've also done a refactor on the code clean up some dead code from when the file tree outline was drawn with box characters, and I've made it so that the indentation in each line is handled inside the function that draws the line rather than in the recursive parent function. This makes it easier to experiment with things like showing the file status characters on the left edge of the view (admittedly after experimenting with it, I decided I didn't like it). Apologies for having a refactor and a functional change in the one commit but by the time I was done, I couldn't be bothered going back and retroactively splitting it into two halves.
- Loading branch information
1 parent
8193731
commit 18bd28b
Showing
3 changed files
with
158 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters