Skip to content

Conversation

@GeoffDusome
Copy link
Contributor

What does this do/fix?

This PR fixes an issue @Vinsanity was having with Mediavine where a CPT existed with only one taxonomy assigned. This caused the onChange function of the SelectControl to never be able to be called, which meant the value was never correct for the block on this post type.

To fix, I've done the following:

  • Set the default value from the taxonomyToUse attribute on the block to an empty string.
  • Updated the SelectControl for taxonomyToUse to use a disabled option as it's default state. This means, unless set in a pattern or template, the block will always default to "no taxonomy selected".
  • Cleaned up the edit.js file to use withSelect, as this is the intended way to grab information from the select API prior to rendering blocks.
  • Updated the post.php and post-left-aligned.php patterns to specifically choose the category taxonomy as the default for those usages of the block (otherwise no taxonomy would be chosen when creating new posts).

Additionally:

  • I updated some of the comments in the style files to be consistent with other blocks
  • We are now disabling pointer events for links in the editor. You shouldn't be able to click any links within the block in the editor now.

QA

Links to relevant issues

Screenshots/video:

Copy link
Contributor

@Vinsanity Vinsanity left a comment

Choose a reason for hiding this comment

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

🟢 Very nice! Thanks Geoff.

* Terms Block - Terms Link (disable pointer events in editor)
* ----------------------------------------------------------------------- */

.wp-block-tribe-terms__link {
Copy link
Contributor

Choose a reason for hiding this comment

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

thank you!

Copy link
Collaborator

@dpellenwood dpellenwood left a comment

Choose a reason for hiding this comment

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

Nice improvement!

@GeoffDusome GeoffDusome added In QA Waiting on QA and removed Needs FE Review labels Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

In QA Waiting on QA Launch Environment Deploys to dokku

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants