mattermost/mattermost

LinkTooltip adds elements to DOM when not needed

Open

#19,721 建立於 2022年3月7日

在 GitHub 查看
 (5 留言) (0 反應) (1 負責人)TypeScript (32,880 star) (7,823 fork)batch import
Difficulty/1:EasyHelp WantedTech/ReactJS

描述

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

貢獻者指南

LinkTooltip adds elements to DOM when not needed · mattermost/mattermost#19721 | Good First Issue