mattermost/mattermost

LinkTooltip adds elements to DOM when not needed

オープン

#19,721 opened on 2022/03/07

 (5 件のコメント) (0 件のリアクション) (1 人の担当者)TypeScript (7,823 件のフォーク)batch import
Difficulty/1:EasyHelp WantedTech/ReactJS

Repository metrics

Stars
 (32,880 個のスター)
PR merge metrics
 (平均マージ 6d 5h) (30d で 318 merged PRs)

説明

Right now, each Markdown link in each post in Mattermost mounts a LinkTooltip component which renders a div in the DOM, even if there is no tooltip for the given link. Due to the current plugin API for those tooltips though, it doesn’t seem like we can completely remove the LinkTooltip component when a link doesn’t support a tooltip.

We should make it so that we only render anything in the DOM for the link tooltip if the user is actively hovering over the link. That way, we’ll only render up to one Portal at a time.


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-42344

コントリビューターガイド