apex-ui icon indicating copy to clipboard operation
apex-ui copied to clipboard

Editing file shows all files except the one(s) changed as "green" in file tree

Open jlmitch5 opened this issue 7 years ago • 4 comments

When no files are edited:

screen shot 2017-06-19 at 12 50 23 pm

If I edit credentials.form.js, instead of it showing as green (which I assume indicates "changed and not commited", all other files/folder show as green and the changed file shows as black:

screen shot 2017-06-19 at 12 48 47 pm

jlmitch5 avatar Jun 19 '17 16:06 jlmitch5

ahh yea not sure what's going on there haha, I don't use the tree view personally but definitely a bug :D

tj avatar Jun 20 '17 17:06 tj

cool, thanks for confirming. Will attempt to take a look and see if I can get to the bottom of it.

jlmitch5 avatar Jun 20 '17 17:06 jlmitch5

I dug a bit into this.

It seems that the following code is missing from styles/lists.less along with a reset of the text color in the list: https://github.com/atom/one-dark-ui/blob/master/styles/lists.less#L21-L38

In my testing I just added this code in git.less, and it actually solved the problem. Now it behaves accordingly, but the color choices are still a bit off. E.g. modified is green/teal, which with the usual colorscheme would be orange.

.list-group,
.list-tree {
  li:not(.list-nested-item),
  li.list-nested-item > .list-item {
    color: @text-color;
  }

  .generate-list-item-status-color(@color, @status) {
    li:not(.list-nested-item).status-@{status},
    li.list-nested-item.status-@{status} > .list-item {
      color: @color;
    }

    li:not(.list-nested-item).selected.status-@{status},
    li.list-nested-item.selected.status-@{status} > .list-item {
      color: @color;
    }

  }

  .generate-list-item-status-color(@text-color-success, added);
  .generate-list-item-status-color(@text-color-subtle, ignored);
  .generate-list-item-status-color(@text-color-warning, modified);
  .generate-list-item-status-color(@text-color-error, removed);
  .generate-list-item-status-color(@text-color-info, renamed);
}

I would personally prefer to alter the colors for the git statuses so that it would be aligned with the default choices in Atom. Green for added, orange for removed, red for deleted. But I would not feel comfortable submitting a PR with design changes. :-)

gustavnikolaj avatar Jun 27 '17 09:06 gustavnikolaj

My take on it, implemented on the slim variant: https://github.com/gustavnikolaj/apex-ui-slim/commit/b3b22874ddc106d568317472ded1dc47ef3dd91d

gustavnikolaj avatar Jun 27 '17 19:06 gustavnikolaj