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

Support search bar in siteNav #973

Closed
damithc opened this issue Jan 10, 2020 · 6 comments · Fixed by #1403
Closed

Support search bar in siteNav #973

damithc opened this issue Jan 10, 2020 · 6 comments · Fixed by #1403

Comments

@damithc
Copy link
Contributor

damithc commented Jan 10, 2020

v2.9.0
Current: the search bar is in the topNav
Problem: user needs to scroll to top before searching
Suggestion: provide a way to insert a search bar into the siteNav (which has a sticky behavior compared to topNav)

@damithc damithc added f-Search s.UnderDiscussion The team will evaluate this issue to decide whether it is worth adding a-ReaderUsability labels Jan 10, 2020
@yash-chowdhary
Copy link
Contributor

yash-chowdhary commented Jan 15, 2020

I'm not sure, but can this issue be resolved by just hardcoding the search bar into the template site-nav.md file? This way every website created would have it if initialized with the default template.
The change I made to site-nav.md is reflected here -

Screenshot 2020-01-15 at 1 42 43 PM

Does this meet the requirement, or is there something else that this issue was targeting?

@le0tan
Copy link
Contributor

le0tan commented Jan 15, 2020

We can provide an option to stick the navbar on the screen so that the search bar is always accessible, reference design is described in #980

@damithc
Copy link
Contributor Author

damithc commented Jan 15, 2020

Being able to add a search box to the siteNav is good enough me. I tried adding the one and here are the problems I encountered:

Search results get clipped.
image

Doesn't seem to work with Algolia search.

<form class="navbar-form">
  <searchbar placeholder="Search" algolia menu-align-left></searchbar>
</form>

image

le0tan added a commit to le0tan/markbind that referenced this issue Jan 15, 2020
This should provide an alternative solution to MarkBind#973, without causing too
much trouble.
@ang-zeyu
Copy link
Contributor

@ang-zeyu ang-zeyu added d.moderate p.Low and removed s.UnderDiscussion The team will evaluate this issue to decide whether it is worth adding labels Jun 16, 2020
@damithc
Copy link
Contributor Author

damithc commented Jun 16, 2020

I see. May be not a big issue if the TopNav can be reliably fixed to the stop as users can easily access the search bar through the TopNav.

@ang-zeyu
Copy link
Contributor

ang-zeyu commented Dec 6, 2020

now possible with the new layouts system #1403, as overflow can be set just on the <site-nav> component itself

I've ensured this works with the user guide and markbind init templates, but left the search bar on the top right

@ang-zeyu ang-zeyu mentioned this issue Dec 6, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants