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

updated guternberg docs to reflect ACF Block >v6 #2945

Merged
merged 22 commits into from Mar 25, 2024

Conversation

ecupaio
Copy link
Contributor

@ecupaio ecupaio commented Mar 9, 2024

Related:

Issue

Updates to ACF Blocks documentation to reflect the use of block.json in ACF v6

Solution

Wrote very descriptive docs on how to add blocks to a Timber theme.

Impact

No impact on code, just less frustrated devs.

Usage Changes

none

Considerations

n/a

Testing

n/a

Copy link
Member

@Levdbas Levdbas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ecupaio for taking a shot at this! 🎉 I created quite a few suggestions/changes but don't let that put you off. The overall structure is nice! You might want to consider moving the section about the render callback up, right after registering the blocks. This way we first handle the PHP side of things before moving into the json/twig side.

Another suggestion is to maybe have the twig file inside the directory of the block as well. Personally I find is very useful in reusing blocks between projects.

docs/v2/guides/gutenberg.md Outdated Show resolved Hide resolved
docs/v2/guides/gutenberg.md Outdated Show resolved Hide resolved
docs/v2/guides/gutenberg.md Outdated Show resolved Hide resolved
docs/v2/guides/gutenberg.md Outdated Show resolved Hide resolved
docs/v2/guides/gutenberg.md Outdated Show resolved Hide resolved
docs/v2/guides/gutenberg.md Outdated Show resolved Hide resolved
docs/v2/guides/gutenberg.md Outdated Show resolved Hide resolved
docs/v2/guides/gutenberg.md Outdated Show resolved Hide resolved
docs/v2/guides/gutenberg.md Outdated Show resolved Hide resolved
docs/v2/guides/gutenberg.md Outdated Show resolved Hide resolved
@Levdbas Levdbas changed the title updated guternberg docs to relfect ACF Block >v6 updated guternberg docs to reflect ACF Block >v6 Mar 13, 2024
@Levdbas Levdbas linked an issue Mar 14, 2024 that may be closed by this pull request
ecupaio and others added 14 commits March 14, 2024 10:13
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
@ecupaio
Copy link
Contributor Author

ecupaio commented Mar 14, 2024

@Levdbas thanks so much for this. I'm with you on restructuring the block twig for ease of implementation and I was not sure on how to order the steps since they are all co-dependent on each other so thanks for that suggestion. I still want to map the JSON values for the developer so even if they are blindly copy pasting, they can at least have a reference later on.

Copy link
Member

@Levdbas Levdbas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another few minor fixes

docs/v2/guides/gutenberg.md Outdated Show resolved Hide resolved
docs/v2/guides/gutenberg.md Show resolved Hide resolved
docs/v2/guides/gutenberg.md Outdated Show resolved Hide resolved
docs/v2/guides/gutenberg.md Outdated Show resolved Hide resolved
ecupaio and others added 4 commits March 14, 2024 13:19
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
Co-authored-by: Erik van der Bas <erik@basedonline.nl>
@ecupaio
Copy link
Contributor Author

ecupaio commented Mar 14, 2024

@Levdbas thanks! I added those new suggestions in, reordered the render block step, and I updated the tutorial to include the twig template within the block structure.

@Levdbas
Copy link
Member

Levdbas commented Mar 14, 2024

Hi @ecupaio , I took the liberty to add a commit myself to your PR. I am using ACF blocks myself quite a lot so I wanted to chime in on some concepts as well. Please let me know what you think and if you see any improvements to make just let me know. We are on the right track here!

@ecupaio
Copy link
Contributor Author

ecupaio commented Mar 14, 2024

@Levdbas that is quite alright. My mission here is to have descriptive documentation for ACF blocks in timber that anyone can follow and be successful. Your contributions have been helpful in achieving that objective.

@Levdbas
Copy link
Member

Levdbas commented Mar 18, 2024

Thanks @ecupaio , one of the other @timber/rangers will do a check before we merge this. We are always looking forward to people contributing to Timber. If you like to help improve the documentation for Timber, check out the following open tickets: https://github.com/timber/timber/issues?q=is%3Aopen+is%3Aissue+label%3Adocs

Copy link
Member

@gchtr gchtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked over the docs and made changes in d56c196 (#2945). Most updates are about documentation style to match what we already have.

I also removed the comments in the JSON file, because developers will copy that piece of code and we don’t want to confuse them with invalid JSON.

Thanks a lot for taking the time to put this together @ecupaio! It’s a great addition to the docs.

This has also been a question in the Swiss WordPress community Slack channel, so I’ll be finally able to link to that 💪.

@Levdbas Levdbas merged commit 486ef3e into timber:2.x Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Documentation for ACF Blocks
3 participants