Skip to content

feat(react-progress): add useProgressBarBase_unstable hook#35817

Merged
dmytrokirpa merged 4 commits into
masterfrom
feat/react-progress-base-hooks
Apr 1, 2026
Merged

feat(react-progress): add useProgressBarBase_unstable hook#35817
dmytrokirpa merged 4 commits into
masterfrom
feat/react-progress-base-hooks

Conversation

@dmytrokirpa

@dmytrokirpa dmytrokirpa commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds useProgressBarBase_unstable hook that extracts pure ProgressBar logic: ARIA role=progressbar, aria-valuemin, aria-valuemax, aria-valuenow, field context integration (aria-labelledby, aria-describedby), value clamping
  • Adds ProgressBarBaseProps and ProgressBarBaseState types using DistributiveOmit
  • Refactors useProgressBar_unstable to delegate to the base hook, then add design props
  • Exports new types and hook from both the component index.ts and package index.ts

Design props excluded from base hook

Prop Description
shape 'rounded' or 'square' bar shape
thickness 'medium' or 'large' bar thickness
color 'brand' / 'success' / 'warning' / 'error' status color

Functional props retained in base hook

  • value — current progress value (used for ARIA attributes)
  • max — maximum progress value (used for ARIA attributes, defaults to 1)
  • bar slot — filled portion of the track
  • Field context integration (labelId, validationMessageId, hintId)

🤖 Generated with Claude Code

@github-actions github-actions Bot added the CI label Mar 3, 2026
@dmytrokirpa dmytrokirpa force-pushed the feat/react-progress-base-hooks branch from 87ed181 to e86cd02 Compare March 5, 2026 10:58
@dmytrokirpa dmytrokirpa changed the base branch from experimental/component-base-hooks to master March 5, 2026 10:58
@github-actions github-actions Bot removed the CI label Mar 5, 2026
@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: entire library
1.297 MB
324.234 kB
1.297 MB
324.239 kB
61 B
5 B
react-progress
ProgressBar
20.097 kB
7.834 kB
20.167 kB
7.855 kB
70 B
21 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
70.397 kB
19.96 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
236.743 kB
68.75 kB
react-components
react-components: FluentProvider & webLightTheme
43.612 kB
14.022 kB
react-portal-compat
PortalCompatProvider
8.386 kB
2.624 kB
react-timepicker-compat
TimePicker
108.174 kB
35.695 kB
🤖 This report was generated against d3c3e333db020cc530bcdd79d21114730bcb07d0

@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown

Pull request demo site: URL

@dmytrokirpa dmytrokirpa force-pushed the feat/react-progress-base-hooks branch from 7cc7553 to 41fa3c6 Compare March 18, 2026 19:55
@dmytrokirpa dmytrokirpa self-assigned this Mar 18, 2026
@dmytrokirpa dmytrokirpa marked this pull request as ready for review March 18, 2026 19:56
@dmytrokirpa dmytrokirpa requested a review from a team as a code owner March 18, 2026 19:56
@tudorpopams tudorpopams requested a review from mainframev March 24, 2026 13:06
dmytrokirpa and others added 3 commits April 1, 2026 15:19
Implements useProgressBarBase_unstable hook that extracts the core ARIA progressbar
logic (role=progressbar, aria-valuemin/max/valuenow, field context integration)
without design props (shape, thickness, color). The styled hook useProgressBar_unstable
now delegates to the base hook and adds design-specific state.

Adds ProgressBarBaseProps and ProgressBarBaseState types derived from ProgressBarProps/
ProgressBarState using DistributiveOmit, omitting shape, thickness, and color.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@dmytrokirpa dmytrokirpa force-pushed the feat/react-progress-base-hooks branch from 842c3f7 to d10160f Compare April 1, 2026 13:23
@dmytrokirpa dmytrokirpa merged commit b9772fe into master Apr 1, 2026
15 checks passed
tudorpopams pushed a commit to tudorpopams/fluentui that referenced this pull request Apr 14, 2026
@dmytrokirpa dmytrokirpa deleted the feat/react-progress-base-hooks branch May 23, 2026 10:29
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.

2 participants