-
Notifications
You must be signed in to change notification settings - Fork 3k
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
docs: item does not account for new text wrapping behavior #3313
Comments
Thanks! We added text wrapping to |
Thanks. What is the recommended method to enable |
You can use |
The browser is working correctly here. |
Ideally it would be possible [just to wrap all text], but because virtual-scrolling makes variable-height items difficult (or impossible, without a good library available), we have to truncate in any place where VS is used. Or when a side-panel is opened and we don't want to cause a ton of layout shift: (layout needs to stay where it is when side panel is opened...) |
Ah I see, that's too bad. In that case I'd recommend setting |
Sorry, I'm not seeing the difference in behavior. Do you have a minimal repro? |
https://stackblitz.com/edit/angular-zx6jyk?file=src%2Fapp%2Fexample.component.html
|
@liamdebeasi Did you see my reproduction of the layout breaking issue? #3313 (comment) Is this expected? Prior to 7.6.0, Ionic would dynamically size the label/inner content of the item to fit between the 'start' and 'end' slot content. |
Yes I did. I am discussing with the team regarding this. Sorry, the issue got closed automatically when #3314 merged since it was linked in the PR description. |
Thanks, gotcha! No worries. I just wanted to make sure it didn't get lost. Looking forward to hearing what you figure out. |
I spoke with the team, and the We changed this from The reason why your |
Thanks @liamdebeasi -- Interesting. I'm not a flex-box expert. What is the best way to undo this change in our CSS? Even with EDIT: Actually I think the issue may be that we need to know the best way to target the |
Just a heads up, the team is having discussions into revising part of the text wrapping behavior. In particular, we are considering not having the end/start slot content wrap to the next line. In other words, only the text in the default slot would wrap within its own container. We are having this discussion based on some new information we've found related to how iOS handles wrapping. We're tracking this in ionic-team/ionic-framework#28769. If we end up making this change this should address the issue you noted in #3313 (comment). |
Thanks Liam. Glad to hear further discussion is happening. To be honest, this issue has blocked us from updating to the latest Ionic versions. Even after auditing every screen, we can't come up with a global ruleset to fix the issues caused by this change. It's forcing us to add custom styles to every element. We're very close to forking |
Prerequisites
Ionic Framework Version
v7.x
Current Behavior
Ellipsis is no longer working as of Ionic 7.6.0
Expected Behavior
Text should wrap/ellipsis when labels get too long in
ion-item
components unlession-text-wrap
styles are applied.Steps to Reproduce
Visit the documentation for
ion-item
. See the error in the basic usage section:https://ionicframework.com/docs/api/item#basic-usage
Code Reproduction URL
https://ionicframework.com/docs/api/item#basic-usage
Ionic Info
Ionic:
Ionic CLI : 7.1.1 (/Users/lincoln/.nvm/versions/node/v16.14.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.6.0
@angular-devkit/build-angular : 17.0.6
@angular-devkit/schematics : 17.0.6
@angular/cli : 17.0.6
@ionic/angular-toolkit : 10.0.0
Additional Information
No response
The text was updated successfully, but these errors were encountered: