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

Feat/search and navbar #874

Merged
merged 4 commits into from
Sep 12, 2022
Merged

Feat/search and navbar #874

merged 4 commits into from
Sep 12, 2022

Conversation

lorenzolewis
Copy link
Member

  • Remove the search item from navbar (this doesn't stop it from being rendered, just moves it to the very end of the navbar)
  • Switch to using built-in Docusaurus theming for the search bar input
    • This allows us to remove the useColorMode hook that was also causing a bit of flickering on first load or when changing colors
  • Rebuild the search results CSS from the ground up
    • It should behave a lot better on mobile and at the very least we have a lot more precise control as we're no longer importing the vendor CSS from docs-searchbar.js
  • Collapse trailing navbar text if screen size would cause wrapping

I want to tweak the CSS overtime on the search results, but I think the results we get back from the indexer need optimised first (the CSS isn't concatenating a lot of the values, they're concatenated when sent back from the indexer)

Before:
Screenshot 2022-09-11 at 21 45 44

After:
Screenshot 2022-09-11 at 21 45 09

@github-actions
Copy link

github-actions bot commented Sep 11, 2022

🚀 Deployed on https://deploy-preview-874--tauri.netlify.app

@github-actions github-actions bot temporarily deployed to pull request September 11, 2022 20:58 Inactive
@FabianLars
Copy link
Member

the only thing is that i think the breakpoints need to trigger a little earlier when shrinking the window so you don't see this stuff:
grafik
grafik

@FabianLars
Copy link
Member

Follow up on the above message: This is only a problem if i resize the window itself (firefox), if i resize the mobile emulator window (the devtools thingy) the breakpoints are correct :/

@lorenzolewis
Copy link
Member Author

I should have known better than to have it that close when it comes to dimensions. What are standard font and point sizes anyway?

@github-actions github-actions bot temporarily deployed to pull request September 11, 2022 21:17 Inactive
@FabianLars
Copy link
Member

The new one is a littleee bit too early, but it's good enough to leave it like this. 👍 And the other breakpoints seems to be from docusaurus so the only other thing would be to remove some other element so that the logo and guides don't overlap, buuut yeah, let's just leave it. That 10px range should be small enough i guess 🤷

@lorenzolewis
Copy link
Member Author

Yeah, unfortunately the only things Docusaurus recommends are to remove navbar items to fix it 😅 facebook/docusaurus#7635

@lorenzolewis lorenzolewis merged commit 9314eb7 into dev Sep 12, 2022
@lorenzolewis lorenzolewis deleted the feat/search-and-navbar branch September 12, 2022 10:07
@RudraSen2
Copy link

RudraSen2 commented Sep 7, 2023

@lorenzolewis, what browser are you using in the picture?

@lorenzolewis
Copy link
Member Author

Safari

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.

3 participants