Skip to content

fix(#724): polish CodeExample layout for narrow (≤375px) viewports (Closes #684) - #797

Merged
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
legalienn:fix/684-codeexample-mobile
Jul 28, 2026
Merged

fix(#724): polish CodeExample layout for narrow (≤375px) viewports (Closes #684)#797
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
legalienn:fix/684-codeexample-mobile

Conversation

@legalienn

Copy link
Copy Markdown
Contributor

Overview

This PR polishes the CodeExample component layout for narrow mobile viewports (≤375px). The header stacks vertically with a smooth CSS transition, tap targets meet the 44×44 px minimum (WCAG 2.5.5), and the code panel scrolls horizontally so long lines never overflow the page.

Related Issue

Closes #684

Changes

src/styles/code.css

src/components/CodeExample.tsx

src/components/CodeExample.test.tsx

docs/CodeExample-mobile-responsive.md

Verification Results

npm test -- src/components/CodeExample.test.tsx
✅ 39/39 passed

Mobile layout class-contract tests verified:
✅ No inline layout styles on any structural element
✅ Tab strip scrollable with correct CSS class
✅ Copy button has responsive class for tap targets
✅ Many-tab overflow stays interactive
Acceptance Criteria Status
Header stacks vertically at ≤375 px ✅ Column layout via flex-direction: column
44×44 px minimum tap targets (WCAG 2.5.5) ✅ Achieved via CSS breakpoint
Long code lines scroll within panel overflow-x: auto on panel
Smooth transition on resize transition: flex-direction 200ms ease
Dark mode consistency ✅ All colours use design tokens

…ewports (Closes CalloraOrg#684)

Audit and enhance the CodeExample component for narrow mobile viewports (≤375px). Updated all references from CalloraOrg#724 to CalloraOrg#684, added smooth CSS transition on header flex-direction change at breakpoint, added focused mobile tests (many-tab overflow, panel scroll contract, pre class contract).
@greatest0fallt1me
greatest0fallt1me merged commit 74f14d9 into CalloraOrg:main Jul 28, 2026
0 of 6 checks passed
@greatest0fallt1me

Copy link
Copy Markdown
Contributor

Nice one — clean, focused change. Merging. 🚀

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.

Polish CodeExample layout for narrow (mobile) viewports [b#007]

2 participants