Skip to content

Conversation

@carstingaxion
Copy link
Collaborator

Description of the Change

Closes #1144

How to test the Change

Changelog Entry

Added - New feature
Changed - Existing functionality
Deprecated - Soon-to-be removed feature
Removed - Feature
Fixed - Bug fix
Security - Vulnerability

Credits

Props @username, @username2, ...

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@what-the-diff
Copy link

what-the-diff bot commented Aug 1, 2025

PR Summary

  • Introduction of New Variable
    The team has added a variable named queryId. This variable gets its value from the current operating context. If the context does not provide a value, it will default to null. This helps to identify specific elements for more specific tasks.

  • Enhancement of Conditional Logic
    The existing conditions within the software have been updated. Specifically, a check has been added to an if statement to handle situations when the queryId does not contain a value or is null. This modification assists in making more accurate decisions when handling different types of events.

@carstingaxion
Copy link
Collaborator Author

carstingaxion commented Aug 1, 2025

Trying to fix this little problem is becoming a more intense task, than what I thought, because the date-related components do heavily rely on the 'gatherpress/datetime' redux store.

Until now I quite didn't understand, why in #820 decisions were made for a custom store, rather than relying on the core stores and use useEntityProp() in most of the places.

Even I know this is not your focus right now @mauteri, I would absolutely appreciate getting to know some of your reasons.

@carstingaxion carstingaxion changed the title Do not use local event-data, when inside a query Event-Date block: Do not use local event-data, when inside a query Aug 1, 2025
@mauteri
Copy link
Contributor

mauteri commented Aug 1, 2025

@carstingaxion if useEntityProp makes more sense and is more flexible then that's fine. The issue to be aware of when changing this is that the state needs to be shared between what is displayed in the block and what is set in the sidebar. And the sidebar can exist without the block (in an single event edit) and the block can exist without the sidebar (outside the single event edit).

@carstingaxion
Copy link
Collaborator Author

@carstingaxion if useEntityProp makes more sense and is more flexible then that's fine.

Cool, thank you @mauteri !

The issue to be aware of when changing this is that the state needs to be shared between what is displayed in the block and what is set in the sidebar.

Thanks for clarifying, yes that is absolutely clear.

And the sidebar can exist without the block (in an single event edit) and the block can exist without the sidebar (outside the single event edit).

Check!

That's why I introduced the event- & venue-slot-fills in #888 which includes detailed docs about that.

When you take another closer look into the short video from #1139 (comment), you can see that I'm changing venue data within the Event Settings Sidebar panel. That is the slot fill system in action.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2025

Preview changes with Playground

You can preview the recent changes for PR#1145 with the following PHP versions:

PHP Version 8.3

PHP Version 7.4

Download .zip with build changes

Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions.

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.

"Event Date" block does not show the correct date if placed in a query block, inside an event-post

2 participants