Repository navigation
Add a guide to change notifications and describe the Size role - #576
Merged
Merged
Conversation
The guide explains who notifies whom when the graph changes, with Mermaid diagrams. It needs sphinxcontrib-mermaid. NodeRole::Size has one description in the header, the roles table, the setNodeData comment and the advanced guide: it is the layout size that the geometry computes, and the model only stores it. It is not an input. The old advice to emit nodeUpdated when Size is set made an endless recursion and is removed.
paceholder
force-pushed
the
docs-update-flow
branch
from
December 2, 2026 20:08
431e034 to
484d347
Compare
4 of 7 tasks
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.
Type of change
Description
A new guide page, Change Notifications, explains how a change travels from the model to the scene: the rule (the model is the single source of truth), the signals that the scene listens to, who notifies whom, the main cases (node drag, node creation and load, connection creation and data, undo and redo, the size of an embedded widget), what a custom model, delegate or geometry must emit, and the pitfalls. It has five Mermaid diagrams, and each has a plain-text fallback in a comment in the source. The page is based on a trace of the update paths with call counts, and it describes
masterafter #575.NodeRole::Sizenow has one description in all places: the comment inDefinitions.hpp, the roles table ingraph-models.rst, the comment ofAbstractGraphModel::setNodeData, and the Resizable section of the advanced guide. It is the layout size that the geometry computes, and the model only stores it and returns it. It is not an input: a value set from code does not resize the node, and the nextnodeUpdatedreplaces it. The handle of a resizable node resizes the embedded widget, and the node follows.The
Sizeexample in the advanced guide emittednodeUpdatedwhenSizeis set. The scene setsSizewhile it handlesnodeUpdated, so this made an endless recursion. The example does not emit it any more, and the text says why.Nothing here changes behavior. The text describes what 3.x does today. The only code change is two comments in headers.
The diagrams need the Sphinx extension
sphinxcontrib-mermaid. It is added todocs/conf.pyanddocs/requirements.txt. The extension loadsmermaid.jsfrom a CDN in the browser, so Read the Docs needs no Node.js.Testing
advanced.rst. The other warnings (41 from a missing Doxygen XML in my checkout, 2 thatmasteralso has) are not from this change.Breaking changes?
No.
Related issue
None.