Drop the auth card frame on small viewports - #5403
Open
bigmoves wants to merge 1 commit into
Open
Conversation
The card frame is dropped in two independent steps. Below `sm` (40rem) the card's surface, ring and radius go, along with the footer's fill and top border, and `.auth-background` swaps the branding image for the card surface — with no opaque card left to sit on, copy over a background image would be illegible. This covers the OAuth popup. `@atproto/oauth-client-browser` opens the authorization window at `width=600,height=600` by default, so the window is already the dialog: the card inside it was a card inside a card, and the branding image only ever showed as slivers down either side. Below `xs` (30rem) the content additionally runs edge to edge, and the footer is pinned to the bottom of the viewport with the content centred in the space above it — which reads well for both the two-line error screen and the sign-up wizard. The two steps stay separate on purpose. Collapsing them to `sm` alone stretches a 600px popup's inputs to the full window width; collapsing them to `xs` alone puts the card back in the popup. At or above 40rem the screens render identically to before. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
bigmoves
force-pushed
the
bigmoves/mobile-auth-cardless-ui
branch
from
August 14, 2026 22:36
1e26972 to
c3b0814
Compare
bigmoves
marked this pull request as ready for review
August 14, 2026 22:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Motivation for this came from here https://bsky.app/profile/aka.dad/post/3msoi46tp2d2s, also I think it does look better without the card on smaller screens. Could go either way though. The old UI was actually more like this.
--
On small viewports the authorization screens render a card inside a card: an opaque, rounded, ringed panel that occupies nearly the whole window, floating over a background image that is almost entirely hidden behind it. The frame costs horizontal space and reads as a shrunken desktop layout rather than one built for the size it's in.
The frame is now dropped in two independent steps.
Below
sm(40rem) the card's surface, ring and radius go, along with the footer's fill and top border, and.auth-backgroundswaps the branding image for the card surface — with no opaque card left to sit on, copy over a background image would be illegible. Content stays capped atmax-w-sm.Below
xs(30rem) the content additionally runs edge to edge, and the footer is pinned to the bottom of the viewport with the content centred in the space above it.The popup is the reason for two steps
@atproto/oauth-client-browseropens the authorization window atwidth=600,height=600by default (browser-oauth-client.ts#L300), so the popup is already the dialog. Inside it the card was a card inside a card, and the branding image only ever showed as slivers down either side:Collapsing the two steps into one breaks one case or the other: at
smalone, the 600px popup stretches its inputs to the full window width; atxsalone, the card comes back in the popup.Phones
Sign-in — before / after (390px)
Password form — before / after (390px)
Dark mode — before / after (390px)
Above 40rem, nothing changes
The before and after screenshots at 700px and at 1280px are byte-identical.
Layout note
The footer is pinned to the bottom with the content centred above it, on phones only. Three vertical layouts were tried: centring the whole block (the desktop behaviour) left dead space above and below; top-aligning the content with a pinned footer looked right on the sign-in form but left a large void under the two-line error screen. What's here uses
mt-autoon both the card's first child and the footer, which splits the free space evenly — the footer lands at the bottom and the content centres in what remains. That holds for both the error screen and the sign-up wizard.Scope
AuthShellonly, so this covers the authorization flow plus the error and cookie-error pages. The account-manager screens useAccountShelland are unaffected.Checked at 390px and 430px, in a real 600×600 popup (sign-in, password, consent), and at the 480/640 boundaries; light and dark; and overflow at 390×520 and in the popup's consent screen, both of which scroll with nothing clipped.
Checklist
pnpm build --force && pnpm verifypasses