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

Only render tooltip on hover #368

Merged
merged 1 commit into from
Sep 22, 2020
Merged

Only render tooltip on hover #368

merged 1 commit into from
Sep 22, 2020

Conversation

hanzei
Copy link
Contributor

@hanzei hanzei commented Sep 18, 2020

Summary

Make use of the show prop added in mattermost/mattermost-webapp#6492 by only rendering the tooltip on hover. This means data is not longer pre-fetched. Therefore a small delay is visible when hovering. Please note, on re-hovering the link the tooltip is shown imminently. Switching channel caused the data to be lost and it's required to fetch is again. I opted for this approach because storing the data in redux would mean that we would have to clean it up from time to time and it's hard to figure out what data should be cleaned up.

The change is backward compatible to

I did also simplify the existing code a bit.

Ticket Link

https://mattermost.atlassian.net/browse/MM-28591

@hanzei hanzei added 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester labels Sep 18, 2020
@hanzei hanzei added this to the v2.0.0 milestone Sep 18, 2020
@codecov-commenter
Copy link

Codecov Report

Merging #368 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #368   +/-   ##
=======================================
  Coverage   19.64%   19.64%           
=======================================
  Files          11       11           
  Lines        2708     2708           
=======================================
  Hits          532      532           
  Misses       2138     2138           
  Partials       38       38           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9247ee...302f284. Read the comment docs.

@hanzei hanzei mentioned this pull request Sep 18, 2020
17 tasks
Copy link
Contributor

@mickmister mickmister left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the backwards compatible check

@hanzei hanzei removed the 2: Dev Review Requires review by a core committer label Sep 22, 2020
Copy link

@DHaussermann DHaussermann left a comment

Choose a reason for hiding this comment

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

Tested and passed.

  • Works as expected when corresponding webapp PR is in place
  • No regressions found on older server versions

See mattermost/mattermost-webapp#6492 fore details.
LGTM!

@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 Sep 22, 2020
@hanzei hanzei merged commit 2a417ac into master Sep 22, 2020
@hanzei hanzei deleted the MM-28591 branch September 22, 2020 23:09
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.

5 participants