Skip to content

fix(ui): timeline level3 dot clippath and box-shadow conflict#633

Merged
Nagi-ovo merged 5 commits into
Nagi-ovo:mainfrom
u5n:fix/triangle-timeline-dot-shadowfix
Apr 25, 2026
Merged

fix(ui): timeline level3 dot clippath and box-shadow conflict#633
Nagi-ovo merged 5 commits into
Nagi-ovo:mainfrom
u5n:fix/triangle-timeline-dot-shadowfix

Conversation

@u5n
Copy link
Copy Markdown
Contributor

@u5n u5n commented Apr 25, 2026

Description / 描述

现在的第三层级节点是三角形, 在active之后没有阴影效果, 这是因为clippath和box-shadow冲突了
css加个before解决

bug1

复现方法: 设置节点为三角形, 点击该节点, 发现无高亮
我用人工微调的方法修复了下, 尽可能做到了最接近正方形和圆形的样式

bug2(我不知道怎么解决)

复现方法: 设置节点为三角形,, 按tab聚焦到该节点的时候, 发现没有圆环阴影
这个我没解决, 感觉很难复现和正方形和圆形节点一样的 focus-visible 效果

Visual Proof / 可视化证据

如图, 移动到最顶部(其实这还有个bug, 如果对话太短不会高亮第一个)的时候, 无法高亮

image

修复后

image

Browser Testing / 浏览器测试

  • Chrome / Edge (Chromium): Tested / 已测试
  • Firefox: Tested (Mandatory) / 已测试(必填)
  • Safari: 未测试

Checklist / 检查清单

  • I have manually verified that the feature works as intended. / 我已手动验证功能按预期工作。
  • I have confirmed that this PR does not break existing functionality. / 我已确认此 PR 不会破坏原有功能。
  • I have run bun run lint, bun run typecheck, bun run format and bun run build. / 我已运行代码校验、类型检查、格式化及构建。
  • I have added/updated necessary tests and they pass (bun run test). / 我已添加/更新了必要的测试并确保通过(bun run test)。

代码校验记录


Open in Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

u5n and others added 2 commits April 25, 2026 22:26
…adow

box-shadow gets clipped by clip-path, so :focus-visible on triangle
dots had no visible focus ring. drop-shadow follows the rendered
silhouette and renders the glow correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Nagi-ovo Nagi-ovo merged commit aba5eef into Nagi-ovo:main Apr 25, 2026
1 check passed
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 6 additional findings in Devin Review.

Open in Devin Review

Comment thread public/contentStyle.css
Comment on lines +257 to +259
.timeline-dot[data-level='3']:hover::before {
transform: translate(-50%, -50%) scale(1.15);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Hover scale on ::before for active level-3 dots is dead code due to CSS source order

.timeline-dot[data-level='3']:hover::before (line 257) and .timeline-dot[data-level='3'].active::before (line 262) have identical specificity (0,3,1). Because the .active::before rule appears after the :hover::before rule in the source, its transform: translate(-50%, -50%) always overrides the hover rule's transform: translate(-50%, -50%) scale(1.15) when both conditions are true. Since ::before only has content (and is thus only visible) when the dot is .active, the hover rule at line 257 can never produce a visible effect — it is dead code. For non-active dots, ::before has no content so hover does nothing; for active dots, the later rule wins. This means hovering an active level-3 triangle won't scale its glow background, unlike levels 1 and 2 where ::after's box-shadow scales with the transform.

Prompt for agents
The hover scale rule for the level-3 ::before pseudo-element at line 257-259 is overridden by the .active::before rule at line 262-273 due to equal specificity and later source order. Since ::before only renders when the dot is .active (it sets content: ''), this hover rule never has any visible effect.

To fix, either:
1. Remove the dead rule at lines 257-259 and instead add a combined selector after line 273:
   .timeline-dot[data-level='3'].active:hover::before { transform: translate(-50%, -50%) scale(1.15); }
2. Or move the hover rule to after the .active::before rule block (after line 273).

Option 1 is more precise because it only applies the scale when the ::before is actually visible (i.e., when the dot is active).
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@u5n u5n deleted the fix/triangle-timeline-dot-shadowfix branch April 25, 2026 21:14
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