Skip to content

fix(select): hide notch cutout if no visible label provided #27649

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 2 commits into from
Jun 15, 2023

Conversation

liamdebeasi
Copy link
Contributor

@liamdebeasi liamdebeasi commented Jun 14, 2023

Issue number: N/A


What is the current behavior?

Brandy discovered a bug in input, textarea, and select where the notch cutout remains visible even when no visible label is provided. I fixed this for input in #27636 and for textarea in #27647.

<ion-select fill="outline" label-placement="stacked" value="select" aria-label="my select"></ion-select>

image

What is the new behavior?

  • The notch cut out is hidden if no visible label is provided

Does this introduce a breaking change?

  • Yes
  • No

Other information

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions bot added the package: core @ionic/core package label Jun 14, 2023
@liamdebeasi liamdebeasi changed the title Select notch fix(select): hide notch cutout if no visible label provided Jun 14, 2023
@liamdebeasi liamdebeasi requested review from a team and mapsandapps and removed request for a team June 14, 2023 18:39
@liamdebeasi liamdebeasi marked this pull request as ready for review June 14, 2023 18:40
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 but I think your example in the description is wrong 🙂

localhost_3333_src_components_select_test_fill

Copy link
Contributor

@mapsandapps mapsandapps left a comment

Choose a reason for hiding this comment

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

Works well. The notch cutout is still shown if you provide an empty string to label. I'm not sure if that's expected or not.

@liamdebeasi
Copy link
Contributor Author

liamdebeasi commented Jun 15, 2023

Looks good but I think your example in the description is wrong 🙂

Oops I used the textarea by mistake. Updated!

Works well. The notch cutout is still shown if you provide an empty string to label. I'm not sure if that's expected or not.

I think that's expected. We determine if a control has no label based on if the label prop is undefined or if [slot="label"] is null when doing a querySelector.

@liamdebeasi liamdebeasi merged commit 606a892 into feature-7.1 Jun 15, 2023
@liamdebeasi liamdebeasi deleted the select-notch branch June 15, 2023 13:01
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