Skip to content
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

Navbar renders a useless SearchBox element when site does not have any search plugin #8889

Closed
4 of 7 tasks
tyzion opened this issue Apr 13, 2023 · 3 comments · Fixed by #9385
Closed
4 of 7 tasks

Navbar renders a useless SearchBox element when site does not have any search plugin #8889

tyzion opened this issue Apr 13, 2023 · 3 comments · Fixed by #9385
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Milestone

Comments

@tyzion
Copy link

tyzion commented Apr 13, 2023

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Hi, I was using the version beta .20, then I updated all my docusaurus dependencies to the latest, but, even though I haven't installed the search package or have no item of type search in my docusaurus.config, I still notice a div with searchBox_node_modules-@docusaurus-theme-classic-lib-theme-Navbar-Search-styles-module as class in my navbar. And I can't find any reference to it in my project.
It's just the stylings given in a css found in the node_modules, which is a media-query with min-width 997px

Can you please help me?

Reproducible demo

No response

Steps to reproduce

visit my website www.fattura24.com and if you inspect the code you can see at the most right of the navbar a little div which eats up a little space, with class specified in the description.

Expected behavior

no div with SearchBox

Actual behavior

div with class SearchBox

Your environment

node 18
docusaurus 2.4.0

Self-service

  • I'd be willing to fix this bug myself.
@tyzion tyzion added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Apr 13, 2023
@slorber slorber removed the status: needs triage This issue has not been triaged by maintainers label Apr 13, 2023
@slorber
Copy link
Collaborator

slorber commented Apr 13, 2023

Yes we render a useless element here, related to #7990

We could make it possible to not have this element in the first place (preferable) but this requires an API breaking change.

We could also keep it for now, and ensure it doesn't take and space

@slorber slorber changed the title SearchBox in navbar Navbar renders a useless SearchBox element when site does not have any search plugin Apr 13, 2023
@slorber slorber linked a pull request Apr 13, 2023 that will close this issue
3 tasks
@tyzion
Copy link
Author

tyzion commented Apr 13, 2023

thanks! didn't see the pull request!

@slorber
Copy link
Collaborator

slorber commented Oct 8, 2023

will be fixed in #9385

@slorber slorber closed this as completed Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
2 participants