Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for querying array type query data from blocks #176

Merged
merged 17 commits into from
Jan 8, 2024

Conversation

theodesp
Copy link
Member

@theodesp theodesp commented Jan 2, 2024

Description

Fixes: #61

How to Test

  • Create a Table Block and add a header footer and caption
  • Add also some cells
  • You will be able to query the head, foot and content cells

Screenshots

Screenshot 2024-01-02 at 11 31 02

@theodesp theodesp requested a review from a team as a code owner January 2, 2024 10:18
Copy link

changeset-bot bot commented Jan 2, 2024

🦋 Changeset detected

Latest commit: c63f7ab

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@wpengine/wp-graphql-content-blocks Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

'preload' => 'auto',
'src' => 'http://mysite.local/wp-content/uploads/2023/07/pexels_videos_1860684-1440p.mp4',
'playsInline' => true,
'controls' => null,
'controls' => true,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default value of controls is true

'caption' => '',
'tracks' => [],
'muted' => null,
'caption' => null,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

caption is not set so its null

Copy link
Contributor

@justlevine justlevine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this new set of private methods, can we put the param/return types inside the function signatures instead of as doc-types?

Stricter types are always better in terms of tech-debt and extensibility.

includes/Blocks/Block.php Outdated Show resolved Hide resolved
includes/Blocks/Block.php Outdated Show resolved Hide resolved
includes/Blocks/Block.php Outdated Show resolved Hide resolved
includes/Blocks/Block.php Outdated Show resolved Hide resolved
includes/Blocks/Block.php Outdated Show resolved Hide resolved
includes/Blocks/Block.php Outdated Show resolved Hide resolved
includes/Type/Scalar/Scalar.php Outdated Show resolved Hide resolved
includes/Utilities/DomHelpers.php Outdated Show resolved Hide resolved
includes/Utilities/DomHelpers.php Outdated Show resolved Hide resolved
@theodesp theodesp requested a review from mindctrl January 4, 2024 10:15
mindctrl
mindctrl previously approved these changes Jan 4, 2024
Copy link
Contributor

@mindctrl mindctrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'm able to query data in tables as expected.

image

There are whitespace issues in the CoreTableTest.php file, with a mix of tabs and spaces.

mindctrl
mindctrl previously approved these changes Jan 4, 2024
Copy link
Contributor

@mindctrl mindctrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch on the major patch.

@theodesp theodesp merged commit 9b71411 into main Jan 8, 2024
6 of 7 checks passed
@theodesp theodesp deleted the feature-source-query-attribute-types branch January 8, 2024 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for extracting array type query data from blocks
3 participants