fix(filesharing): inline cancel button, fit responsive QR to parent#222
Conversation
|
/dobby review |
There was a problem hiding this comment.
Reviewed the diff and the surrounding context.
SendButton.svelte — inline cancel button
- Moving the cancel control into
.upload-info-contentreads naturally with.upload-info-label { flex: 1 }pushing it to the right. - Styling uses existing tokens (
--pg-input-error,--pg-on-primary,--pg-font-weight-medium,--pg-border-radius-sm), so it stays consistent with PostGuard design language rather than introducing a one-off colour. - Good a11y bits:
type="button",:focus-visibleoutline,:disabledstyling honouringencryptState.selfAborted. Translation keyfilesharing.cancelreused. all: unsetis a sensible reset for a fully custom button;box-sizing: border-boxis kept explicitly afterward, which is the right pattern.
YiviQRCode.svelte — responsive sizing
width: 100%; max-width: 330px; aspect-ratio: 1/1matches the fixed 330×330 used in the non-responsive variant, so the upper bound is unchanged.- The existing
:global(canvas), :global(svg) { width: 100% !important; height: auto !important }already handled inner sizing, so the container fix is the missing piece.
Minor (non-blocking): min-height: 200px combined with aspect-ratio: 1/1 will break the square ratio if the parent container is ever narrower than 200px (height would clamp at 200 while width drops below). The decrypt card layout in /download is unlikely to hit that on real devices, so this is just a note — no action needed.
Approving. Once arm64 build comes back green, this is good to merge.
|
Dobby sees the review request, sir! Dobby will look at the cancel-button move and the responsive QR sizing and report back. |
There was a problem hiding this comment.
Reviewed post-merge. Both changes look good:
- SendButton cancel button: Move from the standalone gradient pill to an inline red button inside the progress box is a clean visual fix. Uses
all: unsetcorrectly withtype="button", keeps:focus-visible,:hover, and:disabledstates.color-mixfor the hover tint is fine — supported across all targeted browsers per the existing usage in this repo. - YiviQRCode responsive:
width: 100%; max-width: 330px; aspect-ratio: 1/1is the right idiom for the responsive variant; preserves the 330px cap on wide layouts and stops overflow on narrow ones without needing JS sizing.
One small note (non-blocking, pure observation): --pg-input-error in dark mode is #de3030, which against white text at font-size-sm is around the 4.5:1 WCAG AA threshold for small text. Worth eyeballing in dark mode if anyone is nearby; not a regression from before, since the previous cancel button was also a colored pill.
Summary
YiviQRCodewithresponsive) scale to fit its parent (width: 100%; max-width: 330px; aspect-ratio: 1/1) so it no longer overflows the decrypt card on narrow layouts.Test plan