Skip to content

Document setStyle and updateStyle tradeoffs - #29

Merged
hyfdev merged 1 commit into
mainfrom
agent/set-style-vs-update-style-docs
Aug 16, 2026
Merged

hyfdev merged 1 commit into
mainfrom
agent/set-style-vs-update-style-docs

Conversation

@hyfdev

@hyfdev hyfdev commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a dedicated @taffyjs/node page comparing setStyle and updateStyle
  • recommend updateStyle for ordinary changes while documenting complete-replacement cases for setStyle
  • explain the JavaScript-to-native conversion cost behind the general performance guidance without promising per-call dominance
  • add sidebar and contextual links, and retain the supporting benchmark evidence in project records

Why

The two methods accept similar-looking objects but give omission different meanings. The documentation should make the safer default and its performance model explicit so callers do not reconstruct retained state through getStyle or a JavaScript shadow object unnecessarily.

Validation

  • vp run check:format
  • vp run check:lint
  • vp run build:website
  • browser acceptance of the rendered page, sidebar placement, pager order, and cross-page navigation

Copilot AI lite review requested due to automatic review settings August 16, 2026 13:11
@hyfdev
hyfdev merged commit 7dd9c52 into main Aug 16, 2026
6 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds and cross-links dedicated documentation clarifying the semantic and performance tradeoffs between setStyle and updateStyle in @taffyjs/node, making updateStyle the recommended default for incremental changes while documenting when full replacement via setStyle is appropriate.

Changes:

  • Add a new @taffyjs/node doc page comparing setStyle vs updateStyle, including intent-based guidance and a performance model explanation.
  • Add contextual links from existing style documentation pages and add the new page to the VitePress sidebar.
  • Record the documentation recommendation decision and preserve supporting benchmark context in PCR docs.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apps/website/node/styles-and-context.md Adds a direct recommendation and link to the new comparison page.
apps/website/node/set-style-vs-update-style.md New page explaining semantic differences, appropriate use-cases, and performance considerations.
apps/website/guide/styles-and-values.md Adds a cross-link and recommendation consistent with the new guidance.
apps/website/.vitepress/config.ts Adds the new page to the @taffyjs/node sidebar navigation.
.agents/docs/website.md Updates website content map to include the new “setStyle vs updateStyle” page as part of @taffyjs/node.
.agents/docs/taffyjs-node-decisions.md Adds a decision record stating docs must recommend updateStyle by default, with scoped limits.
.agents/docs/binding-cases.md Adds benchmark context supporting the “generally faster” guidance without claiming per-call dominance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

hyfdev added a commit that referenced this pull request Aug 16, 2026
hyfdev added a commit that referenced this pull request Aug 16, 2026
Add partial native style updates and the Yoga-compatible package backed by WebAssembly.

Refs: #26, #27, #29
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