Skip to content

alpha-54: Site title no longer wraps - search box moves #2699

Closed

Description

@TomBrien

🐛 Bug Report

In alpha-0.49 and previous (I believe but I'm struggling to get these to build now), longer site titles would wrap at the search in the header bar. This was especially important on mobile browsers where the width is obviously limited. As of alpha-54, the title is not wrapping and search box is being pushed out of the header.

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. Install Docusaurus and set up with a multi-word site title (total length more than 12 characters or so)
  2. Enable the search plug in
  3. Visit site on a mobile browser

Expected behavior

Words should wrap to ensure proper placement of search box

Actual Behavior

Title is shown on one line and search is moved
iOS:
IMG_0993

Pixel 4 (on BrowserStack)
image

Your Environment

  • Docusaurus version used: alpha-54
  • Environment name and version: Chrome and Safari on iOS,
  • Operating system and version (desktop or mobile): iOS on iPhone XS. Using browser stack I see it on other devices, including android, depending on screen size/resolution

Activity

  1. added
    bug
    status: needs triage
    on Apr 30, 2020
  2. yangshun commented on Apr 30, 2020

    @yangshun
    Contributor

    There's no good way around this as the site title can be potentially very long. I think as a lasting solution we could make the search as an icon-only on mobile, and focusing on it will expand and fill the whole bar, and the title disappears.

  3. added and removed
    status: needs triage
    on Apr 30, 2020
  4. TomBrien commented on Apr 30, 2020

    @TomBrien
    ContributorAuthor

    An icon that expands (on top of title) when tapped would be a really nice solution. Or on mobile move the search into the hamburger menu

  5. marcosvega91 commented on Apr 30, 2020

    @marcosvega91
    Contributor

    Hi, the only thing to do is to change the media query of the search-bar class.
    Now the icon is shown under 360px. I think that we need to change it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions