Skip to content

feat(select): add wrapper and bottom shadow parts#30951

Open
thetaPC wants to merge 2 commits intofeature-8.8from
FW-7019
Open

feat(select): add wrapper and bottom shadow parts#30951
thetaPC wants to merge 2 commits intofeature-8.8from
FW-7019

Conversation

@thetaPC
Copy link
Contributor

@thetaPC thetaPC commented Feb 9, 2026

Issue number: resolves #29918


What is the current behavior?

Developers can't customize elements within select like the bottom container because the component is a shadow component.

What is the new behavior?

  • Added bottom, wrapper, and wrapper-inner parts
  • Added a test

Does this introduce a breaking change?

  • Yes
  • No

Other information

N/A

@vercel
Copy link

vercel bot commented Feb 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview, Comment Feb 9, 2026 9:46pm

Request Review

@thetaPC thetaPC marked this pull request as ready for review February 9, 2026 21:55
@thetaPC thetaPC requested a review from a team as a code owner February 9, 2026 21:55
@thetaPC thetaPC requested a review from ShaneK February 9, 2026 21:55
Copy link
Member

@ShaneK ShaneK left a comment

Choose a reason for hiding this comment

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

This looks fine to me, the only minor concern I have is that there's no visual regression tests, but that's probably fine. No idea.

@thetaPC
Copy link
Contributor Author

thetaPC commented Feb 10, 2026

@ShaneK there's tests that check that the parts are working as intended.

@ShaneK
Copy link
Member

ShaneK commented Feb 10, 2026

@ShaneK there's tests that check that the parts are working as intended.

That is true, but in many other tests for parts we test with visual regression tests specifically. The fact tests existed at all is why I went ahead and approved and called it a minor concern.

@thetaPC
Copy link
Contributor Author

thetaPC commented Feb 10, 2026

@ShaneK there's tests that check that the parts are working as intended.

That is true, but in many other tests for parts we test with visual regression tests specifically. The fact tests existed at all is why I went ahead and approved and called it a minor concern.

That makes sense, but @brandyscarney has made good points of why we shifted over to use this new approach to test parts. I just can't seem to remember what it was. Maybe less snapshots for us to maintain?

Copy link
Member

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

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

Looks good! Just requesting a name update on one.

<label class="select-wrapper" id="select-label" onClick={this.onLabelClick} part="wrapper">
{this.renderLabelContainer()}
<div class="select-wrapper-inner">
<div class="select-wrapper-inner" part="wrapper-inner">
Copy link
Member

Choose a reason for hiding this comment

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

This should be named inner to go with the way we are naming the inner wrappers in item components.

})}
>
<label class="select-wrapper" id="select-label" onClick={this.onLabelClick}>
<label class="select-wrapper" id="select-label" onClick={this.onLabelClick} part="wrapper">
Copy link
Member

Choose a reason for hiding this comment

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

This is likely fine, let's just make sure we all agree on this name.

* @part error-text - Supporting text displayed beneath the select when the select is invalid and touched.
* @part bottom - The container element for helper text, error text, and counter.
* @part wrapper - The clickable label element that wraps the entire form field (label text, slots, selected values or placeholder, and toggle icons).
* @part wrapper-inner - The inner element of the wrapper that does not include the label text.
Copy link
Member

Choose a reason for hiding this comment

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

Can we change this to define what it wraps instead of what it doesn't?

@brandyscarney
Copy link
Member

Sorry I missed your previous comments.

We don't need screenshot tests here since we're defining the colors ourselves. If these were the default colors for the elements we would verify them visually to ensure they look correct because the defaults may change frequently. Because we're defining what color the token should use we can just verify that the right element is styled by it.

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

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants