Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for nested repeaters in block #521

Merged
merged 1 commit into from
Feb 11, 2020
Merged

Added support for nested repeaters in block #521

merged 1 commit into from
Feb 11, 2020

Conversation

yanhao-li
Copy link

This PR is to add the nested repeaters as discussed in #74

I found out the fields passed to afterSaveHandleBlocks have included all information we needed to support nested repeaters, it's merely not be handled properly.

This PR refactored the HandleBlocks trait a little bit by adding the following two methods:

  • createBlock to create a block and recursively traverse it's child blocks and create them.
  • getChildBlocks to recursively convert a child block's fields to the structure needed for creating a child block.

@yanhao-li yanhao-li requested a review from ifox January 31, 2020 19:17
@ifox ifox changed the base branch from 1.2 to master February 9, 2020 05:35
@ifox
Copy link
Member

ifox commented Feb 11, 2020

Merging as this adds a new feature without breaking changes but noting that BlockController@preview and HandleBlocks@hydrateHandleBlocks will also need to be updated for blocks and pages to render nested repeaters content during previews.

@ifox ifox merged commit 0470afd into area17:master Feb 11, 2020
@ifox ifox mentioned this pull request Feb 13, 2020
antonioribeiro pushed a commit to antonioribeiro/twill that referenced this pull request Feb 19, 2020
@yanhao-li yanhao-li deleted the fix/support-nested-repeaters branch April 6, 2020 13:06
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