Skip to content

Conversation

@ggdouglas
Copy link
Contributor

@ggdouglas ggdouglas commented Nov 12, 2025

Problem

When the fill prop is passed to Tooltip or other Popover-based components, the .bp6-fill class was not being applied to the .bp6-popover-target wrapper div. This caused layout issues when using these components in flex containers, particularly when placing buttons side-by-side where one or more are wrapped in a tooltip.

When wrapping a button with fill={true} in a Tooltip with fill={true}, the button would not fill its container as expected.

Example:

<Flex gap={2} width="100">
    <Button fill={true}>Cancel</Button>
    <Tooltip fill={true} content="Some content.">
        <Button fill={true} intent="primary">Submit</Button>
    </Tooltip>
</Flex>

https://codesandbox.io/p/sandbox/r93ft3

Root Cause

The Popover component's target wrapper was missing the Classes.FILL class in its className computation, even when the fill prop was passed.

Example

Given the following use case / layout pattern:

<Flex gap={2}>
    <Button fill={true}>Cancel</Button>
    <Tooltip fill={true} content="Some content.">
        <Button fill={true} intent="primary">Submit</Button>
    </Tooltip>
</Flex>

Before: The popover target wrapper lacks the .bp6-fill class.

...
<div class="bp6-popover-target">
    <button class="bp6-button bp6-fill bp6-intent-primary">Submit</button>
</div>
before

After: The popover target wrapper now includes .bp6-fill.

...
<div class="bp6-popover-target bp6-fill">
    <button class="bp6-button bp6-fill bp6-intent-primary">Submit</button>
</div>
after

This results in both buttons displaying as equal width as expected.

@changelog-app
Copy link

changelog-app bot commented Nov 12, 2025

Generate changelog in packages/core/changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

[Popover] Apply fill class to popover target when fill prop is passed

Check the box to generate changelog(s)

  • Generate changelog entry

@ggdouglas ggdouglas changed the title [Popover] Apply fill class to popover target when fill prop is passed fix(Popover): Apply fill class to popover target when fill prop is passed Nov 12, 2025
@svc-palantir-github
Copy link

Apply fill class to popover target when `fill` prop is passed

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@changelog-app
Copy link

changelog-app bot commented Nov 12, 2025

Successfully generated changelog entry!

Need to regenerate?

Simply interact with the changelog bot comment again to regenerate these entries.


📋Changelog Preview

🐛 Fixes

  • [Popover] Apply fill class to popover target when fill prop is passed (#7635)

@svc-palantir-github
Copy link

Add test case

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants