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

Update plugin-sidebar-9ee4a6 to match the example explained at How-to Guides- Plugin Sidebar #66

Open
juanmaguitar opened this issue Nov 17, 2023 · 4 comments
Assignees

Comments

@juanmaguitar
Copy link
Collaborator

juanmaguitar commented Nov 17, 2023

Update plugin-sidebar-9ee4a6 to recreate with JSX the example explained in Block Editor Handbook - How-to Guides- Plugin Sidebar
Once is published, update the Block Editor Handbook - How-to Guides- Plugin Sidebar to match the code snippets with the code of this example

@juanmaguitar juanmaguitar changed the title Plugin Sidebar example Update plugin-sidebar-9ee4a6 to match the example explained at How-to Guides- Plugin Sidebar Nov 17, 2023
@ryanwelcher ryanwelcher self-assigned this Nov 27, 2023
@flexseth
Copy link
Contributor

flexseth commented Mar 22, 2024

@juanmaguitar greetings! I was doing some investigating about the differences in code here, there's two main differences between it and @ryanwelcher's code.

The links on the post above are broken, probably because the test site has been merged into production. But here are the corrected links:

Observations

  • On the How To guide, the code is Vanilla JS (no build step required), whereas the block-development-examples plugin sidebar repo code example requires NPM and a build process
  • The code on the How To guide was written in 2021, which is quite a bit ago. Most noticably they are passing in the wp and react objects as parameters, I'm not sure if this is necessary with the way Gutenberg works today

Relevant PR with How To guide code

Possible fix: Add the no-build example to this repo

That said, it could be possible to add the example code from the field guide to the block-development-examples repo as a similar example with no build..

Caveat(s)

The only thing is, the code is very different, so I'm not sure if this would be more confusing. Also it's possible the code on the How To guide is out of date.

Please let me know what you all think!

Best/Seth

@juanmaguitar
Copy link
Collaborator Author

Hi @flexseth, thanks a lot for the detailed report on this issue.
I'm currently on leave but will be back to work on April 1st.
Once I'm back, I'll have a look at this issue taking your comments into account, and will add a comment to this issue with my thoughts.
Cheers!

@flexseth
Copy link
Contributor

@juanmaguitar Hope your holiday was great!

I think I misunderstood what you were requesting!

If this is the case, I'd be happy to update the docs to reflect @ryanwelcher's code.

Thanks for taking a look!

@flexseth
Copy link
Contributor

@ryanwelcher - do you mind assigning this to me so I can more easily search it when looking for issues to work on, please! TYIA

@ryanwelcher ryanwelcher assigned flexseth and unassigned ryanwelcher Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants