feat(react-headless-components-preview): add TeachingPopover #36205
Open
mainframev wants to merge 6 commits into
Open
feat(react-headless-components-preview): add TeachingPopover #36205mainframev wants to merge 6 commits into
mainframev wants to merge 6 commits into
Conversation
📊 Bundle size report
🤖 This report was generated against 1d15557476d0e1eafbddd55c318d94bccd289a24 |
|
Pull request demo site: URL |
086563e to
67884ed
Compare
dmytrokirpa
reviewed
May 18, 2026
dmytrokirpa
reviewed
May 18, 2026
dmytrokirpa
reviewed
May 25, 2026
Contributor
dmytrokirpa
left a comment
There was a problem hiding this comment.
LGTM, a few things are needed before the merge:
- bundle-size stats, to ensure we don't pull unnecessary deps;
- tests - currently none, we need to add some, at least top-level component e2e and unit for differences from core implementation
| * Derived from the v9 `useTeachingPopoverCarouselContextValues_unstable` return | ||
| * type, which is the package's public contract for this shape. | ||
| */ | ||
| export type TeachingPopoverCarouselContextValues = ReturnType<typeof useTeachingPopoverCarouselContextValues_unstable>; |
Contributor
There was a problem hiding this comment.
is it not exported so we need to infer it?
Contributor
Author
There was a problem hiding this comment.
exactly, for sake of simplicity of current PR decided to infer. We can improve that in a follow-up by exporting it from the v9 TeachingPopover
|
|
||
| export type TeachingPopoverCarouselFooterProps = ComponentProps<TeachingPopoverCarouselFooterSlots>; | ||
|
|
||
| export type TeachingPopoverCarouselFooterState = ComponentState<TeachingPopoverCarouselFooterSlots>; |
Contributor
There was a problem hiding this comment.
Original footer component had also primary/secondary button slots, why did you skip them?
Contributor
Author
There was a problem hiding this comment.
it might be redundant for headless, but re-added for better parity with v9, good call
4937e80 to
dbbda65
Compare
b2f3935 to
719e7e4
Compare
719e7e4 to
d363959
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds a new headless
TeachingPopoverexposed at the@fluentui/react-headless-components-preview/teaching-popoversubpathHow it composes
useTeachingPopoverbuilds on the headlessusePopoverand defaultswithArrow: trueto match the v9 component.*Base_unstablehooks introduced in feat(react-teaching-popover): add base hooks and export them #36200(
useTeachingPopoverHeaderBase_unstable,useTeachingPopoverTitleBase_unstable,useTeachingPopoverFooterBase_unstable,useTeachingPopoverCarouselBase_unstable,etc.), keeping all behavior (dismiss handlers, finish handlers, carousel state
machine) while dropping the styled
appearance, default icons, and primary /secondary Button slots.
renderTeachingPopoverbridges the headlessPopoverProviderand the v9PopoverProviderso v9 base sub‑hooks can read context transparently.TeachingPopoverFooterships a local render that emits only<state.root />(no primary / secondary Button slots — consumer composes any buttons).
TeachingPopoverCarouselFooterships a local hook + render returning only{ root }for the same reason.Not in scope
appearance,trapFocus(TBA), andinlineprops from the v9 component areintentionally dropped
Stories
Two stories under
stories/src/TeachingPopover/:Default— header (icon + label + dismiss), media placeholder, title, body,primary + secondary footer.
WithCarousel— three‑card tour with nav buttons, page count, and prev / nextcontrols.