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

Styling for Apply/Discard buttons #21017

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft

Styling for Apply/Discard buttons #21017

wants to merge 15 commits into from

Conversation

rtfeldman
Copy link
Contributor

@rtfeldman rtfeldman commented Nov 21, 2024

WIP - do not merge; not fully wired up yet!

Change the "Apply" and "Discard" buttons to match @danilo-leal's design!

Screenshot 2024-11-21 at 3 50 24 PM Screenshot 2024-11-21 at 3 52 13 PM

Visual notes for @danilo-leal

  • The button container is taller than the editor line height, so for single-line diff hunks it extends down below the bottom of the hunk. I think we should make the font size smaller to avoid this
  • I think we should try a design where we keep the icon buttons until the cursor touches the hunk, at which point we expand to the spelled-out words "discard" "apply" with the keyboard shortcuts. I think when many hunks are visible, the words in the buttons take up a lot of real estate.

Implementation todos:

  • make the buttons expand based on the cursor position
  • fix the hunk header block preventing clicking on the first line of the diff
  • hide the undo button for now

Release Notes:

  • Restyled Apply/Discard buttons

@rtfeldman rtfeldman marked this pull request as draft November 21, 2024 20:52
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.

2 participants