Skip to content

fix(Panel, DataView, Form, RadioGroup): adapt layouts to small screens - #255

Merged
hatesalp merged 6 commits into
mainfrom
fix/responsive_issues
Nov 30, 2026
Merged

hatesalp merged 6 commits into
mainfrom
fix/responsive_issues

Conversation

@hatesalp

@hatesalp hatesalp commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Small-screen fixes for Panel, DataView and Form fields, and wrapping for horizontal RadioGroups.

Changes

Panel

  • Padding is 8px below the sm breakpoint (576px), 24px above it.

DataView

  • Title and value padding is 8px 12px below sm, 10px 20px above it.

Form.Field / Form.FieldGroup (labelOrientation="horizontal")

  • On small screens (below sm, 576px), forms with labelOrientation="horizontal" switch to vertical labels: the label moves above the input instead of beside it.
  • Below sm, the label stacks above the input, as with vertical labels:
    • no fixed 128px label width and no label top margin
    • the label–input gap of vertical labels
    • the required asterisk moves after the label
    • the input stretches to the full width of its Col
  • Above sm, nothing changes.
  • Horizontal Form.FieldGroups wrap their items below sm, even without the wrap prop.

RadioGroup (orientation="horizontal")

  • Radios wrap to the next line when they do not fit, at every width.
  • Wrapped rows use the vertical orientation's gap; a single row looks the same.

⚠️ Behavior change

The RadioGroup wrap applies at every width, not only on small screens. In forms with formOrientation="horizontal", a RadioGroup no longer takes the width it needs to stay on one line. Fields share the row equally, so radios can wrap earlier than before. For example, in a 700px form with two InputTexts and a three-radio group, the fields went from 145/145/323px to 204/204/204px and the group wrapped to two lines.

Type of Change

  • 🆕 New Component
  • ✨ Feature / Enhancement
  • 🐛 Bug Fix
  • 💥 Breaking Change
  • 📦 Build / Dependency / Docs Update
  • 🧹 Code Refactoring

Screenshots / Preview

image image image

Checklist

  • Self-reviewed, no leftover logs or debug code
  • Uses design tokens — no hardcoded style values
  • Accessible (keyboard nav, ARIA, contrast)
  • Tests added/updated and passing
  • Storybook story added/updated

How to Test

@claude

claude Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @hatesalp's task in 19s —— View job


Review of PR #255 (latest push)

No blocking issues. The .Root rule is still compiled in FormField.module.scss, Panel.module.scss has .Root in its new block, and the .title/.value and .Root rules are now at the top level at the end of their files, as requested.

Open items

  1. PR description is out of date (general.md).
    • It still says the Form switch happens below sm (576px). The code uses screen-width("below", "xs") and xs is now 28rem (448px), so Form switches below 448px. Only Panel and DataView use sm.
    • The Behavior change section should also list:
      • $breakpoints.xs is global. Every Grid now switches to xs at 448px instead of 384px. Grid.mdx and the theme CSS and docs are updated, but the PR text doesn't mention it.
      • .groupItems now wraps for all Form.FieldGroups, and the wrap prop is removed. This is a breaking prop removal, so a release:patch label may be wrong.
      • The required asterisk now always sits after the label, including with horizontal labels.
  2. Nit (css.md): the blank line between flex-wrap: wrap; and .horizontalGroup & { in .groupItems (FormField.module.scss, about line 107) is still missing. Please restore it.
  3. Checklist: the Accessible, Tests and Storybook boxes are unchecked. The wrap tests and stories were deleted, so new coverage for the small-screen label layout and the RadioGroup wrap would be good.

I did not find a Grid e2e spec that sets a viewport. If one exists elsewhere, check that no viewport falls between 384 and 448px.

The blocks BarChart, AreaChart and About3 matched my search for 384/24rem, but I did not inspect those matches. Worth a quick look in case they depend on the old xs value.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Size Change: +149 B (+0.05%)

Total Size: 283 kB

📦 View Changed
Filename Size Change
dist/index.cjs 141 kB +74 B (+0.05%)
dist/index.es.js 140 kB +75 B (+0.05%)
ℹ️ View Unchanged
Filename Size
dist/chunks/useToggle-1pe2WRaw.js 800 B
dist/chunks/useToggle-B6kbi656.cjs 769 B
dist/hooks.cjs 225 B
dist/hooks.es.js 219 B

compressed-size-action

@atakanbayrak atakanbayrak left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I didn't find anything goes wrong, just Claude comments seemed valid to me, especially the first one. After good to go.

Comment thread src/lib/styles/breakpoints.scss Resolved
@hatesalp
hatesalp deployed to development November 30, 2026 07:10 — with GitHub Actions Active
@hatesalp
hatesalp merged commit 78867cf into main Nov 30, 2026
16 checks passed
@hatesalp
hatesalp deleted the fix/responsive_issues branch November 30, 2026 11:22

This branch was successfully deployed

1 active deployment
development — aa0ca63d Deployed Nov 30, 2026 by hatesalp via Chromatic #571
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.

3 participants