Stepper: define the public boundary for context exports
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 1.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
## Problem
`@astryxdesign/core/Stepper` publicly exports both `useStepperContext` and `StepperContextValue`, but the exported value includes component-private coordination such as `previousActiveStep` and `registerStep`.
- Public barrel: [`packages/core/src/Stepper/index.ts`](https://github.com/facebook/astryx/blob/64e715a37244c678a1e4998ade881515b1531184/packages/core/src/Stepper/index.ts#L13-L18)
- Context shape: [`packages/core/src/Stepper/StepperContext.ts`](https://github.com/facebook/astryx/blob/64e715a37244c678a1e4998ade881515b1531184/packages/core/src/Stepper/StepperContext.ts#L31-L70)
The source itself describes some fields as internal, and the only repository consumer of `registerStep` is the built-in `Step`. However, exporting the hook and full interface makes those details part of the installable TypeScript surface. Internal Stepper changes can therefore become accidental consumer type breaks.
## Desired outcome
Decide and encode the supported context boundary:
1. If custom Step composition is supported, define and document a stable public subset while keeping registration, measurement, animation, and compact-layout coordination private.
2. If the hook/type are not supported public API, deprecate them and remove them only at an explicit compatibility boundary.
## Acceptance criteria
- The intended public use case for `useStepperContext` is explicit.
- Private Stepper coordination is not exposed through a required public interface.
- A compatibility/type test protects the chosen public surface.
- Consumer docs or deprecation guidance match the decision.
Contributor guide
Research direction
Read packages/core/src/Stepper/index.ts and packages/core/src/Stepper/StepperContext.ts, then inspect the built-in Step consumer of registerStep. Decide whether custom Step composition is supported or the hook and type need deprecation, and encode that boundary with a compatibility/type test plus matching consumer documentation or deprecation guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100