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

Allow association of patterns with remote data blocks #54

Merged
merged 6 commits into from
Sep 16, 2024

Conversation

chriszarate
Copy link
Member

Render a select box in pattern editor to associate patterns with remote data blocks. This allows patterns (synced and unsynced) to be included in the pattern chooser and for the block binding controls to be rendered in the pattern editor.

Screenshot 2024-09-14 at 20 14 43 Screenshot 2024-09-14 at 20 15 43

@mhsdef
Copy link
Contributor

mhsdef commented Sep 15, 2024

I can get to the dialog and set a pattern association as shown. But, it's not showing when I go to select with the block.

Any tips for testing?

@chriszarate
Copy link
Member Author

chriszarate commented Sep 15, 2024

Any tips for testing?

After making the association, it does require you to set a binding for at least one of the blocks in the pattern. This should be made clear somewhere, likely the pattern selection modal.

Copy link

codecov bot commented Sep 15, 2024

Codecov Report

Attention: Patch coverage is 13.86861% with 118 lines in your changes missing coverage. Please review.

Project coverage is 14.28%. Comparing base (237ab86) to head (be69dc5).

Files with missing lines Patch % Lines
...n-editor/components/PatternEditorSettingsPanel.tsx 0.00% 39 Missing and 1 partial ⚠️
...te-data-container/hooks/use-remote-data-context.ts 34.14% 25 Missing and 2 partials ⚠️
...blocks/remote-data-container/hooks/use-patterns.ts 0.00% 16 Missing ⚠️
src/utils/block-binding.ts 14.28% 12 Missing ⚠️
src/hooks/usePostMeta.ts 0.00% 9 Missing and 1 partial ⚠️
src/hooks/useEditedPostAttribute.ts 0.00% 7 Missing and 1 partial ⚠️
src/hooks/useForm.ts 0.00% 3 Missing ⚠️
src/pattern-editor/config/constants.ts 0.00% 1 Missing ⚠️
src/pattern-editor/index.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk      #54      +/-   ##
============================================
+ Coverage     14.22%   14.28%   +0.05%     
  Complexity      396      396              
============================================
  Files           122      126       +4     
  Lines          5019     5098      +79     
  Branches        146      150       +4     
============================================
+ Hits            714      728      +14     
- Misses         4161     4222      +61     
- Partials        144      148       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mhsdef
Copy link
Contributor

mhsdef commented Sep 15, 2024

woof, sorry for the noise, first time using codecov and this is what it's doing out of the box.

I'll try the pattern association some more. And see if I can dial down this bot.

@mhsdef
Copy link
Contributor

mhsdef commented Sep 15, 2024

I'll dial or rip that thing out tomorrow.

https://docs.codecov.com/docs/common-recipe-list

It's def not meant to be blocking. Or quite so noisy. Just looking for holistic picture.

@mhsdef
Copy link
Contributor

mhsdef commented Sep 15, 2024

Nice. Got it wired together. Pain in a lot of places, but, mostly that's on core for how half baked these pieces we need are right now.

Good step. 👍

@chriszarate chriszarate merged commit 7fc9e55 into trunk Sep 16, 2024
9 checks passed
@chriszarate chriszarate deleted the improve/pattern-block-types branch September 16, 2024 13:45
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.

2 participants