Skip to content

Conversation

@cyruscollier
Copy link

@cyruscollier cyruscollier commented Oct 27, 2025

This PR addresses two bugs we came across recently:

  1. There is currently no control to disable the Tabs subtitle panels in the Tabs block visibility settings.
  2. There is a reactivity issue with updating visibility settings where after you change the first select value, subsequent changes do not update in the UI.

To fix these, we made the following changes:

  1. Added an "Enable Subtitle Settings" entry in the Tabs visibility settings.
  2. Regenerated the languages .pot file using wp i18n make-pot . languages/kadence-blocks.pot. It seems this hadn't been done in a few weeks, so that's why there are many more changes to this file beside the new visibility setting. If there's a different way this file is typically generated, I can make that adjustment.
  3. For the specific "Tab Subtitle Color" section and the subtitle typography controls, the display of those is now also conditional on whether "Tab Title Color" and "Tab Title Font", respectively, is enable. My opinion is that if the title color or font controls are disabled, there's no reason for the subtitle version of those to be enabled. However, if someone thinks it'd be more explicit to add those as separate visibility settings, I can make that change.
  4. Rewrote the saveConfigState() function in block visibility to make copies of the config object and pass a callback to useState(). This ensures a fully reactive config object that properly syncs in the reactivity cycle.

Checklist

  • I have performed a self-review.
  • No unrelated files are modified.
  • No debugging statements exist (Ex: console.log, error_log).
  • There are no warnings or notices in the wordpress error log.
  • Passes all tests (linting, acceptance, & unit)

Block specific checklist (where relevant)

  • Tested with an existing instance of this block .
  • Tested creating a new instance of this block.

@cyruscollier cyruscollier changed the title Bugfix: Tabs subtitle visibility Bugfix: Tabs subtitle visibility / visibility reactivity Oct 27, 2025
@cyruscollier cyruscollier marked this pull request as ready for review October 27, 2025 20:10
@mark-c-woodard
Copy link
Contributor

@cyruscollier this looks good overall.
For point number 4 was there a specific bug or issue with the saving that you were seeing. Just wondering the reason behind that specific change.

@cyruscollier
Copy link
Author

cyruscollier commented Oct 30, 2025

Hey @mark-c-woodard, thanks for taking a look at this. While updating the Kadence Visibility Settings, we noticed that we could only change one setting at a time before the reactivity of the controls stopped and we had to close and re-open the modal. Here's a short screen recording of what we were seeing (ran from the released Kadence Blocks version 3.5.26).

kadence-block-visibility.mp4

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