-
Notifications
You must be signed in to change notification settings - Fork 86
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
make ui menu accept maxWidth to avoid text truncation #870
base: develop
Are you sure you want to change the base?
Conversation
Hi @lokesh-sagi125, would you upload some screenshots of how the output would look like for learningequality/kolibri#5557? Also, what changes you did in Kolibri after having this KDS update available to achieve that - do you have a Kolibri working branch you could reference? At first sight, I don't understand the connection of this work to the problem with the file size being pushed out - this would help me to connect the dots. |
Oh I just noticed @AlexVelezLl's #858 (comment). Alright, it seems fine (generally I'd recommend you always upload screenshots to pull requests so reviewers don't need to do the detective work :) One question I had is if the title part gets truncated? It's correct that the title takes less space so the file size is always visible, but if the whole of the title is not visible, we should still show the ellipsis ... |
Oh @MisRob, In this case we should show the whole string without it being truncated because this string is not a user string, but a system string. In this context the string is showing the different files from a resource that can be downloaded (e.g. "Document", "thumbnail", "HTML"). So, if we truncate this string, the message could be a little confusing, and the user might not be able to understand what is they downloading, so thats why Blaine suggested that the better option here is to show the full message and avoid truncating a system string:
|
I see @AlexVelezLl, so can I understand right that the string will take more lines in the case you describe? I think that'd be fine, the main thing is that the whole text is visible. |
Hmm no @MisRob, the long string will be all placed in just one line like this, but will not get truncated: |
Description
override the max-width set by this component UiMenu. And for this, we will need to update our KDropdownMenu component to accept a new prop maxWidth that will then be passed to the UiMenu component.
Issue addressed
learningequality/kolibri#5557
Addresses learningequality/kolibri#5557
Changelog