Preserve the default focus ring with authored focus marks - #49
Conversation
|
Warning Review limit reached
Next review available in: 8 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe chart now preserves the built-in primary-point focus ring when authored ChangesFocus ring composition
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant ChartDefinition
participant SceneBuilder
participant AuthoredFocusMarks
participant SVGCanvasRenderer
ChartDefinition->>SceneBuilder: pass focusRing configuration
AuthoredFocusMarks->>SceneBuilder: provide whenFocused layers
SceneBuilder->>SceneBuilder: retain authored layers
SceneBuilder->>SVGCanvasRenderer: add primary focus ring unless disabled
SVGCanvasRenderer->>SVGCanvasRenderer: render composed focus layers
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 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: 1
🤖 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 `@packages/charts-core/docs/reference/chart-definitions.md`:
- Around line 90-92: Move the authored documentation changes to the
corresponding root docs/reference files, then run pnpm docs:sync to regenerate
the package copies. Apply this to
packages/charts-core/docs/reference/chart-definitions.md:90-92,
packages/charts-core/docs/reference/dom-host.md:119, and
packages/charts-core/docs/reference/focus-and-interaction.md:30-32; do not
maintain those generated files independently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3a910cb9-f026-4d98-b3a4-125d91fba67d
📒 Files selected for processing (15)
.changeset/steady-focus-rings.mdAPI-FRICTION.mdbenchmarks/bundle-size/universal-baseline.jsondocs/reference/chart-definitions.mddocs/reference/dom-host.mddocs/reference/focus-and-interaction.mdexamples/sandbox/src/InteractionGeometryLab.test.tspackages/charts-core/docs/reference/chart-definitions.mdpackages/charts-core/docs/reference/dom-host.mdpackages/charts-core/docs/reference/focus-and-interaction.mdpackages/charts-core/src/canvas.test.tspackages/charts-core/src/facet.test.tspackages/charts-core/src/focus-mark.test.tspackages/charts-core/src/scene.tspackages/charts-core/src/types.ts
| `focusRing`, `maxFocusDistance`, `spatialIndex`, `animate`, `keyboard`, and | ||
| `tooltip`. These options belong to both static and responsive definitions. | ||
| Hosts and framework adapters do not override them. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Generate the package documentation from the root source.
Keep authored changes in the corresponding docs/reference/ files, then run pnpm docs:sync. Do not maintain these generated copies independently.
packages/charts-core/docs/reference/chart-definitions.md#L90-L92: regenerate fromdocs/reference/chart-definitions.md.packages/charts-core/docs/reference/dom-host.md#L119-L119: regenerate fromdocs/reference/dom-host.md.packages/charts-core/docs/reference/focus-and-interaction.md#L30-L32: regenerate fromdocs/reference/focus-and-interaction.md.
As per coding guidelines, public documentation must be authored only in the root docs/ tree, and packages/charts-core/docs is generated by pnpm docs:sync.
📍 Affects 3 files
packages/charts-core/docs/reference/chart-definitions.md#L90-L92(this comment)packages/charts-core/docs/reference/dom-host.md#L119-L119packages/charts-core/docs/reference/focus-and-interaction.md#L30-L32
🤖 Prompt for 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.
In `@packages/charts-core/docs/reference/chart-definitions.md` around lines 90 -
92, Move the authored documentation changes to the corresponding root
docs/reference files, then run pnpm docs:sync to regenerate the package copies.
Apply this to packages/charts-core/docs/reference/chart-definitions.md:90-92,
packages/charts-core/docs/reference/dom-host.md:119, and
packages/charts-core/docs/reference/focus-and-interaction.md:30-32; do not
maintain those generated files independently.
Source: Coding guidelines
Summary
Validation
Fixes #33
Summary by CodeRabbit
New Features
focusRing: falseoption to disable the built-in focus ring when custom focus geometry is used.Documentation
focusRingoption and focus-indicator behavior.Bug Fixes