Skip to content

Add Popover z-index token and FormLayoutCustomField label auto-hide#715

Closed
adamkudrna wants to merge 2 commits into
masterfrom
task/popover-z-index-token
Closed

Add Popover z-index token and FormLayoutCustomField label auto-hide#715
adamkudrna wants to merge 2 commits into
masterfrom
task/popover-z-index-token

Conversation

@adamkudrna

Copy link
Copy Markdown
Member

Summary

  • Add --rui-Popover__z-index CSS custom property (default: auto) so consumers can control stacking context without attribute selectors or class injection; document usage in README
  • Allow visibility through cleanPlacementStyle so callers can hide the Popover before its initial position is computed (flash guard); document in README
  • Auto-hide labels of box fields nested in FormLayoutCustomField via context so label visibility is handled automatically by the layout

Test plan

  • Popover appears above sticky/fixed elements when --rui-Popover__z-index is set
  • Popover with visibility: hidden in placementStyle is hidden before position is ready
  • Labels of box fields inside FormLayoutCustomField are hidden automatically
  • Visual tests pass

🤖 Generated with Claude Code

…context

Creates `FormLayoutCustomFieldContext` and has `FormLayoutCustomField` provide
it to its children. `TextField`, `TextArea`, `SelectField`, and
`FileInputField` consume the context to automatically hide their labels when
rendered inside a `FormLayoutCustomField`, making the behavior a hard rule
rather than a recommendation.

Updates the `FormLayout` README to reflect the automatic behavior and removes
all now-redundant `isLabelVisible={false}` from code examples. Removes the
prop from `FormLayoutCustomField` test fixtures and the `FormLayout` story
accordingly.

Also adds per-component `formLayout` test coverage for `labelWidth` and the
new `formLayoutCustomField` visual tests to `TextField`, `TextArea`,
`SelectField`, `FileInputField`, `Button`, `CheckboxField`, `Radio`, and
`Toggle`.
- Add `--rui-Popover__z-index` token (default: `auto`) so consumers can
  control the Popover's stacking context without needing attribute selectors
  or class injection.
- Allow `visibility` through `cleanPlacementStyle` so callers can hide the
  Popover before its initial position is computed (flash guard).
- Document both additions in README Theming table and placementStyle prop JSDoc.
@adamkudrna
adamkudrna force-pushed the task/popover-z-index-token branch from 743a677 to f64db2b Compare June 29, 2026 19:01
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-29 19:04 UTC

@adamkudrna

Copy link
Copy Markdown
Member Author

🙈

@adamkudrna adamkudrna closed this Jun 29, 2026
@adamkudrna
adamkudrna deleted the task/popover-z-index-token branch June 29, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant