-
Notifications
You must be signed in to change notification settings - Fork 154
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
[GH-255] Add tooltip for pull request and issue links #258
Conversation
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.
This is AMAZING 🎉 I'm really looking forward to seeing this merged
-webkit-hyphens: auto; | ||
-ms-hyphens: auto; | ||
hyphens: auto; | ||
max-height: 150px; |
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.
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.
Well... actually, I gave this a though and decided to do it like that. The thing is, the scrolling is enabled, so you should be able to scroll down there but I have hidden the scrollbar because I thought it was more "elegant" not to show it, but it might seem a bit weird.
Either I could show the scrollbar or I could play around with the 'react-markdown' so it only renders an amount of HTML tags... There are several options in which this could be done... I could also just convert the whole text to one only
with no format and add ellipsis on overflow, i don't know....
I would say that, because of the scope of this issue (which was not actually including the pr/issue description on the tooltip), I would rather decide between keeping it like this or un-hiding the scrollbar. Thoughts?
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.
I'm wondering how much a scrollbar would be actually used. The tooltip is mostly "for a quick glance" and if a user wants for information, the link to the issue/pr is right there.
@asaadmahmood I would like to hear your toughs on this. Is the current solution acceptable to you?
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.
I feel it could be useful... Even though it's a quick glance, sometimes we get a bit lazy about having to open the link, wait the page to load, etc etc. Imagine that maybe you know there's a useful link inside the description that you know is placed at the bottom of it... just scrolling will help you out... But yeah, up to others opinions :)
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.
@hanzei Sorry for replying late guys. I don't think a scrollbar should be needed here, we can just have a max-height or max number or elements, without it cutting off content.
I would also be willing to add a "See more" link above the labels which would just open the PR (similar to the title link) to be very obvious.
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.
it currently has a max-height, which cuts the text off and that's why I've added the ability to scroll (just that I've hidden the scrollbar, but you are allowed to scroll) @asaadmahmood I'm not so sure which is the solution you propose.
Regarding the "See more" link, no problem!
@asaadmahmood A couple of screenshots: |
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, apart from that other change.
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.
My outstanding concerns are not blocking for this PR can be addressed within #252
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.
Fantastic PR! I am looking forward to see it deployed!
Just one small thing, apart of what has been said by other reviewers.
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, thanks!
@hanzei i If you have some time, could you please peer-test this PR using the peer testing process documented here: https://mattermost.atlassian.net/wiki/spaces/INT/pages/619937892/Peer+Testing+Process |
Codecov Report
@@ Coverage Diff @@
## master #258 +/- ##
==========================================
- Coverage 19.69% 19.44% -0.25%
==========================================
Files 10 10
Lines 2178 2216 +38
==========================================
+ Hits 429 431 +2
- Misses 1725 1761 +36
Partials 24 24
Continue to review 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.
Scope
Tooltips work for open and closed
Tooltips works for open, merged and closed PRs
Testing notes
- When a user is connected to GitHub, all five tooltip types are shown correctly.
- When a user is not connected to GitHub, a JS warning will be shown on page load.
@fedealconada Could you please look into this?
Follow-up concerns
None
@hanzei I've just fixed the warning issue, check the changes. |
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.
Thanks for fixing the warning 👍
The CI complains a about these changes:
4:1 error There should be at least one empty line between import groups import/order
5:1 error There should be at least one empty line between import groups import/order
8:33 error 'ownProps' is defined but never used no-unused-vars
9:12 error There should be no space after '{' object-curly-spacing
9:64 error There should be no space before '}' object-curly-spacing
9:65 error Missing semicolon semi
Would you please fix these issue? After that the PR should be ready to go.
@hanzei @fedealconada Not going to go much into the code, but can we have screenshots of how it looks so I can approve/comment on it from a UX perspective? |
@hanzei my bad, I forgot to run the linter. Changes are pushed now :) @asaadmahmood see below the screenshot, the only thing that has changed has been the addition of the "See more" button. Clicking on it opens up a new tab. Hovering over the link looks like this: |
@fedealconada Would it not be possible for us to just add an elipsis after x number of characters and then on a new line add See more? |
@fedealconada Can we also vertically middle align the arrow here. |
Hey @asaadmahmood, I agree, I don't like the text being cut off. I've been digging a bit into that. What I've managed to do is, instead of adding ellipsis, just hide the elements (check image below). Thoughts? |
@fedealconada This looks good to me, but are we sure that solution would work with different PR descriptions? |
Discussed it with @fedealconada, we're going with the overflow trick for now, and may create an improvement issue later. |
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.
Scope
Tooltips work for open and closed
Tooltips works for open, merged and closed PRs
Testing notes
- When a user is connected to GitHub, all five tooltip types are shown correctly.
- When a user is not connected to GitHub, no JS warning is shown. Also, no tooltip is shown.
Follow-up concerns
None
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.
Thanks for the testing help on this @hanzei. Just as a precaution, I also took a quick look on desktop in case you had not reviewed it.
No issues found.
Huge thanks @fedealconada for this PR! This is an great UX improvement!
Summary
This PR adds a tooltip for pull request and issue links
Ticket Link
Fixes #255