Skip to content

[MM-166] Fix issue: decription not visible in tooltip and removed "see more" link - #735

Merged
mickmister merged 5 commits into
mattermost:masterfrom
Brightscout:MM-734
Feb 7, 2024
Merged

[MM-166] Fix issue: decription not visible in tooltip and removed "see more" link#735
mickmister merged 5 commits into
mattermost:masterfrom
Brightscout:MM-734

Conversation

@raghavaggarwal2308

Copy link
Copy Markdown

Summary

  • Fix issue: description not visible in tooltip.
  • Removed the see more link in the tooltip.
  • Set a max length for the tooltip description.

Screenshot

image

What to test

  • Description and other contents are visible in the tooltip properly.
  • "See more" link is removed
  • When the description is very long it's getting trimmed.
Steps to test:
  1. Connect your GitHub account
  2. Hover over a PR/Issue link.

Ticket Link

Fixes #734

Comment thread webapp/src/components/link_tooltip/link_tooltip.jsx Outdated
Comment on lines -69 to -71
max-height: 150px;
line-height: 1.25;
overflow: hidden;

@mickmister mickmister Jan 30, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What are the reasons/risks for this change?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@mickmister This was being used to trim the description when it was too long. We modified the logic to set a max length to the description now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's still possible that it overflows though right? Is there any risk in keeping overflow: hidden?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@mickmister I don't think it will overflow but there is no risk in keeping it so I have reverted the change

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Was it the overflow: hidden that was making it so the description wasn't being shown at all?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@mickmister No, the component ReactMarkdown was not used properly.

<div className='markdown-text mt-1 mb-1'>
<ReactMarkdown
source={data.body}
linkTarget='_blank'

@mickmister mickmister Jan 30, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is the risk in removing this linkTarget prop?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@mickmister I misunderstood the use of this prop. Added it back

@mickmister mickmister left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great job @raghavaggarwal2308 👍 Looks good, just a few comments for discussion

@codecov-commenter

codecov-commenter commented Jan 31, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2608197) 15.78% compared to head (ff27370) 15.78%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #735   +/-   ##
=======================================
  Coverage   15.78%   15.78%           
=======================================
  Files          15       15           
  Lines        5770     5770           
=======================================
  Hits          911      911           
  Misses       4817     4817           
  Partials       42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread webapp/src/components/link_tooltip/link_tooltip.jsx
Comment on lines -69 to -71
max-height: 150px;
line-height: 1.25;
overflow: hidden;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's still possible that it overflows though right? Is there any risk in keeping overflow: hidden?

@hanzei hanzei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread webapp/src/components/link_tooltip/tooltip.css Outdated
@hanzei hanzei added the 2: Dev Review Requires review by a core committer label Feb 2, 2024
@hanzei hanzei added 3: QA Review Requires review by a QA tester and removed 2: Dev Review Requires review by a core committer labels Feb 6, 2024

@AayushChaudhary0001 AayushChaudhary0001 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This PR has been tested for the following scenarios:-

  • Added description in the tooltip.
  • Removed the "See more" link from the tooltip.
  • Text gets trimmed if its length is too much.

The PR is working fine for the above conditions, LGTM. Approved.

@hanzei hanzei added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester labels Feb 7, 2024
@mickmister
mickmister merged commit 1d43e9e into mattermost:master Feb 7, 2024
@raghavaggarwal2308
raghavaggarwal2308 deleted the MM-734 branch February 8, 2024 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4: Reviews Complete All reviewers have approved the pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue/PR descriptions not showing in link tooltips

5 participants