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

[dashboard] Add tooltip to project names #5323

Merged
merged 1 commit into from
Aug 25, 2021

Conversation

laushinka
Copy link
Contributor

@laushinka laushinka commented Aug 23, 2021

Fixes #5122

@laushinka
Copy link
Contributor Author

Fixes #5122

@laushinka laushinka marked this pull request as ready for review August 23, 2021 13:26
@gtsiolis
Copy link
Contributor

gtsiolis commented Aug 23, 2021

Looking at this now! 👀

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

Looks good @laushinka! 🏀

Left one minor comment regarding UX. Feel free to open a follow up issue for this if you think it will significantly increase the scope of this PR. 🏓

Cross-posting #5122 (comment) for visibility. 👀

@@ -91,7 +91,9 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) {
</ItemFieldIcon>
<ItemField className="w-3/12 flex flex-col">
<a href={startUrl.toString()}><div className="font-medium text-gray-800 dark:text-gray-200 truncate hover:text-blue-600 dark:hover:text-blue-400">{ws.id}</div></a>
<a href={project ? 'https://' + project : undefined}><div className="text-sm overflow-ellipsis truncate text-gray-400 dark:text-gray-500 hover:text-blue-600 dark:hover:text-blue-400">{project || 'Unknown'}</div></a>
<Tooltip content={project ? 'https://' + project : ''}>
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: Could we enforce a max width for the tooltip component as the tooltip overflows the container width when the path is long?

Frame 38

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Haha I wrote my comment just when you wrote this one.

@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: 80ffa61b199b45e6f24eb1a822819b4c4bbb1203

@laushinka
Copy link
Contributor Author

@gtsiolis At first I set a max width for it, but then I decided against it since it's a temporary solution and we wanted users to be able to see the whole link for now. Let me know what you think :)

@gtsiolis
Copy link
Contributor

gtsiolis commented Aug 23, 2021

... but then I decided against it since it's a temporary solution and we wanted users to be able to see the whole link for now.

@laushinka Sounds mergeable! I'd only add a max width and allow text wrapping to avoid overflowing the body container. Feel free to pass this to someone for taking a closer look at the code, too. Skipping the max width could also suffice for now. Let's see what other think.

@gtsiolis
Copy link
Contributor

note: Because of #5323 (comment), you'll also need an approval from someone from the engineering team. Cc @laushinka

@laushinka
Copy link
Contributor Author

... but then I decided against it since it's a temporary solution and we wanted users to be able to see the whole link for now.

@laushinka Sounds mergeable! I'd only add a max width and allow text wrapping to avoid overflowing the body container. Feel free to pass this to someone for taking a closer look at the code, too. Skipping the max width could also suffice for now. Let's see what other think.

No worries, definitely no strong feelings against adding the max-width and wrapping it. Will make the changes now :)

@laushinka laushinka force-pushed the laushinka/dashboard-long-project-5122 branch from ab050e5 to ecb0f92 Compare August 23, 2021 15:52
@roboquat roboquat removed the lgtm label Aug 23, 2021
@gtsiolis
Copy link
Contributor

gtsiolis commented Aug 24, 2021

/werft run

👍 started the job as gitpod-build-laushinka-dashboard-long-project-5122.4

@laushinka laushinka force-pushed the laushinka/dashboard-long-project-5122 branch from ecb0f92 to 24c0384 Compare August 24, 2021 07:42
@JanKoehnlein
Copy link
Contributor

Thanks! Could you squash the changes?

@laushinka laushinka force-pushed the laushinka/dashboard-long-project-5122 branch from 24c0384 to cb59e10 Compare August 24, 2021 09:46
@JanKoehnlein
Copy link
Contributor

/lgtm

@roboquat roboquat added the lgtm label Aug 24, 2021
@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: b51b65f5e959cae631b685631373f576eac837c3

@laushinka laushinka force-pushed the laushinka/dashboard-long-project-5122 branch from cb59e10 to 3a79668 Compare August 24, 2021 12:05
@roboquat roboquat added approved and removed lgtm labels Aug 24, 2021
@JanKoehnlein
Copy link
Contributor

/lgtm

@roboquat roboquat added the lgtm label Aug 25, 2021
@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: 2caa4efb0e156bc3cd335b6883318951455ce7ee

@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gtsiolis, JanKoehnlein

Associated issue: #5122

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@roboquat roboquat merged commit edb680b into main Aug 25, 2021
@roboquat roboquat deleted the laushinka/dashboard-long-project-5122 branch August 25, 2021 08:10
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.

[dashboard] Long project names are cut of which makes them hard to tell apart
4 participants