Skip to content

fix(Tooltip): expose strategy prop#1780

Merged
huntabyte merged 1 commit into
mainfrom
fix/1719
Sep 19, 2025
Merged

fix(Tooltip): expose strategy prop#1780
huntabyte merged 1 commit into
mainfrom
fix/1719

Conversation

@huntabyte

Copy link
Copy Markdown
Owner

No description provided.

@changeset-bot

changeset-bot Bot commented Sep 19, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fede373

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
bits-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@huntabyte huntabyte requested a review from Copilot September 19, 2025 14:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

Expose the Tooltip Content positioning strategy prop so consumers can control Floating UI’s positioning behavior.

  • Replace narrow Pick of FloatingLayerContentProps with a broad Omit to include strategy
  • Wire the new strategy prop through tooltip-content.svelte to useFloatingContent

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/bits-ui/src/lib/bits/tooltip/types.ts Broadens TooltipContentProps to include most FloatingLayerContentProps (to expose strategy).
packages/bits-ui/src/lib/bits/tooltip/components/tooltip-content.svelte Adds strategy prop and forwards it to useFloatingContent.
.changeset/yummy-dolls-tell.md Documents the patch change to expose strategy.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

| "dir"
| "customAnchor"
> &
Omit<FloatingLayerContentProps, "content" | "preventScroll"> &

Copilot AI Sep 19, 2025

Copy link

Choose a reason for hiding this comment

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

Switching from a targeted Pick to a broad Omit exposes almost all FloatingLayerContentProps, not just strategy. This widens the public API surface for TooltipContent beyond the stated goal and risks conflicts with DismissibleLayerProps where keys overlap. Recommend reverting to Pick and explicitly adding 'strategy' to the allowlist to avoid unintended prop exposure.

Suggested change
Omit<FloatingLayerContentProps, "content" | "preventScroll"> &
Pick<FloatingLayerContentProps, "strategy"> &

Copilot uses AI. Check for mistakes.
@github-actions

Copy link
Copy Markdown
Contributor

📦 Bundle Size Analysis

📊 Modified Components

Component Current New Change
🔴 Tooltip 112.62 KB gzipped: (35.65 KB) 112.67 KB gzipped: (35.66 KB) +0.04 KB gzipped: (+0.01 KB)

📋 Understanding Bundle Analysis
  • Individual Import Cost: Each component is measured in isolation, including all its dependencies
  • Real-world Usage: When multiple components are used together, shared dependencies are deduplicated thus the actual bundle size is smaller than the sum of the individual component sizes
  • Thresholds: Changes smaller than 0.01 KB or 0.1% are considered insignificant
  • Gzipped Size: Represents the compressed size served to users

@github-actions

github-actions Bot commented Sep 19, 2025

Copy link
Copy Markdown
Contributor
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
bits-ui ✅ Ready (View Log) Visit Preview fede373

@huntabyte huntabyte merged commit 0cb2561 into main Sep 19, 2025
8 checks passed
This was referenced Sep 19, 2025
@huntabyte huntabyte deleted the fix/1719 branch October 19, 2025 02:01
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.

2 participants