Skip to content
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

bug: Ion Select Popover clips unnecessarily due to invisible radio button overlapping text #28987

Closed
3 tasks done
ConnorBrennan opened this issue Feb 6, 2024 · 2 comments
Closed
3 tasks done
Assignees
Labels
ionitron: needs reproduction a code reproduction is needed from the issue author

Comments

@ConnorBrennan
Copy link

ConnorBrennan commented Feb 6, 2024

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

When making a small ion-select (such as one for page numbers), the invisible radio button overlaps the text, causing it to be unreadable. This is because the radio button is hidden by reducing its opacity to 0, rather than applying display: none
image
__

Expected Behavior

The radio button should not take up space in the select popover
image

Steps to Reproduce

  1. Set ion app to md (unsure if issue also presents on ios)
  2. Make an ion select with number values and a small width (65 pixels should work, it will crop double digit values)
  3. Set the interface to popover
  4. Open the select and see the text clipped when there's still plenty of room.

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 7.1.1 (C:\Users\505449\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 7.6.5 (C:\Users\505449\Dev\DenverGov\denverdesign\angular\node_modules@ionic\angular)
@angular-devkit/build-angular : 15.2.10 (C:\Users\505449\Dev\DenverGov\denverdesign\angular\node_modules@angular-devkit\build-angular)
@angular-devkit/schematics : 15.2.10 (C:\Users\505449\Dev\DenverGov\denverdesign\angular\node_modules@angular-devkit\schematics)
@angular/cli : 15.2.10 (C:\Users\505449\Dev\DenverGov\denverdesign\angular\node_modules@angular\cli)
@ionic/angular-toolkit : 9.0.0

Capacitor:

Capacitor CLI : not installed
@capacitor/android : not installed
@capacitor/core : 5.4.0 (C:\Users\505449\Dev\DenverGov\denverdesign\angular\node_modules@capacitor\core)
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : not installed globally

System:

NodeJS : v18.16.1 (C:\Program Files\nodejs\node.exe)
npm : 9.5.1
OS : Windows 10

Additional Information

Adding this code to the global CSS solves the issue without appearing to compromise functionality.
ion-select-popover { ion-radio::part(container) { display: none; } }
If it cannot be set to display: none, this also produced the same result:
ion-select-popover { ion-radio::part(container) { width: 0px; overflow: hidden; } }

Resolving should simply involve changing
ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md::part(container) { opacity: 0; }
to anything that actually takes the radio button out of the flow, instead of just making it transparent. As well as making sure it doesn't also present on ios, of course.

@ionitron-bot ionitron-bot bot added the triage label Feb 6, 2024
@liamdebeasi liamdebeasi added the ionitron: needs reproduction a code reproduction is needed from the issue author label Feb 8, 2024
Copy link

ionitron-bot bot commented Feb 8, 2024

Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.

For a guide on how to create a good reproduction, see our Contributing Guide.

@ionitron-bot ionitron-bot bot removed the triage label Feb 8, 2024
@amandaejohnston
Copy link
Contributor

This issue is being closed due to lack of a reproduction. If this is still a problem in the latest version of Ionic, please open a new issue and ensure the template is fully filled out. Thank you!

@amandaejohnston amandaejohnston closed this as not planned Won't fix, can't repro, duplicate, stale Feb 23, 2024
@ionic-team ionic-team locked and limited conversation to collaborators Feb 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ionitron: needs reproduction a code reproduction is needed from the issue author
Projects
None yet
Development

No branches or pull requests

4 participants