Overview
In the code review of #3459229: Allow saving component compositions as sections (frontend only) @hooroomoo made a good observation that the TS definitions around LayoutNode, Node and RootNode are a bit loose. This issue proposes that we try to reduce that ambiguity to make the layoutUtils and layoutModelSlice reducers a bit tighter and easier to use.
Proposed resolution
Numerous utility functions can accept any Node with children but some specifically expect to have the RootNode passed in as they apply to the whole layout. These should be changed to explicitly expect a RootNode input and provide a RootNode output.
Marking as postponed as this MR builds on the changes implemented in #3459229: Allow saving component compositions as sections (frontend only) and should be merged afterwards.
Issue fork experience_builder-3486120
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jessebaker commented#3459229: Allow saving component compositions as sections (frontend only) has landed!
Comment #4
jessebaker commentedComment #5
hooroomoominor comments
Comment #6
wim leers@hooroomoo++
@jessebaker++
Comment #7
jessebaker commentedComment #9
hooroomoosweet