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

Align review comments UX and diff buttons UX #208378

Open
bpasero opened this issue Mar 22, 2024 · 3 comments
Open

Align review comments UX and diff buttons UX #208378

bpasero opened this issue Mar 22, 2024 · 3 comments
Assignees
Labels
diff-editor Diff editor issues polish Cleanup and polish issue
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Mar 22, 2024

See here:

Recording 2024-03-22 at 08 54 10

Since both components are very similar, why not align them:

  • same border width for the vertical lines
  • same button feedback when you hover
@hediet hediet added polish Cleanup and polish issue diff-editor Diff editor issues labels Mar 22, 2024
@hediet hediet added this to the April 2024 milestone Mar 22, 2024
@alexr00
Copy link
Member

alexr00 commented Mar 22, 2024

@hediet I think the diff button looks a bit nicer, so I would change comments in the following ways:

  • animation
  • give "+" button a border

@alexr00
Copy link
Member

alexr00 commented Apr 5, 2024

Per #209627, I will not add a border to the comment buttons.

@alexr00
Copy link
Member

alexr00 commented Apr 5, 2024

After spending the afternoon on this, I am stumped on how to do the animation of the comments button fading in and out. The situation:

  • As an editor gutter decoration, I can choose which css classes get added to the HTML element that gets added for my decoration.
  • My decoration doesn't use :hover, instead when the whole line is hovered it shows. This is achieved by being an editor decoration that get's added/removed as needed.
  • I can create a transition when the element is added to the dom using @starting-style
  • I can't come up with a way to fade the element out when the line is un-hovered, as the dom element is simply removed. ❌
  • Similarly, to make the fade in look nice the commenting range vertical line would also need to fade out when it's removed, which has the same problem. ❌

For my own reference later, this is what I can do for the fade-in

.monaco-editor .comment-range-glyph.line-hover:before {
	background: var(--vscode-editorGutter-commentRangeForeground);
	opacity: 1;
	transition: opacity 0.3s;

	@starting-style {
		opacity: 0;
	}
}

@alexr00 alexr00 modified the milestones: April 2024, Backlog Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diff-editor Diff editor issues polish Cleanup and polish issue
Projects
None yet
Development

No branches or pull requests

3 participants