You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 28, 2023. It is now read-only.
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 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 🚧\
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
Finish the Deep Signals implementation - Finished ✅
Decide on the recommended shape - In progress 🚧 Same answer as in the "Directives - Decide final names".
TypeScript support - Not started ⏸
Figure out if we want to expose some parts of the router and/or other configuration in the state (example) - Not started ⏸
Server-side rendering
API to do SSRing - In progress 🚧 Same answer as in the "Directives - Add SSR for the ones that need it".
API to register directives/components - Not started ⏸
Enqueue directives/components present in the HTML - Not started ⏸
Ensure script execution order, deferring and prefetch - Not started ⏸
Choose final package name and shape - In progress 🚧 Same answer as in the "Directives - Decide final names".
Choose and implement dependency management - In progress 🚧
Barely started, just preliminary conversations between @luisherranz, @gziolo, @dmsnell and @youknowriad.
Client-side navigation
Manual (Finished ✅) and automatic opt-in (Not started ⏸)
Router
Fetch directives/components scripts - Not started ⏸
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
prefetchto all links and prevent scroll in pagination #87nodeType7 like comments #121refattr while generating virtual nodes #122wp-contextinheritable and extensible #139wp-prefixes #142wp-class#149wp-showdirective attribute #156wp-ignoredirective #163<head>on client-side navigations #164useSignalEffectimplementation that behaves likeuseEffect#226In progress
Next
Decisions that need to be made
wpx()(needed for the announcement blog post)wp_storeto something else #136view.jsfiles 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:valueshould be bidirectional in inputs.client-side transitionsorclient-side navigation: we'll useclient-side navigationfrom now onFigure out how to use context inside the derived state: we'll use selectorscomponentsor not: we won'tinteractivity-api-proposal. (needed for the announcement blog post)block.jsonin the server a requirement?wp-showis false? #159ref)wp-error-boundaryorwp-suspensewp-htmlwith a word the warns about its risks, likewp-dangerous-htmlExperiments