Repository navigation
Document setStyle and updateStyle tradeoffs - #29
Merged
Merged
Conversation
There was a problem hiding this comment.
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/nodedoc page comparingsetStylevsupdateStyle, 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
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.
Summary
@taffyjs/nodepage comparingsetStyleandupdateStyleupdateStylefor ordinary changes while documenting complete-replacement cases forsetStyleWhy
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
getStyleor a JavaScript shadow object unnecessarily.Validation
vp run check:formatvp run check:lintvp run build:website