Skip to content

fix: avoid rendering the design library modal again#3699

Open
Arukuen wants to merge 1 commit into
developfrom
fix/3698-modal-tour-closes
Open

fix: avoid rendering the design library modal again#3699
Arukuen wants to merge 1 commit into
developfrom
fix/3698-modal-tour-closes

Conversation

@Arukuen
Copy link
Copy Markdown
Contributor

@Arukuen Arukuen commented May 12, 2026

fixes #3698

The issue is caused by the design library tour rendering more than once.

  1. src/plugins/guided-modal-tour/index.js sees tour=design-library and clicks the Design Library toolbar button after 500ms. This part is correct and will render the guided tours triggered by the Design Library Modal.

  2. src/plugins/guided-modal-tour/editor-block-tour.js also sees tour=design-library and renders

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where certain guided tours could create duplicate modals and unexpectedly close related modals.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a176682a-d2ff-4079-a5a4-c3f29d1e80ae

📥 Commits

Reviewing files that changed from the base of the PR and between 2438d9e and 55612b2.

📒 Files selected for processing (1)
  • src/plugins/guided-modal-tour/editor-block-tour.js

📝 Walkthrough

Walkthrough

This PR prevents the editor-block tour plugin from rendering tours owned by modal dialogs. A new MODAL_OWNED_TOURS constant lists tour IDs that should be skipped, and the component's guard condition now returns null when the current tour is in that exclusion list, avoiding duplicate modals and unexpected modal closures.

Changes

Modal-Owned Tours Guard

Layer / File(s) Summary
Modal-owned tours guard and constant
src/plugins/guided-modal-tour/editor-block-tour.js
MODAL_OWNED_TOURS constant is defined with tour IDs that must not render from this plugin. The component guard is extended to skip rendering when tourId is falsy or matches one of the excluded tour IDs.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A tour guide learns to step aside,
When modals own what tours provide,
No duplicate doors shall swing,
Just harmony in everything!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: preventing the design library modal from being rendered again, which directly addresses the duplicate rendering issue.
Linked Issues check ✅ Passed The code changes implement the fix for issue #3698 by preventing duplicate design library modal rendering through the editor-block-tour plugin.
Out of Scope Changes check ✅ Passed All changes are within scope: the modification only adds a guard to prevent duplicate modal rendering in the editor-block-tour plugin, directly addressing the linked issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/3698-modal-tour-closes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

🤖 Pull request artifacts

file commit
pr3699-stackable-3699-merge.zip 55612b2

github-actions Bot added a commit that referenced this pull request May 12, 2026
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.

The first Stackable tour closes right away

1 participant