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

Expose theming for Git Diffs #39325

Closed
johnpapa opened this issue Nov 29, 2017 · 12 comments
Closed

Expose theming for Git Diffs #39325

johnpapa opened this issue Nov 29, 2017 · 12 comments
Assignees
Labels
feature-request Request for new features or functionality scm General SCM compound issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@johnpapa
Copy link

As per conversation with @aeschli , @chrisdias and @seanmcbreen , here is a list of style settings I'd love to see exposed in VS Code.

Git Diffs

Expose the margin, border, box shadow and background color for the git diff indicators. We currently have the background color, but the others are not. This would allow a cool effect like this:

image

.monaco-editor .dirty-diff-added {
  margin-left: 16pt;
  box-shadow: -4pt 0 4pt 2pt #27ff00;
  border-left: 4pt solid #00ff00;
  background-color: #00ff00;
}

.monaco-editor .dirty-diff-modified {
  margin-left: 16pt;
  box-shadow: -4pt 0 4pt 2pt #4fb4d8;
  border-left: 4pt solid #4fb4d8;
  background-color: #4fb4d8;
}

cc #38990

@kieferrm kieferrm added the feature-request Request for new features or functionality label Nov 29, 2017
@joaomoreno joaomoreno added this to the December 2017 milestone Dec 4, 2017
@joaomoreno joaomoreno added git GIT issues scm General SCM compound issues and removed git GIT issues labels Dec 4, 2017
@usernamehw
Copy link
Contributor

usernamehw commented Jan 3, 2018

This looks like an overkill. The only thing I want to configure is its width (because 3px is too distracting):

1px:
1px
2px:
2px
3px:
3px
4px:
4px
5px:
5px
Folding icons with 5px border width:
foldingmarker

@joaomoreno
Copy link
Member

Actually these colors are already themeable. We won't support customising the width.

@johnpapa
Copy link
Author

johnpapa commented Jan 8, 2018

I am currently using an extension that allows us to override css soon camndonthis and many other overrides. I’d like to stop using that as it may have other implications. Just to give some context as to why i am requesting more Css control in vs code.

I see this issue has been closed. Could we have a discussion about exposing these css properties?

@usernamehw
Copy link
Contributor

usernamehw commented Jan 9, 2018

@joaomoreno, what is the reasoning behind not customizing the width? It's not clashing with line numbers to the left and with folding controls to the right (providing 1-5px range).

@joaomoreno
Copy link
Member

@johnpapa As I said, those specific colors are already themeable, no need to override CSS. The theme color names are:

  • editorGutter.modifiedBackground
  • editorGutter. addedBackground
  • editorGutter. deletedBackground

@usernamehw Yeah the only way we could make it work is to limit it in that 1-5px range... Would you like to attempt a PR for that? If so, we can extract your comment about the width into a separate issue.

@usernamehw
Copy link
Contributor

Another thing: I can registerThemingParticipant, but if it does it every onDidChangeConfiguration then css just stops applying.

Is there a way to explicitly dispose registered theming participant?

@joaomoreno
Copy link
Member

Try to disconnect the two parts. Themeing is all about colors, leave it be. You can find another way to create a dynamic CSS rule which changes every time the configuration changes. The DirtyDiffWorkbenchController could create such a stylesheet element and update it accordingly.

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Feb 1, 2018

@joaomoreno The PR to customize the width has not been merged. Is this planned for the January milestone? If not, can we move it to February?

@joaomoreno
Copy link
Member

It's a separate issue. To verify this, just verify the colors.

@usernamehw
Copy link
Contributor

But this issue was about additional diff styling and wasn't implemented.

@joaomoreno
Copy link
Member

Sure.

@joaomoreno joaomoreno reopened this Feb 1, 2018
@joaomoreno joaomoreno modified the milestones: January 2018, February 2018 Feb 1, 2018
@joaomoreno joaomoreno removed the verification-needed Verification of issue is requested label Feb 1, 2018
@joaomoreno
Copy link
Member

Fixed by #43334

@joaomoreno joaomoreno added the verification-needed Verification of issue is requested label Feb 26, 2018
@bpasero bpasero added the verified Verification succeeded label Feb 28, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality scm General SCM compound issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants