fix: Profiling 火焰图滚动时关闭 tooltip --bug=160034346 - #11282
Open
liangling0628 wants to merge 1 commit into
Open
Conversation
本次改动: - flame-graph-v2.tsx 新增滚动监听:图表区滚动时通过 echarts hideTip 关闭 tooltip,并同步关闭右键菜单 - window 捕获阶段监听,覆盖祖先滚动容器;onBeforeUnmount 移除监听避免泄漏
|
请在 PR 中添加项目标签,例如: |
|
请在 PR 中添加类型标签,例如: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
TAPD: 【APM-Profiling】火焰图/表格耗时 tips 提示框被遮挡(1010158081160034346)
APM 服务 Profiling 页面,火焰图 tooltip 为 echarts 原生 tooltip 且
appendToBody: false,渲染在图表容器内。图表区存在滚动条,用户滚动后图表内容滚动而 tooltip 停留在原坐标,导致 tooltip 与内容错位、甚至被滚动到不可见区域,表现为「tips 被遮挡」。改动
src/monitor-ui/chart-plugins/plugins/profiling-graph/flame-graph/flame-graph-v2.tsxhandleScroll:滚动时通过chartInstance.dispatchAction({ type: 'hideTip' })关闭 tooltip,并同步关闭右键菜单(showContextMenu=false、contextMenuRect.left=-1)。onMounted中以捕获阶段(capture: true)在window上监听 scroll,可覆盖祖先滚动容器的滚动;onBeforeUnmount移除监听避免泄漏。影响面
src/apm/node_modules/monitor-ui软链被 APM 服务 Profiling 页面复用。测试
Made with Cursor