Skip to content

[MOOSE-409] Fix tab block validation via dynamic child tab render - #372

Open
GeoffDusome wants to merge 4 commits into
mainfrom
bug/fix-tab-blocks
Open

[MOOSE-409] Fix tab block validation via dynamic child tab render#372
GeoffDusome wants to merge 4 commits into
mainfrom
bug/fix-tab-blocks

Conversation

@GeoffDusome

@GeoffDusome GeoffDusome commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What does this do/fix?

Fixes Horizontal and Vertical Tabs block validation errors and default active-tab behavior in the editor.

Editors without unfiltered_html hit KSES sanitization on save, which strips attributes (like tabindex) from statically saved tab panel markup and causes block validation errors on the next load. This follows the GUQ approach instead of the earlier omit-tabindex-from-save / reapply-via-JS workaround:

  • Migrate child horizontal-tab and vertical-tab blocks to dynamic render.php (save only inner block content)
  • Panels always render hidden on the front end; existing tabs.js opens the first panel
  • Wait until the first child has a persisted blockId before setting the default active tab in the editor
  • Extract shared parent tab controllers into Components/Blocks/Tabs (Base_Tabs_Block_Controller + horizontal/vertical subclasses)

Jira: https://moderntribe.atlassian.net/browse/MOOSE-409

Related reference: https://github.com/moderntribe/guq/pull/184, https://github.com/moderntribe/guq/pull/187

QA

Links to relevant issues

Screenshots/video:

  • N/A (behavior/validation fix)

Preview: https://moose-dev-pr372.d1.moderntribe.qa/

Pull request checklist

  • I've added a changelog entry for these changes.
  • I've linked to a relevant Jira issue.
  • I've captured a screenshot or screencast of the changes and linked it above.

@GeoffDusome GeoffDusome self-assigned this Jul 24, 2026
@GeoffDusome GeoffDusome changed the title Fix tab block validation and default active tab [MOOSE-409] Fix tab block validation and default active tab Jul 24, 2026
@GeoffDusome GeoffDusome added the Launch Environment Deploys to dokku label Jul 29, 2026
GeoffDusome and others added 2 commits July 29, 2026 11:00
Migrate horizontal/vertical child tab blocks to render.php and share parent
controllers under Blocks/Tabs. Wait for child blockId before selecting the
default active tab in the editor.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@GeoffDusome GeoffDusome changed the title [MOOSE-409] Fix tab block validation and default active tab [MOOSE-409] Fix tab block validation via dynamic child tab render Jul 29, 2026

@spadilha spadilha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Looks good, Geoff! Thanks for applying it to both the Vertical and Horizontal Tabs blocks. This should make them more future-proof.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants