Repository navigation
docs: cover SSR, immutable graphs and stable callbacks - #15
Merged
Merged
Conversation
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
Addresses the documentation gaps in
CONFIRMED-FINDINGS.mditem 10.docs/getting-started.md: documents that non-empty graphs server-render only aplotHeight-tall "Preparing diagram..." placeholder at container width, empty graphs render "No flow data", and layout runs after hydration.formatAmount/getLabelstill run during SSR, so they must avoid browser-only APIs.docs/api.md: thegraphrow now requires immutable inputs and a new reference on change, and explains that in-place mutations are not re-resolved (geometry/labels can stay stale while tooltips and click callbacks see mutated objects).docs/api.md: theformatAmountandgetLabelrows now ask for stable callbacks, explain that a new identity rebuilds labels and restarts layout, and link to the stable-callbacks guide plus the correct getting-started section.docs/api.md: adds a server-rendering section linking to the placeholder/resize guidance.docs/customization.md: removes the old server/browser-identical claim and makes the callback example stable: module-levelformatAmount/getLabel, explicit'en-US'locale, and stable prop references.Verification
npm run format— passednpm run format:check— passednpm run typecheck— passednpm run lint— passedplotHeightplaceholder (no<svg>); empty graph emits "No flow data"; callbacks run during SSR and awindow-using formatter throws.Notes
Docs-only; no source, tests, dependencies or lockfile changes. No CHANGELOG entry because this is documentation clarification only.