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

fix: add tooltip for long title in list view ui #9792

Merged
merged 2 commits into from Sep 27, 2022

Conversation

saumeya
Copy link
Contributor

@saumeya saumeya commented Jun 27, 2022

closes #9752

Screenshot from 2022-06-27 17-38-30

Signed-off-by: saumeya saumeyakatyal@gmail.com

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

@saumeya saumeya requested a review from keithchong June 27, 2022 12:19
@codecov
Copy link

codecov bot commented Jun 27, 2022

Codecov Report

Base: 45.76% // Head: 45.76% // No change to project coverage 👍

Coverage data is based on head (5dcd578) compared to base (49487ea).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9792   +/-   ##
=======================================
  Coverage   45.76%   45.76%           
=======================================
  Files         236      236           
  Lines       28529    28529           
=======================================
  Hits        13055    13055           
  Misses      13669    13669           
  Partials     1805     1805           
Impacted Files Coverage Δ
util/settings/settings.go 51.36% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@ciiay ciiay left a comment

Choose a reason for hiding this comment

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

Hi Saumeya, I see you hard coded the length where you want to add the tooltip. There should be a better/smarter way to decide whether or not to display the tooltip. Check this link out and see if it makes sense to you.

@saumeya
Copy link
Contributor Author

saumeya commented Jun 29, 2022

Hi Saumeya, I see you hard coded the length where you want to add the tooltip. There should be a better/smarter way to decide whether or not to display the tooltip. Check this link out and see if it makes sense to you.

Makes sense Yi, I would look into this. Thanks!

@saumeya
Copy link
Contributor Author

saumeya commented Jul 26, 2022

Hi @ciiay I took a look at this suggestion, the problem to implement that is we need to use useRef hook to get the div to check if ellipsis exists. Given that this field is within a table (loop) the ref doesn't get updated each time. There could be other possible solutions, but I guess given that this issue is minor, a constant length should be fine.

@keithchong
Copy link
Contributor

I agree with @ciiay . The constant there doesn't fit in all situations. For example, if you adjust the browser's zoom (zoom out), so that there is no truncation, then the tooltip still appears.

Why not just show the tooltip all the time, whether it is needed or not? The Source URL in the column to the right of the Name, does that:

@saumeya
Copy link
Contributor Author

saumeya commented Aug 21, 2022

@keithchong @ciiay could you review and merge?

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Copy link
Contributor

@keithchong keithchong left a comment

Choose a reason for hiding this comment

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

LGTM. Something that is independent of this fix, but the layout of the row seems unpolished when the width of the table is decreased.

@keithchong keithchong merged commit 7cb6dae into argoproj:master Sep 27, 2022
ashutosh16 pushed a commit to ashutosh16/argo-cd that referenced this pull request Oct 7, 2022
* fix: add tooltip for long title in list view ui

Signed-off-by: saumeya <saumeyakatyal@gmail.com>

* review comments

Signed-off-by: saumeya <saumeyakatyal@gmail.com>

Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Long application names become unreadable in the UI - List view
3 participants