-
Notifications
You must be signed in to change notification settings - Fork 479
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
Update "used by" display and tooltip styling #26262
base: main
Are you sure you want to change the base?
Changes from 2 commits
accaa4d
9867112
11791c5
5a1dade
da1b9a8
047fd8e
563c375
217c1da
c344dd4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Updated the styling of the "Used by" line on host details page to be easier to read and include more data in the tooltip |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ const getDeviceUserTipContent = (deviceMapping: IDeviceUser[]) => { | |
const format = (d: IDeviceUser) => | ||
d.source ? `${d.email} (${d.source})` : d.email; | ||
|
||
return deviceMapping.slice(1).map((d) => ( | ||
return deviceMapping.map((d) => ( | ||
<span key={format(d)}> | ||
{format(d)} | ||
<br /> | ||
|
@@ -130,10 +130,10 @@ const About = ({ | |
displayPrimaryUser = email; | ||
} else { | ||
displayPrimaryUser = ( | ||
<> | ||
<span className="device-mapping__primary-user"> | ||
{email}{" "} | ||
<span className="device-mapping__source">{`(${source})`}</span> | ||
</> | ||
</span> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New class to allow for truncating the email w/ ellipses. |
||
); | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,15 +16,20 @@ | |
.component__tooltip-wrapper__element { | ||
max-width: 350px; | ||
} | ||
|
||
&__data { | ||
.device-mapping { | ||
&__source { | ||
color: $ui-fleet-black-75; | ||
} | ||
&__more { | ||
color: $ui-fleet-black-50; | ||
Comment on lines
-22
to
-26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These were not being used because __data isn't a thing in this component as far as I can see. Moved them out from under __data and now the "More" link is grey as intended. |
||
} | ||
|
||
.device-mapping { | ||
&__source { | ||
color: $ui-fleet-black-75; | ||
} | ||
&__more { | ||
color: $ui-fleet-black-50; | ||
} | ||
&__primary-user { | ||
max-width: 270px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This allows for up to "+ 999 more" without cutting of the "more" text. |
||
text-overflow: ellipsis; | ||
overflow: hidden; | ||
display: inline-block; | ||
vertical-align: text-bottom; | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Show all emails in the tooltip, since the first one may be truncated.