Skip to content

fix: remove min height calc logic for SelectPanel #6225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 3, 2025

Conversation

KirankumarAmbati
Copy link
Contributor

@KirankumarAmbati KirankumarAmbati commented Jun 20, 2025

Closes #6220

Changelog

New

Changed

Removed

  • Min height calculation logic for SelectPanel

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Screenshot 2025-06-20 at 1 13 13 PM Screenshot 2025-06-20 at 1 13 19 PM Screenshot 2025-06-20 at 1 16 12 PM Screenshot 2025-06-20 at 1 15 20 PM

Merge checklist

Copy link

changeset-bot bot commented Jun 20, 2025

🦋 Changeset detected

Latest commit: f4387ab

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

This PR includes changesets to release 1 package
Name Type
@primer/react 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

@KirankumarAmbati
Copy link
Contributor Author

@francinelucca Tagging you here as we are already discussing reg this 🙇

@francinelucca francinelucca marked this pull request as ready for review July 3, 2025 14:42
@Copilot Copilot AI review requested due to automatic review settings July 3, 2025 14:42
@francinelucca francinelucca requested a review from a team as a code owner July 3, 2025 14:42
@francinelucca francinelucca requested a review from jonrohan July 3, 2025 14:42
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the dynamic min-height calculation for the SelectPanel component, simplifying its sizing behavior and dropping the heightMap dependency.

  • Deleted the heightMap import from Overlay
  • Removed the --max-height inline style that set panel height based on overlayProps.maxHeight
Files not reviewed (1)
  • packages/react/src/SelectPanel/SelectPanel.module.css: Language not supported
Comments suppressed due to low confidence (2)

packages/react/src/SelectPanel/SelectPanel.tsx:23

  • With the removal of heightMap and --max-height logic, please update the SelectPanel documentation (PropTable and website docs) to reflect that maxHeight is no longer used for sizing.
import {announce, announceFromElement} from '@primer/live-region-element'

packages/react/src/SelectPanel/SelectPanel.tsx:722

  • Add or update unit/visual regression tests to verify that SelectPanel renders correctly with default sizing and that removing the --max-height style doesn’t introduce layout regressions.
          style: {

Copy link
Member

@francinelucca francinelucca left a comment

Choose a reason for hiding this comment

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

👍

@francinelucca francinelucca added this pull request to the merge queue Jul 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 3, 2025
@francinelucca francinelucca added this pull request to the merge queue Jul 3, 2025
Merged via the queue into primer:main with commit 669c338 Jul 3, 2025
31 of 32 checks passed
@primer primer bot mentioned this pull request Jul 3, 2025
liuliu-dev pushed a commit that referenced this pull request Jul 7, 2025
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.

Empty state message displays inside scrollbar with custom SelectPanel height
2 participants