-
Notifications
You must be signed in to change notification settings - Fork 11
Tracking issue: Directives Hydration ⚛️ #64
Comments
I've opened the first PR to prepare the project to add the initial version of the hydration (co-authored with @DAreRodz): |
#65 is approved and merged. 🎉 I'll update the tracking issue's description to reflect that. Aso, I've started with a PR to hydrate block components inside a single vDOM tree: |
I've made a proof of concept of the vdom-based client-side navigation on the Query Loop block: |
I've made some more progress on the experiment, replacing the imperative event listeners with a So far so good! |
The "block wiring" is almost complete; I marked #66 ready for review. Still, I have intentionally left the block context to implement it in a different PR and test the preact's option hook API. There's also a problem during hydration, because some elements are being regenerated. We need to investigate that. 🕵️ EDIT: the hydration bug was found. I left a note in the bugfix. |
I refactored |
David is working on |
Destroying |
I've started another client-side navigation experiment for WooCommerce's Product Query block. This one is replacing only the inner children of the Product Query block instead of the whole document. |
I've removed the The way to append the wrapper attributes is a bit hacky, TBH. We can give it a thought and change that with something else. |
I'll be working on this today: |
Of course I don't mind! Actually, I thought of doing the same, hehe. 😄 |
I've written an update on the lazy hydration techniques issue: TL;DR: all the approaches we tried so far were unsuccessful, although we have some ideas we're going to explore next week. |
We decided to put #75 on hold as mentioned in #75 (comment), and continue with other tasks. Also, I've created an issue for removing the |
@ockham and I recorded a video summary of the progress with this. |
#74 should be ready for review, although I just noticed a problem with the block context that I want to investigate. |
I've removed the |
@SantosGuillamot, @DAreRodz and I have started this new experiment to see if we can replicate the behavior of the Navigation block with directives hydration: It's based on @SantosGuillamot's initial exploration using Alpine directives. |
#74 is ready for review: EDIT: Merged! 🎉 |
I think we've finished pretty much here. @DAreRodz, is there something else we should add? |
In a pair-programming session with @c4rl0sbr4v0, we implemented a way to pause hydration if View components are not registered yet. |
Merged 🙂 |
Uhm, I'm not sure what else we could add. 😄 Maybe we can test if the directives hydration approach could get along with third-party blocks using other libraries for interactivity. As long as they don't interact with our VDOM, the hydration is supposed to work fine, although we haven't tested yet if that assumption is correct. |
I've started working on a benchmark to measure WP directives performance. I placed a link in the description under Experiments. Feel free to move it if you feel there's a better place for it. |
We've moved our work to the WP Directives Plugin branch and Tracking Issue because we are now trying to build a plugin that people can install to test this out. |
We have renamed this to Directives Hydration to make more explicit the difference between this and the Custom Elements Hydration. |
Closed in favor of: |
We are now actively working on the WordPress Directives Plugin Tracking issue instead ➡️
This issue aims to list and keep track of the tasks related to the Directives Hydration experiment.
For the Custom Elements Hydration experiment, please check the Tracking Issue: Custom Elements Hydration 🧩.
The main branch of this experiment is
main-directives-hydration
. 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!!
Experiments
Done
wp-block
andwp-inner-blocks
) #66providesContext
andusesContext
#68Suspense
andErrorBoundary
examples #70<wp-block>
wrapper #72wp-inner-block
attribute for each inner block #77Suspense
andlazy
to Hydrate views that were not registered before callinghydrate()
#78Next
On hold
The text was updated successfully, but these errors were encountered: