Skip to content

Add FormLayout context awareness to Button - #698

Merged
adamkudrna merged 1 commit into
masterfrom
feature/button-in-form-layout
Mar 30, 2026
Merged

Add FormLayout context awareness to Button#698
adamkudrna merged 1 commit into
masterfrom
feature/button-in-form-layout

Conversation

@adamkudrna

@adamkudrna adamkudrna commented Mar 18, 2026

Copy link
Copy Markdown
Member

Add FormLayout context awareness to Button:

obrazek

Summary

  • Button now detects FormLayoutContext and applies isRootInFormLayout
    (justify-self: start) to prevent full-width stretching in both vertical
    and horizontal layouts
  • In horizontal FormLayout, isRootLayoutHorizontal places the button in
    the field column (grid-column-start: 2) above the md breakpoint,
    aligning it with adjacent form fields
  • Adds ButtonForFormLayoutTests story component and formLayout visual
    test suite mirroring the pattern from TextField
  • Updates FormLayout README to document Button as a supported component
    and moves the full-form example to a more prominent place near the top

@github-project-automation github-project-automation Bot moved this to 💡Ideas in The Board Mar 18, 2026
@adamkudrna adamkudrna moved this from 💡Ideas to 👀 In review in The Board Mar 18, 2026
@adamkudrna

adamkudrna commented Mar 18, 2026

Copy link
Copy Markdown
Member Author

👉 Thorough test coverage of Button behavior in the FormLayout context added in #699.

Comment thread src/components/FormLayout/README.md
Comment thread src/components/Button/__tests__/Button.story.tsx Outdated
@adamkudrna
adamkudrna requested a review from mbohal March 23, 2026 16:10
Button now detects FormLayoutContext and applies `isRootInFormLayout`
(justify-self: start) and `isRootLayoutHorizontal` (grid-column-start: 2
above md breakpoint), matching the pattern used by all other form fields.
Also updates FormLayout README to document Button support and adds
Playwright component tests for the new FormLayout integration.
@adamkudrna
adamkudrna force-pushed the feature/button-in-form-layout branch from d38a4ef to abdf6f8 Compare March 30, 2026 18:47
@github-actions

github-actions Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-03-30 20:56 UTC

@adamkudrna
adamkudrna merged commit 03c7948 into master Mar 30, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in The Board Mar 30, 2026
@adamkudrna
adamkudrna deleted the feature/button-in-form-layout branch March 30, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants