-
Notifications
You must be signed in to change notification settings - Fork 11
Tracking issue: WordPress Directives Plugin 🎨 #80
Comments
I've opened the |
I've added some basic tasks to the OP to get the client-side navigations working, which is our first task. These two experiments contain much of the required code:
We should rename |
I have created a Pull Request to "Add the wp-link to all the relative links on the page". It is still a draft, but I opened it to keep the discussion about that specific task there. |
I've created a pull request to add the basic vdom + directives functionality. I'll now create another one for the router + |
I've created the pull request to add the router and the |
I've created another pull request to change the |
I'll be working on adding page transitions to the client-side navigations using the Shared Element Transition API. I'll share here a link to the PR soon. |
I've created a PR to add support for CSS loading during client-side navigations: |
I've opened a PR to add a basic opt-in mechanism based on a custom meta tag: |
I've opened a PR to add While doing that, we realized that the HTML of the parent blocks contains the children, so we were parsing the HTML multiple times. For that, we change the filters to only trigger for the Query Loop and the Template Parts until we figure out a better solution. |
Another PR to add an admin page with a checkbox to toggle client-side navigations (for testing purposes only): |
I did a couple of bug fixes that we noticed while working on this demo: |
I've opened an issue to talk about limiting the hydration surface when the site doesn't support client-side navigations: |
@yscik opened an issue to talk about how to avoid using strings to define the directives in JSX. @SantosGuillamot and I did a PR to show how server-side rendering in PHP could look like using an HTML parser. |
I have created a PR to start using |
I have created a PR to handle the |
I've started working on the limit hydration issue: |
The PR is ready for review: |
I forgot to mention here these two PRs, sorry! I've also updated the opening post 🙂 |
I've started a pull request to Add I've added it to the opening post (In Progress). Please let me know if it should be in any other place. |
You've probably wanted to mention somebody else with a similar name. |
Oh my. Yes, that was @ockham, sorry! |
I've opened an issue to discuss What should be the HTML structure returned when |
I've opened an issue to discuss if we want to expose parts of the router (or other API internals) in the store: |
I'll repeat it here because I think it will be important.
If we can avoid using the It'd be extremely advantageous to be able to perform this quick check and bail all directive processing. function process_directives( $html ) {
// Some posts will have `wpx-` without having directives,
// But no posts will have directives without having `wpx-`.
if ( false === strpos( $html, 'wpx-' ) ) {
return $html;
}
} Looking for |
A small update:
|
I've merged the PR that makes Same with this other PR, which refactors the e2e tests a bit to prevent |
I have started a pull request to add the |
I've opened a couple of issues, one to make the hydration more resilient (and make it work with |
It's very preliminary yet, but @DAreRodz and I have started an experiment to do client-side form submissions on the Comments Form block: |
Another issue related to the router: |
I've reopened because it became clear that Realistically, we might need more time, though 🙂 |
We finished the basic functionality of the Comments Form submission experiment: |
@artemiomorales started this experiment of a lightbox for images, similar to the one in Medium: |
I've added support for the I've also improved the logic of |
I finally merged the @DAreRodz and I have also started working on a branch to simplify the runtime so we can start testing it with core blocks: |
I haven't opened a PR yet, but I just started working on sorting directives by priority. I'll update this comment with the PR link soon. |
We also merged this fix: |
I'm going to close this issue as part of the migration to the Gutenberg repository. This is the current Tracking Issue on Gutenberg. Please refer to it from now on. |
This issue aims to list and keep track of the tasks related to the WordPress Directives Plugin experiment. The goal is to create an installable plugin that adds a set of basic directives and client-side navigations to any site.
For this experiment's stress-testing, please check the Tracking Issue: Performance and stress-testing vDOM Hydration 🧪
For the Custom Elements or Directives Hydration experiment, please check their corresponding Tracking Issues.
The main branch of this experiment is
main-wp-directives-plugin
. Make sure you select it when opening a pull request if it is related to this experiment.Please proactively comment on this issue whenever you start working on a new task, get blocked, or finish a task, sharing as much detail and information as possible. Thanks!!
High-level overview
Directives
Finish the directives of the initial list - In progress 🚧
Work on the directives is still reactive as we only work on the ones that we need for our experiments, demos, etc. The work on the Movies demo and Woo blocks should bring some focus to this task.
Add SSR for the ones that need it - In progress 🚧\
This is led by @ockham and @dmsnell.
There's already initial support for the SSR of basic directive attributes and good progress on
wp-context
. The next challenge to solve is to figure out the APIs to access the inner HTML with the HTML (Tag) Processor.Decide final names - In progress 🚧
We are keeping a list of the decisions that need to be made here in the Tracking Issue.
Components
There hasn't been any progress on this, mostly due to the lack of need for components (directive tags). @luisherranz opened an issue proposing their removal, as we couldn't find a single case where they add meaningful value and we might want to use them for other purposes in the future.
State Management
Same answer as in the "Directives - Decide final names".
Server-side rendering
Same answer as in the "Directives - Add SSR for the ones that need it".
Client runtime
Bundling
Same answer as in the "Directives - Decide final names".
Barely started, just preliminary conversations between @luisherranz, @gziolo, @dmsnell and @youknowriad.
Client-side navigation
state.router.url
) - Not started ⏸Done
prefetch
to all links and prevent scroll in pagination #87nodeType
7 like comments #121ref
attr while generating virtual nodes #122wp-context
inheritable and extensible #139wp-
prefixes #142wp-class
#149wp-show
directive attribute #156wp-ignore
directive #163<head>
on client-side navigations #164useSignalEffect
implementation that behaves likeuseEffect
#226In progress
Next
Decisions that need to be made
wpx()
(needed for the announcement blog post)wp_store
to something else #136view.js
files with backward compatibility."interactive: true"
should be optional or not in theblock.json
.@wordpress/interactivity
. #146Figure out how the store will work in static blocks: it won't.wp-bind:value
should be bidirectional in inputs.client-side transitions
orclient-side navigation
: we'll useclient-side navigation
from now onFigure out how to use context inside the derived state: we'll use selectorscomponents
or not: we won'tinteractivity-api-proposal
. (needed for the announcement blog post)block.json
in the server a requirement?wp-show
is false? #159ref
)wp-error-boundary
orwp-suspense
wp-html
with a word the warns about its risks, likewp-dangerous-html
Experiments
The text was updated successfully, but these errors were encountered: