mattermost/mattermost

LinkTooltip adds elements to DOM when not needed

開放

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

 (5 則留言) (0 個反應) (1 位負責人)TypeScript (7,823 個分叉)batch import
Difficulty/1:EasyHelp WantedTech/ReactJS

倉庫指標

星標
 (32,880 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南