Skip to content

Comments

feat: adding custom tooltip to F0OneSwitch#3436

Open
ChloeDumit wants to merge 8 commits intomainfrom
custom-tooltip-one-switch
Open

feat: adding custom tooltip to F0OneSwitch#3436
ChloeDumit wants to merge 8 commits intomainfrom
custom-tooltip-one-switch

Conversation

@ChloeDumit
Copy link
Contributor

@ChloeDumit ChloeDumit commented Feb 13, 2026

Description

This PR adds support for custom tooltips in One Switch, allowing us to display different messaging depending on the page context. For example, we can now show a specific tooltip when users enter the marketplace. It also introduces an option to auto open the tooltip for some seconds without hovering it

Screenshots (if applicable)

Screenshot 2026-02-13 at 10 56 13 AM
Screen.Recording.2026-02-20.at.1.59.38.PM.mov

Link to Figma Design

Implementation details

  • Added support for passing a custom tooltip to One Switch
  • Introduced an option to auto open the tooltip without hovering
  • Preserves the default behavior when no custom configuration is provided

@ChloeDumit ChloeDumit requested a review from a team as a code owner February 13, 2026 13:56
@github-actions github-actions bot added feat react Changes affect packages/react labels Feb 13, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

✅ No New Circular Dependencies

No new circular dependencies detected. Current count: 0

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

📦 Alpha Package Version Published

Use pnpm i github:factorialco/f0#npm/alpha-pr-3436 to install the package

Use pnpm i github:factorialco/f0#1ec8b9a154868fb5ccf81ac473a9f2099a41afc2 to install this specific commit

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

🔍 Visual review for your branch is published 🔍

Here are the links to:

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

Coverage Report for packages/react

Status Category Percentage Covered / Total
🔵 Lines 38.53% 7041 / 18270
🔵 Statements 37.92% 7197 / 18978
🔵 Functions 29.07% 1502 / 5166
🔵 Branches 28.16% 4057 / 14402
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/react/src/experimental/Navigation/Header/PageHeader/index.tsx 0% 0% 0% 0% 90-327
packages/react/src/sds/UpsellingKit/ai/F0BookAMeetingCard/useBookAMeetingCardAction.tsx 25% 0% 0% 25% 11-52
packages/react/src/sds/UpsellingKit/ai/F0DemoCard/useDemoCardAction.tsx 26.66% 0% 0% 28.57% 10, 13-18, 26-90
packages/react/src/sds/UpsellingKit/ai/F0FAQCard/useFAQCardAction.tsx 25% 0% 0% 25% 11-72
packages/react/src/sds/UpsellingKit/ai/F0ModuleCard/F0ModuleCard.tsx 25% 0% 0% 25% 15-59
packages/react/src/sds/UpsellingKit/ai/F0ModuleCard/types.ts 100% 100% 100% 100%
packages/react/src/sds/UpsellingKit/ai/F0ModuleCard/useModuleCardAction.tsx 25% 0% 0% 25% 11-52
packages/react/src/sds/UpsellingKit/ai/F0QuestionCard/useQuestionCardAction.tsx 7.14% 0% 0% 7.69% 18-26, 68-188
packages/react/src/sds/ai/F0OneSwitch/F0OneSwitch.tsx 4.16% 0% 0% 5% 24-88
packages/react/src/sds/ai/F0OneSwitch/types.ts 100% 100% 100% 100%
Generated in workflow #11109 for commit e9312a9 by the Vitest Coverage Report Action

>
> & {
/** Custom text shown in the tooltip when the chat is closed */
customTooltip?: string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would simply call it a tooltip, not custom

/** Custom text shown in the tooltip when the chat is closed */
customTooltip?: string
/** When true, the tooltip text is shown as a persistent label next to the switch (always in layout, no hover) */
tooltipAlwaysVisible?: boolean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is a good idea, what's the use case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

behavior was changed for auto open lasting 3 secs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat react Changes affect packages/react

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants