Skip to content

fix(settings): vertically align signature Save/Delete buttons - #13478

Closed
xhon-pelushi wants to merge 3 commits into
nextcloud:mainfrom
xhon-pelushi:fix/signature-buttons-alignment
Closed

fix(settings): vertically align signature Save/Delete buttons#13478
xhon-pelushi wants to merge 3 commits into
nextcloud:mainfrom
xhon-pelushi:fix/signature-buttons-alignment

Conversation

@xhon-pelushi

@xhon-pelushi xhon-pelushi commented Aug 12, 2026

Copy link
Copy Markdown

⚠️ Verify checklist is green before merge

Checklist

  • 🧹 Code changes follow coding guidelines and are tested
  • 📗 Commits follow commit guidelines
  • 🏁 Backport required (N/A — UI-only CSS fix)

📝 Description

Vertically center the Save signature / Delete buttons in account signature settings.

The scoped display: inline-block override on NcButton broke flex centering, so the icon+text Save button and text-only Delete button aligned on baseline.

Fixes #13461

🧪 How has it been tested?

  • Open Mail → Account settings → Signature
  • Confirm Save signature and Delete sit on the same vertical center line
  • Confirm both buttons still sit on one row (no stacking)

The scoped override forced .button-vue to display: inline-block,
which disables NcButton's own flex centering. The icon-and-text
"Save signature" button ends up taller than the text-only "Delete"
button, and with no flex context the two are aligned on their text
baseline instead of their vertical center.

Switch the override to inline-flex with align-items: center so the
buttons stay on one line but keep NcButton's intended centering.

Fixes nextcloud#13461

Signed-off-by: xhon-pelushi <xhon@pelushi.com>

@ChristophWurst ChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the patch

Please see contributing and agents docs to bring your contribution into an acceptable format. Restore the PR template.

@ChristophWurst
ChristophWurst marked this pull request as draft August 13, 2026 08:54
@xhon-pelushi

Copy link
Copy Markdown
Author

Thanks @ChristophWurst — restored the PR template checklist/description format.

@ChristophWurst

Copy link
Copy Markdown
Member

I do not see it

@ChristophWurst ChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code smell

Comment thread src/components/SignatureSettings.vue Outdated
Comment on lines 289 to 296
.button-vue:deep() {
display: inline-block !important;
/* Keep the buttons inline but restore NcButton's own flex centering,
otherwise the icon-and-text button ends up taller than the text-only
one and they align on their text baseline instead of their center. */
display: inline-flex !important;
align-items: center;
margin-top: 4px !important;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you explain why another !important rule is necessary? The deep selector is already telling that an upstream component is modified in a fragile way. Unfortunately this makes it worse. Maybe the whole style needs to be untangled? Could a flexbox achieve the inlining and expected styling?

Replace the scoped .button-vue:deep() inline-block override with a
.signature-actions flex container so Save and Delete stay on one line
and align vertically without !important hacks.

Fixes nextcloud#13461

Signed-off-by: xhon-pelushi <xhon@pelushi.com>
Signed-off-by: xhon-pelushi <xhon@pelushi.com>
@xhon-pelushi

Copy link
Copy Markdown
Author

Thanks @ChristophWurst — reworked the fix to drop the .button-vue:deep() !important override entirely.

Change: wrap Save/Delete in a .signature-actions flex row (display: flex; align-items: center; gap: 4px) so the buttons stay on one line and center vertically without fighting NcButton's internal flex.

Screenshot (static repro of before vs after on the PR branch):

Signature button alignment

Vitest on SignatureSettings.vue still passes (10/10). Happy to drop the pr-screenshots/ folder before merge if you prefer.

@xhon-pelushi
xhon-pelushi marked this pull request as ready for review August 14, 2026 13:11
@ChristophWurst

Copy link
Copy Markdown
Member

Question about the code could not be answered. The commits still do not follow the repo contribution requirements. The screenshot looks hallucinated, or is from some kind of extracted isolated test. The before does not even reflect the original problem.

I'm going to have to close this. The back and forth is uneconomic for the size of this change.

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.

Account settings signature buttons are misaligned

2 participants