Implement ruler bounds visualization for the AABB of selected layers#4090
Merged
Implement ruler bounds visualization for the AABB of selected layers#4090
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request implements selection indicators on the document rulers, allowing users to see the extent of selected nodes directly on the ruler axes. The backend now calculates the selection's bounding box and transmits it to the frontend, which renders a line and endpoints on the RulerInput components. My feedback focuses on cleaning up a redundant CSS variable definition and correcting a CSS selector change that appears to break the layout of the top ruler.
Contributor
There was a problem hiding this comment.
2 issues found across 5 files
Confidence score: 4/5
- This PR is likely safe to merge, with only minor UI/CSS issues and no indication of functional breakage or data risk.
- Most severe issue: in
frontend/src/components/panels/Document.svelte,.top-ruler .ruler-wrapperno longer matchesRulerInput’s.ruler-inputDOM, so top-ruler spacing styling may regress visually. - In
frontend/src/components/Editor.svelte, the duplicate color variable (#00a8ffvsrgb(0, 168, 255)) is dead code and mainly a maintainability cleanup rather than a runtime risk. - Pay close attention to
frontend/src/components/panels/Document.svelte,frontend/src/components/Editor.svelte- fix the selector mismatch causing ruler spacing regression and remove redundant CSS variable declarations.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="frontend/src/components/panels/Document.svelte">
<violation number="1" location="frontend/src/components/panels/Document.svelte:895">
P2: The new `.top-ruler .ruler-wrapper` selector does not match `RulerInput`’s DOM (`.ruler-input`), so the top ruler spacing rule is no longer applied.</violation>
</file>
<file name="frontend/src/components/Editor.svelte">
<violation number="1" location="frontend/src/components/Editor.svelte:147">
P3: Duplicate CSS variable definition — `#00a8ff` and `rgb(0, 168, 255)` are the same color. The second declaration always overrides the first, making the first line dead code. Remove the redundant line.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
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.
Partly closes #1969.