Skip to content

fix: Profiling 火焰图滚动时关闭 tooltip --bug=160034346 - #11282

Open
liangling0628 wants to merge 1 commit into
TencentBlueKing:masterfrom
liangling0628:fix/opus/#160034346
Open

fix: Profiling 火焰图滚动时关闭 tooltip --bug=160034346#11282
liangling0628 wants to merge 1 commit into
TencentBlueKing:masterfrom
liangling0628:fix/opus/#160034346

Conversation

@liangling0628

@liangling0628 liangling0628 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

背景

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.tsx
    • 新增滚动监听 handleScroll:滚动时通过 chartInstance.dispatchAction({ type: 'hideTip' }) 关闭 tooltip,并同步关闭右键菜单(showContextMenu=falsecontextMenuRect.left=-1)。
    • onMounted 中以捕获阶段(capture: true)在 window 上监听 scroll,可覆盖祖先滚动容器的滚动;onBeforeUnmount 移除监听避免泄漏。

影响面

  • 仅影响 Profiling 火焰图(flame-graph-v2)的 tooltip / 右键菜单在滚动时的关闭行为,不改变其它交互。
  • 该文件通过 src/apm/node_modules/monitor-ui 软链被 APM 服务 Profiling 页面复用。

测试

  • APM → 服务 → Profiling:hover 火焰图出 tooltip → 滚动图表区 → tooltip 立即关闭,不再漂移/被遮挡
  • 右键节点出现菜单 → 滚动 → 菜单关闭
  • 不滚动时 tooltip / 右键菜单交互正常

Made with Cursor

本次改动:
- flame-graph-v2.tsx 新增滚动监听:图表区滚动时通过 echarts hideTip 关闭 tooltip,并同步关闭右键菜单
- window 捕获阶段监听,覆盖祖先滚动容器;onBeforeUnmount 移除监听避免泄漏
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

请在 PR 中添加项目标签,例如:project/monitorproject/apmproject/logproject/publicproject/aiops

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

请在 PR 中添加类型标签,例如:fixfeatdocsstylerefactortestchoremerge, perf

@tencentblueking-adm

tencentblueking-adm commented Jul 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants