Skip to content

feat(scenegraph): Add ArrayGrid.focusFeedbackPoster field for customizing the focus indicator - #1231

Merged
lvcabral merged 2 commits into
masterfrom
feat/arraygrid-focus-feedback-poster
Sep 12, 2026
Merged

feat(scenegraph): Add ArrayGrid.focusFeedbackPoster field for customizing the focus indicator#1231
lvcabral merged 2 commits into
masterfrom
feat/arraygrid-focus-feedback-poster

Conversation

@lvcabral

Copy link
Copy Markdown
Owner

Summary

  • Roku OS 16.0 exposes the Poster node that ArrayGrid-derived grids (RowList, MarkupGrid, PosterGrid, etc.) use internally to draw their focus indicator, as a public focusFeedbackPoster field — letting apps apply the same Effect-based treatment (rounded/asymmetric corners) they can already apply to content items, matching the release notes example.
  • The field is pre-populated with a real Poster node in the constructor (not left invalid like content) and is re-read from the field on every draw rather than cached in a private property — Node.cloneNode aliases a node-valued field onto the same node while still re-running the constructor, which would otherwise desync a private cache from the field the moment a grid is cloned.
  • setValue guards the field to only accept a Poster (mirroring BusySpinner.poster) and lets an app swap in its own instance.
  • Preserves the pre-existing non-9-patch "aliasing" sizing behavior on focusFrameRect via a no-op dry-run drawImage call before handing geometry to the poster.

Test plan

  • npm run lint
  • npm run build:sgnpm run build:nodenpm run build:sg (respecting the common.zip build-order dependency documented in CLAUDE.md)
  • npx vitest run test/extensions/scenegraph — 92 files / 1094 tests passing
  • npx vitest run test/cli/cli-scenegraph.test.js — 61 real end-to-end app tests passing
  • Added test/extensions/scenegraph/GridFocusFeedbackEffect.test.js with real pixel-level assertions: default Poster instance, an assigned Effect actually rounds the drawn focus indicator's corners, app-assigned Poster swap is honored, and a Clone() regression test for the field/cache desync described above

🤖 Generated with Claude Code

https://claude.ai/code/session_01ELwyUMGPjmGJoj6d8bAovV

lvcabral and others added 2 commits September 12, 2026 13:29
…zing the focus indicator

Roku OS 16.0 exposes the Poster node ArrayGrid-derived grids (RowList,
MarkupGrid, PosterGrid, etc.) use internally to draw their focus indicator,
so apps can apply the same Effect-based treatment (rounded/asymmetric
corners) they already apply to content items. The field is pre-populated
with a real Poster in the constructor and re-read fresh on every draw
(rather than cached) so it stays correct across Clone(), whose field-aliasing
semantics would otherwise desync a private cache from the field.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ELwyUMGPjmGJoj6d8bAovV
@sonarqubecloud

Copy link
Copy Markdown

@lvcabral
lvcabral merged commit 11b3a80 into master Sep 12, 2026
3 checks passed
@lvcabral
lvcabral deleted the feat/arraygrid-focus-feedback-poster branch September 12, 2026 20:41
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.

1 participant