Skip to content

fix: remove extra spacing on InfoMessage#5494

Merged
estib-vega merged 1 commit into
gitbutlerapp:masterfrom
MikaelCarpenter:bug/extra-spacing
Nov 8, 2024
Merged

fix: remove extra spacing on InfoMessage#5494
estib-vega merged 1 commit into
gitbutlerapp:masterfrom
MikaelCarpenter:bug/extra-spacing

Conversation

@MikaelCarpenter
Copy link
Copy Markdown
Contributor

☕️ Reasoning

In #5418 I made some changes to this InfoMessage to render the error message properly.
However, I introduced a scenario where the content slot could be rendered to the DOM with a pre element, but no text content.

Ordinarily the content element would hide itself if empty, but the pre element prevents that. The parent container also uses gap to add space between the title and content slots, resulting in asymmetric spacing

🧢 Changes

  • Don't render the pre if there's no error message

📸 Screenshots

BEFORE AFTER
before_checked after_checked
before_success after_signed
before_error after_error

the parent container uses a gap, so an empty pre results in some extra padding that makes the InfoMessage asymmetric
@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 8, 2024

@MikaelCarpenter is attempting to deploy a commit to the GitButler Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

@estib-vega estib-vega left a comment

Choose a reason for hiding this comment

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

Thanks for the attention to detail and for the detailed PR description.
This is highly appreciated!

@estib-vega estib-vega merged commit 61bb11d into gitbutlerapp:master Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants