style: refine outline tree rendering#151
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe outline panel item renderer is refactored from rectangle-background/level-label rendering to a bullet-and-pill layout with tree-guide vertical segments and branch connectors. Layout constants are adjusted, and font/color logic is updated. Two new helper functions ( ChangesOutline Panel Bullet+Pill Rendering Refactor
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/ui/outline_panel.rs`:
- Around line 1297-1302: The on_hover_text call is hardcoding English UI text
and using badge glyphs from item_badge_text(item) as the type identifier, which
breaks localization and makes the tooltip non-human-readable. Replace the
hardcoded format string with a localized/translated template that includes
placeholders for type, title, and line number. Create a separate readable
type-name helper function (instead of using item_badge_text which returns
glyphs) that returns a human-readable type description for each item, and use
that helper in the translated template to provide semantic meaning in the
tooltip.
- Around line 1183-1208: The tree guide visualization is missing a downward stem
that connects expandable nodes to their first child row. Currently, ancestor
columns and horizontal branches are drawn in the shown code block, but there is
no vertical line extending downward from the bullet center when a node has
children. Add a vertical line segment from bullet_center.y downward to the top
of the next row (or a reasonable distance downward) to visually connect parent
nodes to their first child. This line should only be drawn when the node is
expandable and can be added after the existing horizontal branch line drawing
code using ui.painter().line_segment with the same guide_stroke style, using the
same x position as the downward stem of the current indentation level.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
|
Fresh refresh on PR 151: the latest CI run I also re-ran |
Description
Refines the right-side outline panel into a slimmer tree-style navigation view. The rendering continues to use the existing configured accent color, so no user-specific color is hardcoded.
Related: #132
Type of Change
Changes Made
src/ui/outline_panel.rs.Screenshots
If this PR includes UI changes, please add before/after screenshots:
Checklist
cargo fmtand it produces no changescargo clippyand it produces no warningscargo testand all tests passcargo build --releasesuccessfullyBreaking Changes
None.
Testing
git diff --checkcargo check --bin ferriteAdditional Notes
cargo check --bin ferritepasses with the same three pre-existing video embed unused warnings. I did not include a broadcargo fmtrun because the current tree contains unrelated formatting diffs in files outside this change; this PR avoids that noise.Summary by CodeRabbit