Skip to content

Fix showing two modals after pressing ctrl+k or / to open the search modal for the first time #3909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

DamianMaslanka5
Copy link
Contributor

@DamianMaslanka5 DamianMaslanka5 commented Jun 7, 2025

Current behavior is very annoying, so I decided to just fix this.

closes #3191, closes #3271

mp4 from #3191 (comment) (this a bit old, now there are only two modals instead of three)

msedge_0W46PhmL8K.mp4

@DamianMaslanka5 DamianMaslanka5 requested a review from a team as a code owner June 7, 2025 11:03
Copy link

vercel bot commented Jun 7, 2025

@DamianMaslanka5 is attempting to deploy a commit to the ClickHouse Team on Vercel.

A member of the Team first needs to authorize it.

@DamianMaslanka5
Copy link
Contributor Author

DocCheck failed because of the issue fixed in ClickHouse/ClickHouse#81469, so I guess that re-running the job will fix it

Copy link

vercel bot commented Jun 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clickhouse-docs ✅ Ready (Inspect) Visit Preview Jun 12, 2025 9:28pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
clickhouse-docs-ru ⬜️ Ignored (Inspect) Visit Preview Jun 12, 2025 9:28pm
clickhouse-docs-zh ⬜️ Ignored (Inspect) Visit Preview Jun 12, 2025 9:28pm

@Blargian
Copy link
Member

Blargian commented Jun 7, 2025

@DamianMaslanka5 this fixes the docs search but breaks the mobile menu at certain widths bigger than the docusaurus breakpoint. See below (hamburger is missing):

Screenshot 2025-06-07 at 17 20 24

The current mobile menu system is terrible, I'll merge something shortly to fix and then we can integrate this change.

@DamianMaslanka5
Copy link
Contributor Author

@Blargian nice catch, I was thinking only about desktop and mobile breakpoints.

There are two solution for this issue:

  1. Make sure only one SearchBar is loaded
  2. Change SearchBar to make sure only one modal can be opened

Let's wait for #3890, then let's get back to this and see which solution makes sense.

@DamianMaslanka5 DamianMaslanka5 force-pushed the fix-search-multiple-modals branch from 5d736dc to 8275e1a Compare June 12, 2025 20:32
@DamianMaslanka5
Copy link
Contributor Author

@Blargian I decided to go with 2. from #3909 (comment). I rebased the branch and force pushed the changes.

Changing the SearchBar component is better because now we can be sure that another change to the layout will not reintroduce the issue.

Copy link
Member

@Blargian Blargian left a comment

Choose a reason for hiding this comment

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

LGTM!

@Blargian Blargian merged commit ef042b9 into ClickHouse:main Jun 12, 2025
12 checks passed
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.

Improvement: auto focus search [BUG] Using ctrl+k on knowledge base pages opens two modals
2 participants