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

Plugins: Try blocks for single plugin page #460

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

ryelle
Copy link
Contributor

@ryelle ryelle commented Dec 18, 2024

I went into this thinking I would just update the tabs, but then I got a little distracted 😅

This PR starts an attempt at block-ifying the single plugin page, instead of using a block to render a classic-theme template with some embedded block code.

  • New block to render a "section" from the current plugin, which is used to set up the page. I had planned to wrap these in some kind of tab container block… but ran out of time.
  • Moved the widgets to the sidebar pattern, using the wp:legacy-widget block. I don't think we can pass in args to update the headings, so maybe a filter + HTML processing, or maybe these should just be blockified faster.
  • Created "closed" variations of the single plugin pattern, planning to create default, closed, and advanced versions of the page template, pattern, and sidebar. These can be switched by a hook on the template loader; or single-plugin.html can load a partial which is filtered.

Regarding tabs… The fact that the tabs are above the sidebar too also makes this harder — and the sidebar changes based on tab-view… so really there should be a sidebar-pattern for each tab, as well, since the "tabpanel" should contain all changing content. It's also hard to suss out from the code which elements show up when.

Production Current PR
Screen Shot 2024-12-18 at 16 37 08 Screen Shot 2024-12-18 at 16 36 53
Screen Shot 2024-12-18 at 16 39 49-fullpage Screen Shot 2024-12-18 at 16 40 03-fullpage

@StevenDufresne Feel free to take over this for iterating, or ignore it and just fix up the tabs :)

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.

1 participant