GoogleForCreators / web-stories-wp

Web Stories for WordPress
https://wp.stories.google
Apache License 2.0
756 stars 179 forks source link

Use Interactivity API for frontend functionality #13502

Open swissspidy opened 7 months ago

swissspidy commented 7 months ago

Feature Description

WordPress 6.4 ships with the Interactivity API, which is an ideal tool for implementing the lightbox functionality in the Web Stories block. SImilar to how the core image block uses it for its lightbox.

Sites using an older WordPress version can still use the existing JS we have.

In the future we could even think about replacing the carousel with the Interactivity API or find other use cases for it.

swissspidy commented 7 months ago

Related: https://github.com/WordPress/gutenberg/discussions/55642

swissspidy commented 7 months ago

As per yesterday's chat: we do quite a few things more than lightbox, so we might still need some custom JS. If it turns out to be more / unnecessarily complex, we can put this on hold for now and focus on other issues instead.

swissspidy commented 6 months ago

Putting this on hold for now as per our discussion. Doesn't seem straightforward to use after all, as our use case is a bit more complex.

swissspidy commented 2 months ago

The stable version actually landed in WordPress 6.5, so I think we should revisit this.