Skip to content

[Docs] Fix TooltipProvider missing from Tooltip API Reference section#440

Open
pedromenezes1 wants to merge 4 commits intomainfrom
pmenezes/fix-tooltip-provider-api-reference
Open

[Docs] Fix TooltipProvider missing from Tooltip API Reference section#440
pedromenezes1 wants to merge 4 commits intomainfrom
pmenezes/fix-tooltip-provider-api-reference

Conversation

@pedromenezes1
Copy link
Copy Markdown
Collaborator

@pedromenezes1 pedromenezes1 commented Apr 23, 2026

Fixes the Tooltip component's API Reference section, which was missing TooltipProvider and its props (delay, closeDelay, timeout).

Adds a new SUB_COMPONENT_OVERRIDES map to the component-registry codegen so sub-components can be registered for documentation purposes without any runtime change to the component source. TooltipProvider remains a sibling named export.

Before After
Screenshot 2026-04-23 at 01 44 24 Screenshot 2026-04-23 at 01 44 35

  • Reviews
  • bonk has reviewed the change
  • automated review not possible because: this PR is in draft state pending manual verification
  • Tests
  • Tests included/updated
  • Automated tests not possible - manual testing has been completed as follows:
  • Additional testing not necessary because:

Register TooltipProvider in the component registry as a pass-through
sub-component of Tooltip via a new SUB_COMPONENT_OVERRIDES map. No
runtime change: TooltipProvider stays as a sibling named export.
Adds TooltipBase.Provider props (delay, closeDelay, timeout) to
PASSTHROUGH_COMPONENT_DOCS and a TooltipProvider section to the
Tooltip docs page.
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 23, 2026

npm i https://pkg.pr.new/@cloudflare/kumo@440

commit: 5c8dcae

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

Docs Preview

View docs preview

Commit: 1d9dc98

@pedromenezes1 pedromenezes1 self-assigned this Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

Visual Regression Report — 5 changed, 32 unchanged

5 screenshot(s) with visual changes:

Button / Loading State

7 px (0.01%) changed

Before After Diff
Before After Diff

Dialog (Open)

0 px (0%) changed

Before After Diff
Before After Diff

Select / Select Loading

0 px (0%) changed

Before After Diff
Before After Diff

Select / Select Multiple

556 px (0.55%) changed

Before After Diff
Before After Diff

Select (Open)

802 px (0%) changed

Before After Diff
Before After Diff
32 screenshot(s) unchanged
  • Button / Basic
  • Button / Variant: Primary
  • Button / Variant: Secondary
  • Button / Variant: Ghost
  • Button / Variant: Destructive
  • Button / Variant: Outline
  • Button / Variant: Secondary Destructive
  • Button / Sizes
  • Button / With Icon
  • Button / Icon Only
  • Button / Disabled State
  • Button / Title
  • Dialog / Dialog With Actions
  • Dialog / Dialog Basic
  • Dialog / Dialog Alert
  • Dialog / Dialog Confirmation
  • Dialog / Dialog With Select
  • Dialog / Dialog With Combobox
  • Dialog / Dialog With Dropdown
  • Select / Select Basic
  • Select / Select Sizes
  • Select / Select Without Label
  • Select / Select With Field
  • Select / Select Placeholder
  • Select / Select With Tooltip
  • Select / Select Custom Rendering
  • Select / Select Complex
  • Select / Select Disabled Options
  • Select / Select Disabled Items
  • Select / Select Grouped
  • Select / Select Grouped With Disabled
  • Select / Select Long List

Generated by Kumo Visual Regression

@pedromenezes1
Copy link
Copy Markdown
Collaborator Author

/bonk

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 23, 2026

I've reviewed all the changes in PR #440. Here's my analysis:

Summary of Changes

This PR fixes the Tooltip component's API Reference section by adding TooltipProvider and its props (delay, closeDelay, timeout).

Key Changes:

  1. metadata.ts: Added a new SUB_COMPONENT_OVERRIDES map that allows sub-components to be registered for documentation purposes without changing the runtime component structure. This is a clean approach for sibling named exports like TooltipProvider.

  2. index.ts: Modified the component processing logic to merge SUB_COMPONENT_OVERRIDES with auto-detected sub-components. The implementation correctly ensures detected entries take precedence over overrides (preventing masking of source-level patterns).

  3. tooltip.mdx: Updated the documentation to include the TooltipProvider API reference section using <PropsTable component="Tooltip.Provider" />.

  4. index.test.ts: Added comprehensive tests for the new SUB_COMPONENT_OVERRIDES functionality, ensuring the Tooltip.Provider entry is properly configured as a pass-through to TooltipBase.Provider.

  5. Changeset: Added a patch changeset for @cloudflare/kumo.

Review Assessment

The changes are well-structured and follow the existing codebase patterns. The approach of using an override map is clean and allows documentation for sibling named exports without requiring runtime changes to the component.

Approved

The implementation correctly:

  • Registers TooltipProvider as a sub-component of Tooltip in the registry
  • Pulls props from the existing PASSTHROUGH_COMPONENT_DOCS["TooltipBase.Provider"] documentation
  • Maintains backward compatibility (detected sub-components take precedence)
  • Includes appropriate tests
  • Updates the documentation page
  • Includes a changeset

github run

@pedromenezes1 pedromenezes1 marked this pull request as ready for review April 23, 2026 01:20
@pedromenezes1 pedromenezes1 changed the title Fix TooltipProvider missing from Tooltip API Reference section [Docs] Fix TooltipProvider missing from Tooltip API Reference section Apr 23, 2026
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