-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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: select, long text does not truncate #27081
Comments
@matthew2564 I was struggling with this today. I had to do a workaround by adding labelPlacement="stacked" hope this helps. Fixed: |
Thanks for the workaround @judsonmusic, however there are further issues off the back of this.
This achieves the desired result mentioned above with the output of However, if the length of the selected value exceeds that of the
When selecting all 3 items, this is how it is rendered (where the carets overlay the selected values) With only the removal of the In regards to the |
Thanks for the report. Adding Here is an example: https://codepen.io/liamdebeasi/pen/yLxmqdR You can control the order of the label/control using |
@liamdebeasi can you provide an example using the justify property? Also, my company uses position stacked for everything so it might be worthwhile making sure the docs are updated for this as well. I created a ticket based on the fact that the stacked label for the ion select is off by a few pixels. Just FYI compared to the ion input. |
Sure, we have some playgrounds that show how the justify property works: https://ionicframework.com/docs/api/select#justification
This is #27086, correct? |
That’s correct. It looks like two bugs that I posted actually are going to be fixed. Can you let me know when they will be released?JudsonOn Apr 3, 2023, at 3:04 PM, Liam DeBeasi ***@***.***> wrote:
Sure, we have some playgrounds that show how the justify property works: https://ionicframework.com/docs/api/select#justification
Also, my company uses position stacked for everything so it might be worthwhile making sure the docs are updated for this as well. I created a ticket based on the fact that the stacked label for the ion select is off by a few pixels. Just FYI compared to the ion input.
This is #27086, correct?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Those issues have been labeled as bugs, but they have not been fixed yet. However, once the fixes merge we will post on each thread. |
@liamdebeasi yes, that is correct. I have two other bugs file that are very similar and it looks like they were indeed marked as bugs. At what point will these be released or how will I know so I can pull latest on ionic? Also, I don't know if you'd be willing to do it but I have been doing ionic since it came out. I'm an architect. I was wondering if it's possible to screen share and show you a couple of things before I actually post potential bugs for them. Let me know if that's a possibility you can email me at [email protected] I am on LinkedIn under Judson Terrell. |
We don't provide public timelines on bug fixes since those timelines sometimes change. However, once a bug fix has been merged into I'm fairly active on Discord if you wanted to ask your questions there: https://discord.com/invite/UPYYRhtyzp. Otherwise, feel free to open separate issues here on GitHub. |
@liamdebeasi I joined the discord. What is your discord username? I was going to ping you minors under Judson all capital letters. If you want to add me I'll ping you when I'm in front of my desk in a little bit. |
Does this not invalidate any custom HTML composition? If we do not have true flexibility between separating the label to the element then it feels like this shouldn’t be a warning and more of an error. On another note, why does ‘aria-label’ have any impact on the positioning of the carets themselves? That query is more from inquisitive perspectiveto try and understand the underlying logic/tech more. Another point mentioned above is re the 'aria-labelledby', why is this not sufficient to suppress the warning produced via the element when using 'ion-select'? |
Im using Brave, which uses Chromium
|
Are you able to reproduce this issue in an Ionic starter app and provide a link to the repo? I'm also using Brave with Chromium 111, and the text is truncated correctly. |
https://github.com/matthew2564/ion-select-testing I can also see a similar affect when building to the iPad 9th gen iOS simulator, although this repo has a lot more in it which is why I started the above to check if there were other factors |
Thanks! I can reproduce this issue now. The problem is related to stacked labels in |
Brilliant, and thank you! If you need any more info/examples etc, then just reach out. Thanks! |
Here is a dev build if you are interested in trying a proposed fix: |
Truncation is working fine when specifying But the caret is not locked to the right hand side (when not using Truncation does not work when specifying both Committed and pushed the new version (7.0.2-dev.11680713209.14d9bc55) to https://github.com/matthew2564/ion-select-testing |
I'm not able to reproduce this using the dev build and the following code: <ion-select
placeholder="Select a fruit"
aria-label="fruit"
multiple="true"
fill="outline"
style="border: 3px solid blue;"
labelPlacement="stacked"
[value]="['apple','banana','orange']"
>
<ion-select-option value="apple">Apple</ion-select-option>
<ion-select-option value="banana">Banana</ion-select-option>
<ion-select-option value="orange">Orange</ion-select-option>
</ion-select> Just FYI your That could be why you are not seeing any improvements. |
@liamdebeasi Ah yes nice spot, it now appears to be working my side using |
<!-- Please refer to our contributing documentation for any questions on submitting a pull request, or let us know here if you need any help: https://ionicframework.com/docs/building/contributing --> <!-- Some docs updates need to be made in the `ionic-docs` repo, in a separate PR. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation for details. --> <!-- 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. --> <!-- Issues are required for both bug fixes and features. --> Issue URL: resolves #27081 When using stacked/floating labels the icon needs to be centered with the entire component, not just the placeholder/selected text. As a result, we set `position: absolute`. However, this causes the long selected texts to overlap the icon. This is not happening with non-stacked/floating labels because the icon is `position: relative` and follows the normal document flow. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Moved the icon sizes to sass variables - Added code to set the .native-wrapper width to 100% minus the width of the icon _and_ the additional margin that .select-icon adds ## 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]> Co-authored-by: Brandy Carney <[email protected]>
Hey @liamdebeasi, just confirming if the fix made it into 7.0.2? Tried to bump my boilerplate project and the fix seems to not be there...? matthew2564/ion-select-testing#1 |
The PR for this was merged a few hours after Ionic 7.0.2 went out. You can check the changelog here: https://github.com/ionic-team/ionic-framework/releases/tag/v7.0.2 This fix should be in the next release though. (We release every week) |
<!-- Please refer to our contributing documentation for any questions on submitting a pull request, or let us know here if you need any help: https://ionicframework.com/docs/building/contributing --> <!-- Some docs updates need to be made in the `ionic-docs` repo, in a separate PR. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation for details. --> <!-- 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. --> <!-- Issues are required for both bug fixes and features. --> Issue URL: resolves #27081 When using stacked/floating labels the icon needs to be centered with the entire component, not just the placeholder/selected text. As a result, we set `position: absolute`. However, this causes the long selected texts to overlap the icon. This is not happening with non-stacked/floating labels because the icon is `position: relative` and follows the normal document flow. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Moved the icon sizes to sass variables - Added code to set the .native-wrapper width to 100% minus the width of the icon _and_ the additional margin that .select-icon adds ## 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]> Co-authored-by: Brandy Carney <[email protected]>
<!-- Please refer to our contributing documentation for any questions on submitting a pull request, or let us know here if you need any help: https://ionicframework.com/docs/building/contributing --> <!-- Some docs updates need to be made in the `ionic-docs` repo, in a separate PR. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation for details. --> <!-- 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. --> <!-- Issues are required for both bug fixes and features. --> Issue URL: resolves #27081 When using stacked/floating labels the icon needs to be centered with the entire component, not just the placeholder/selected text. As a result, we set `position: absolute`. However, this causes the long selected texts to overlap the icon. This is not happening with non-stacked/floating labels because the icon is `position: relative` and follows the normal document flow. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Moved the icon sizes to sass variables - Added code to set the .native-wrapper width to 100% minus the width of the icon _and_ the additional margin that .select-icon adds ## 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]> Co-authored-by: Brandy Carney <[email protected]>
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. |
Prerequisites
Ionic Framework Version
v7.x
Current Behavior
Ionic now suggests adding a
label
oraria-label
to tags such asion-select
which is highlighted via this console warningUpon adding an
aria-label
attribute to theion-select
, the positioning of the up / down carets on the right hand side comes inwards. Here is a basic code exampleThe result of that being...
Expected Behavior
I would expect the position of the carets to remain the same as without the
aria-label
attribute.In the below example, the carets remain in the position expected.
The result of that being...
Steps to Reproduce
Current Behaviour
sectionCode Reproduction URL
No response
Ionic Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: