Skip to content

Migrate SegmentedControl usages off removed fill prop - #939

Draft
amcclain wants to merge 1 commit into
developfrom
segmented-control-sizing
Draft

amcclain wants to merge 1 commit into
developfrom
segmented-control-sizing

Conversation

@amcclain

Copy link
Copy Markdown
Member

Pairs with xh/hoist-react#4856, which removes SegmentedControl.fill and sizes the control to its options by default. Merge after that PR.

Changes

  • Removed fill: false, now the default (17 lines across 12 files).
  • Replaced fill: true with width: '100%' in the favicons example.
  • Changed the SegmentedControl demo's "Fill width" playground toggle to a "Full width" toggle that sets width.

Verification
Requires a hoist-react build with xh/hoist-react#4856, for example pnpm startWithHoist against that branch. Against the published @xh/hoist, typecheck fails on the favicons width prop. For that reason the commit skipped the pre-commit hook. Prettier and ESLint pass on the changed files.

The dashboard OptionsWidget relied on the old default fill and now renders at its options' width. It is unchanged here - see the follow-up comment on xh/hoist-react#4856.

Pairs with hoist-react segmented-control-sizing (xh/hoist-react#4856), which removes `SegmentedControl.fill` and sizes the control to its options by default.

- Removed `fill: false`, now the default.
- Replaced `fill: true` with `width: '100%'` in the favicons example.
- Changed the SegmentedControl demo's "Fill width" playground toggle to a "Full width" toggle that sets `width`.

Requires a hoist-react build with that change. Committed with --no-verify because the pre-commit typecheck runs against the published @xh/hoist.
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.

1 participant