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

CHE-5339: Mark with color Git changed files in project explorer #5722

Merged
merged 14 commits into from
Aug 14, 2017

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Jul 18, 2017

What does this PR do?

Mark with colour Git changed files in project explorer and editor's tabs:
git_colors_dark
git_colors_light

What issues does this PR fix or reference?

#5339

Changelog

Colors project explorer files and editor tabs according to their git change state.

Release Notes

Colors project explorer files and editor tabs according to their git change state.

Docs PR

eclipse-che/che-docs#275

package org.eclipse.che.ide.api.vcs;

/**
* Indicates that specified node has VCS status attribute.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specified node -> specified resource

and so on on the below javadoc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -211,6 +219,14 @@ public void addPart(@NotNull PartPresenter part) {

final EditorTab editorTab = tabItemFactory.createEditorPartButton(editorPart, this);

resourceManagerFactory.newResourceManager(appContext.getDevMachine())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of resourceManagerFactory.newResourceManager(appContext.getDevMachine()).getFile(file.getLocation()) use appContext.getWorkspaceRoot().getFile(file.getLocation())

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@sunix
Copy link
Contributor

sunix commented Jul 18, 2017

_ I don't think the colors chosen are good: red for unstaged looks like there is an error
_ Red is default color for unstaged files in console git
_ in a console it's different, in the IDE, if you show something in red, i would open the file and try to find where is the error

@vinokurig
Copy link
Contributor Author

@sunix How about yellow color for unstaged files?
yellow

@slemeur
Copy link
Contributor

slemeur commented Jul 18, 2017

Please adjust the colors to the one in the requirements https://cloud.githubusercontent.com/assets/1636769/26213265/b13531d4-3bf8-11e7-9516-8217c68a6af8.png

It was yellow in the requirements.

@slemeur slemeur self-requested a review July 18, 2017 13:21
@slemeur
Copy link
Contributor

slemeur commented Jul 18, 2017

Missing docs update.

Copy link
Contributor

@slemeur slemeur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Colors need to be changed
  • Documentation PR needs to be provided

@vinokurig
Copy link
Contributor Author

@slemeur I don't se a color for untracked files in your mockup, Is it OK to have next colors:
new: green
modified: blue
untracked: yellow

Documentation PR needs to be provided

In progress 🙂

* @param color
* color to set
*/
void setTitleColor(String color);
Copy link
Contributor

@voievodin voievodin Jul 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it makes sense to specify the format of the color in the javadoc, like hash #000000 or color name like blue ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Any css valid color.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@codenvy-ci
Copy link

Build # 3092 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3092/ to view the results.

@vzhukovs
Copy link
Contributor

@slemeur what about these colors:

added: #0a7700
modified: #0032a0
untracked: #993300

?

private void initializeGitChangeWatcher() {
requestTransmitter.newRequest()
.endpointId("ws-agent")
.methodName("track:git-change")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please, rename method to the "track/git-change" (this is our internal agreement)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

private void initializeGitIndexWatcher() {
requestTransmitter.newRequest()
.endpointId("ws-agent")
.methodName("track:git-index")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ename method to the "track/git-index"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@vinokurig
Copy link
Contributor Author

vinokurig commented Jul 18, 2017

@slemeur I will prepare a docs PR when we will choose file colours to have actual screenshots

@codenvy-ci
Copy link

Build # 3094 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3094/ to view the results.

@codenvy-ci
Copy link

Build # 3101 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3101/ to view the results.

package org.eclipse.che.ide.api.vcs;

/**
* Indicates that specified resource has VCS status attribute.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please elaborate on what it means to have VCS status attribute?
Does it mean that each file has VCS status if the project is under VCS?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It means that the resource can store and return VCS status

.withBiConsumer(this::apply);
}

public void apply(String endpointId, GitChangeEventDto dto) {
Copy link
Contributor

@voievodin voievodin Jul 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it makes sense to decouple jsonrpc transport and GIT VCS status -> VCS status adaptation ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In current step we implement file colors only for git, so I think it is not bad to keep VCS status convertation logic inside Git changes transmitter.
The problem is that Git status command returns object that has lists of files for each status, but SVN status request returns just CLI output, so it is not clear, how to build a common Status converter (what common parameter it should receive).
I think this issue can be solved while implementig file colors for SVN.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the description, if @vparfonov is okay with it, let's leave it in current state.

@slemeur
Copy link
Contributor

slemeur commented Jul 19, 2017

Colors:

added: #3CAC64
modified: #DCCB58
untracked: #9A5CFF

@sunix
Copy link
Contributor

sunix commented Jul 24, 2017

IMO we should reuse colors that exist and used already in the IDE:

  • green should be the same green you have in the "class" icon,
  • yellow should be the one used for "folder" icon and
  • blue the one used for the cube in project icon.

@vzhukovs
Copy link
Contributor

@sunix +1. As for me(I have a protanopia), modified color is not readable.

@vinokurig
Copy link
Contributor Author

vinokurig commented Jul 24, 2017

@sunix +1
dark
light
But I would set more darker yellow in the light theme. @slemeur WDYT?

@bmicklea
Copy link

+1 on a darker yellow for light theme.

@slemeur
Copy link
Contributor

slemeur commented Aug 8, 2017

The colours for the dark theme are great.
I would also darker colors for the light theme - especially the yellow (you could try #BE9800).

@vinokurig
Copy link
Contributor Author

@slemeur
new colors for light theme:
added: #0a7700
modified: #0768B0
untracked: #ab8900
light

@vinokurig
Copy link
Contributor Author

@slemeur We need to decide what to do with colorizing editor tabs. My proposal is to change colorizing editor tabs caused by java error/warning to colored wavy underlinings:
error
WDYT?

@slemeur
Copy link
Contributor

slemeur commented Aug 9, 2017

Ok for the colors for the light theme.

Your proposal for showing error/warning is fine - you'll differentiate the error/warning state with the wavy underlines' color?

@vinokurig
Copy link
Contributor Author

@slemeur

you'll differentiate the error/warning state with the wavy underlines' color?

Yes
error:
error
warning:
warning

@codenvy-ci
Copy link

Build # 3327 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3327/ to view the results.

@codenvy-ci
Copy link

@codenvy-ci
Copy link

Build # 3351 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3351/ to view the results.

@codenvy-ci
Copy link

Build # 3357 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/3357/ to view the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants