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

Modified CSS So That Text Wrapping Does Not Occur #7473

Merged
merged 1 commit into from
Feb 5, 2021

Conversation

DavidResende0
Copy link
Member

Found in Services -> Workloads -> VMs and Instances

Fixes: #10465 (2nd issue)

Preview:

@skateman
Copy link
Member

skateman commented Nov 6, 2020

@DavidResende0 I need a before/after screenshot to see the differences

@DavidResende0
Copy link
Member Author

DavidResende0 commented Nov 6, 2020

Here's the before:
image

It's also worth noting that different strings will get cutoff and wrapped around in different languages.

@skateman
Copy link
Member

skateman commented Nov 9, 2020

This causes the summary screen tables to be not aligned:
Screenshot from 2020-11-09 15-51-34

I'm not sure if this is something we want...cc @himdel @gtanzillo

@himdel
Copy link
Contributor

himdel commented Nov 9, 2020

This is limited to labels in textual summary tables, so it should be safe if we can make sure the label always fits 👍.

But I'm worried about i18n + long labels not leaving enough space for the actual content. Chinese is probably fine but do we know the longest German label in textual summaries?

@himdel
Copy link
Contributor

himdel commented Nov 9, 2020

Oh, one more issue..

white-space: nowrap;
width: 20% !important;

That's probably an impossible combination, so the browser will always choose to ignore the width and autosize the table anyway (as long as there is a label wider than that). (Leading to the alignment issue David has found.)

@skateman
Copy link
Member

skateman commented Nov 9, 2020

But I'm worried about i18n + long labels not leaving enough space for the actual content. Chinese is probably fine but do we know the longest German label in textual summaries?

True, Donaudampfschiffahrtselektrizitätenhauptbetriebswerkbauunterbeamtengesellschaft will probably break it, but even Arbeitsunfähigkeitsbescheinigung cc @mzazrivec

@DavidResende0
Copy link
Member Author

After doing some digging I've found the cause of the original issue:

table.table td:not(.table-view-pf-select) {
//Force word break but prevent bs-switch from wrapping
word-break: break-all;
}
however, this class seems to be used a lot in the code so rather than changing it I think it would be better to make a new class specifically for the textual summary tables. The only issue is I don't know what file renders the tables.

@DavidResende0
Copy link
Member Author

DavidResende0 commented Jan 6, 2021

The change I made plus this PR (ManageIQ/react-ui-components#185) should resolve the issue now

@skateman skateman assigned himdel and unassigned skateman Jan 7, 2021
Copy link
Contributor

@himdel himdel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidResende0 DavidResende0 force-pushed the services-workloads-fix branch from 9e0989c to 83fe5b6 Compare February 4, 2021 15:44
@miq-bot
Copy link
Member

miq-bot commented Feb 4, 2021

Checked commit DavidResende0@83fe5b6 with ruby 2.6.3, rubocop 0.82.0, haml-lint 0.35.0, and yamllint
0 files checked, 0 offenses detected
Everything looks fine. 🏆

@himdel himdel merged commit 4949085 into ManageIQ:master Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants