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
fix: add tooltip for long title in list view ui #9792
Conversation
Codecov ReportBase: 45.76% // Head: 45.76% // No change to project coverage 👍
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
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. |
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.
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! |
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. |
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: argo-cd/ui/src/app/applications/components/applications-list/applications-source.tsx Line 10 in 3f858f5
|
db515c9
to
61c8922
Compare
@keithchong @ciiay could you review and merge? |
61c8922
to
abd1d3b
Compare
abd1d3b
to
71a519c
Compare
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
Signed-off-by: saumeya <saumeyakatyal@gmail.com>
71a519c
to
5dcd578
Compare
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.
LGTM. Something that is independent of this fix, but the layout of the row seems unpolished when the width of the table is decreased.
* 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>
closes #9752
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: