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

ui: create tooltip component #11363

Merged
merged 1 commit into from
Oct 21, 2021
Merged

ui: create tooltip component #11363

merged 1 commit into from
Oct 21, 2021

Conversation

lgfa29
Copy link
Contributor

@lgfa29 lgfa29 commented Oct 21, 2021

After using #11358 for a bit, I was quickly annoyed with the unnecessarily wide tooltip when client names are relatively short. This PR creates a Tooltip component that ellipsizes the tooltip text content in the middle, keeping it short enough to fit into a single-line tooltip.

Before:
image

After:
image
image

Ellipsizing in the middle allow users to glance at the beginning and end of text. This is important for client names since they are often prefixed and indexed in a standard format. Cutting off the end of the string would make impossible to distinguish between nomad-client-with-long-name-1 and nomad-client-with-long-name-2.

Using multiline was also not helpful in the case where client names had no spaces.

The value used as a threshold to decide if the text must be ellipsized is fairly arbitrary and can be adjusted based on user feedback.

No changelog since this fixes an unreleased feature.

@lgfa29 lgfa29 requested a review from ChaiWithJai October 21, 2021 16:16
Copy link
Contributor

@ChaiWithJai ChaiWithJai left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link

Ember Asset Size action

As of 885169c

Files that got Bigger 🚨:

File raw gzip
nomad-ui.js +801 B +119 B

Files that stayed the same size 🤷‍:

File raw gzip
vendor.js 0 B 0 B
nomad-ui.css 0 B 0 B
vendor.css 0 B 0 B

@lgfa29 lgfa29 added this to the 1.2.0 milestone Oct 21, 2021
@github-actions
Copy link

Ember Test Audit comparison

main 885169c change
passes 1193 1194 +1
failures 0 0 0
flaky 0 0 0
duration 10m 02s 733ms 8m 24s 739ms -1m 37s 994ms

@lgfa29 lgfa29 merged commit d599c63 into main Oct 21, 2021
@lgfa29 lgfa29 deleted the ui-tooltip-component branch October 21, 2021 17:12
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants