wpengine / wp-graphql-content-blocks

Plugin that extends WPGraphQL to support querying (Gutenberg) Blocks as data
https://faustjs.org/docs/gutenberg/wp-graphql-content-blocks
GNU General Public License v2.0
110 stars 14 forks source link

Feature: Add support for Xpath selectors #186

Open theodesp opened 9 months ago

theodesp commented 9 months ago

Description

Due to this https://github.com/wpengine/wp-graphql-content-blocks/issues/185 some selectors are wrong and do not capture accurately the html contents of an attribute. In that case we can replace those selectors with Xpath.

Acceptance criteria

Technical details

justlevine commented 9 months ago

Cross responding here from https://github.com/wpengine/wp-graphql-content-blocks/issues/185#issuecomment-1929469992:

I havn't been following this issue too closely, but please keep in mind the general changes to the Block API as you're making these decisions.

Between the Interactivity API and Block Bindings API coming up, my gut tells me that we want to be using the HTML parser (assuming there isn't something block-specific to handle Lightbox Images, and to stay away from using Xpath directly.