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: alert text does not break words when wrapping #28406

Closed
3 tasks done
csaar95 opened this issue Oct 25, 2023 · 3 comments · Fixed by #28408
Closed
3 tasks done

bug: alert text does not break words when wrapping #28406

csaar95 opened this issue Oct 25, 2023 · 3 comments · Fixed by #28408
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@csaar95
Copy link

csaar95 commented Oct 25, 2023

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

Long options aren't truncated and the "selected" icon is moved out to the left side.

Bildschirmfoto 2023-10-25 um 10 34 10
Bildschirmfoto 2023-10-25 um 10 33 55

Expected Behavior

Long options should truncate (or wrap).

Steps to Reproduce

<IonItem>
  <IonSelect
    label="Favorite fruit"
    labelPlacement="floating"
    value="banana"
  >
    <IonSelectOption value="apple">Apple</IonSelectOption>
    <IonSelectOption value="banana">Babababananaaaaaaaaaaa</IonSelectOption>
    <IonSelectOption value="orange">Orange</IonSelectOption>
  </IonSelect>
</IonItem>

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 7.1.1 (/opt/homebrew/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 7.5.1

Capacitor:

Capacitor CLI : 5.5.0
@capacitor/android : 5.5.0
@capacitor/core : 5.5.0
@capacitor/ios : not installed

Utility:

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

System:

NodeJS : v18.18.2 (/opt/homebrew/Cellar/node@18/18.18.2/bin/node)
npm : 9.8.1
OS : macOS Unknown

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Oct 25, 2023
@liamdebeasi liamdebeasi self-assigned this Oct 25, 2023
@liamdebeasi
Copy link
Contributor

Thanks for the report. The problem here is text should be wrapping to the next line. We don't truncate text to keep the text readable for accessibility purposes. We do have text wrapping built in, however we do not break words to wrap to the next line (we break on whitespace though).

@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Oct 25, 2023
@ionitron-bot ionitron-bot bot removed the triage label Oct 25, 2023
@liamdebeasi liamdebeasi changed the title bug: ion-select-option doesn't truncate bug: alert text does not break words Oct 25, 2023
@liamdebeasi liamdebeasi changed the title bug: alert text does not break words bug: alert text does not break words when wrapping Oct 25, 2023
@liamdebeasi liamdebeasi removed their assignment Oct 25, 2023
github-merge-queue bot pushed a commit that referenced this issue Oct 25, 2023
Issue number: resolves #28406

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

As part of #27898 we
updated the radio and checkbox labels to wrap to the next line instead
of truncate. However, we did not consider long words. As a result, long
words run outside of the container.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- The radio and checkbox labels now break on words too in addition to
white space characters.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: ionitron <[email protected]>
@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #28408, and a fix will be available in an upcoming release of Ionic Framework.

Copy link

ionitron-bot bot commented Nov 24, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants