Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 707286 - Devmanual navigation bars need too much space
Summary: Devmanual navigation bars need too much space
Status: RESOLVED FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Devmanual (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Devmanual Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-01-29 19:36 UTC by Ulrich Müller
Modified: 2020-02-28 10:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Current header (img1.png,116.69 KB, image/png)
2020-01-29 19:38 UTC, Ulrich Müller
Details
Suggested change (img2.png,130.10 KB, image/png)
2020-01-29 19:39 UTC, Ulrich Müller
Details
Mobile fix to current layout (2020-01-29 16.18.16 devmanual.gentoo.org 0898ce03d9bd.png,6.52 KB, image/png)
2020-01-29 21:20 UTC, Brian Evans (RETIRED)
Details
devbook.xsl: Include the search box in the navbar above. (0001-devbook.xsl-Include-the-search-box-in-the-navbar-abo.patch,3.88 KB, patch)
2020-01-29 21:31 UTC, Ulrich Müller
Details | Diff
Window capture with proposed change (2020-01-29 16.42.25 devmanual.gentoo.org 59e19f9f4762.png,20.63 KB, image/png)
2020-01-29 21:43 UTC, Brian Evans (RETIRED)
Details
devbook.xsl: Remove redundant "Home" button. (0001-devbook.xsl-Remove-redundant-Home-button.patch,2.18 KB, patch)
2020-02-09 15:30 UTC, Ulrich Müller
Details | Diff
devmanual-remove-search-collapse.patch (devmanual-remove-search-collapse.patch,1.88 KB, patch)
2020-02-25 19:49 UTC, Brian Evans (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2020-01-29 19:36:49 UTC
Currently the devmanual has in its header:

1. Gentoo site header
2. Navigation bar with a "Home" button, a dropdown list, previous and next section buttons
3. Search box
4. List of all parents up to the document root

This takes a lot of vertical space. Also, the "Home" button is redundant to both the "Back to the homepage" link above and the "Master Index" link below, so it isn't very useful.

So, what would you think about combining 2 and 3 into a single navigation bar? I have some proof of concept code already working, see attached screenshots.
Comment 1 Ulrich Müller gentoo-dev 2020-01-29 19:38:34 UTC
Created attachment 608392 [details]
Current header
Comment 2 Ulrich Müller gentoo-dev 2020-01-29 19:39:38 UTC
Created attachment 608394 [details]
Suggested change

This removes the redundant "Home" button, to make space for the search field in the same row.
Comment 3 Brian Evans (RETIRED) gentoo-dev 2020-01-29 19:43:33 UTC
(In reply to Ulrich Müller from comment #2)
> Created attachment 608394 [details]
> Suggested change
> 
> This removes the redundant "Home" button, to make space for the search field
> in the same row.

How would this look on mobile?  As is, the search box would disappear and not be usable, unless we add a hidden medium box as well.  You can use the responsive view in most browser devtools to check.
Comment 4 Ulrich Müller gentoo-dev 2020-01-29 20:50:52 UTC
(In reply to Brian Evans from comment #3)
> How would this look on mobile?  As is, the search box would disappear and
> not be usable, unless we add a hidden medium box as well.  You can use the
> responsive view in most browser devtools to check.

Good point. AFAICS, the search box disappears at the same width, regardless if it's in the same navbar, or in its own row. And you can get it back (in both cases) by pressing the toggle-navbar button at the right hand side.
Comment 5 Brian Evans (RETIRED) gentoo-dev 2020-01-29 21:17:34 UTC
(In reply to Ulrich Müller from comment #4)
> (In reply to Brian Evans from comment #3)
> > How would this look on mobile?  As is, the search box would disappear and
> > not be usable, unless we add a hidden medium box as well.  You can use the
> > responsive view in most browser devtools to check.
> 
> Good point. AFAICS, the search box disappears at the same width, regardless
> if it's in the same navbar, or in its own row. And you can get it back (in
> both cases) by pressing the toggle-navbar button at the right hand side.

The search bar was added poorly for mobile IMO, adding the collapse there is silly for one control.  Also, the logo is not visible which I can easily fix.
Comment 6 Brian Evans (RETIRED) gentoo-dev 2020-01-29 21:20:53 UTC
Created attachment 608558 [details]
Mobile fix to current layout

Removed collapse on search and remove logo class to actually show the logo
Comment 7 Ulrich Müller gentoo-dev 2020-01-29 21:31:08 UTC
Created attachment 608560 [details, diff]
devbook.xsl: Include the search box in the navbar above.

Here's what I have here, i.e., what produces the layout of attachment 608394 [details].

People doing development work on mobile devices, is that really a use case for which we must optimize? (With the single navbar, the search box would still be usable, with one extra click.)
Comment 8 Brian Evans (RETIRED) gentoo-dev 2020-01-29 21:43:57 UTC
Created attachment 608562 [details]
Window capture with proposed change

(In reply to Ulrich Müller from comment #7)
> Created attachment 608560 [details, diff] [details, diff]
> devbook.xsl: Include the search box in the navbar above.
> 
> Here's what I have here, i.e., what produces the layout of attachment 608394 [details]
> [details].
> 
> People doing development work on mobile devices, is that really a use case
> for which we must optimize? (With the single navbar, the search box would
> still be usable, with one extra click.)

It looks wrong to me as is.  The Search bar still does the entire length if I edit in the devtools. It would need to be in the same ul to be on the same line.
Comment 9 Ulrich Müller gentoo-dev 2020-01-29 22:26:08 UTC
(In reply to Brian Evans from comment #8)
> It looks wrong to me as is.  The Search bar still does the entire length if
> I edit in the devtools. It would need to be in the same ul to be on the same
> line.

Indeed, it doesn't look right with some browsers, e.g., with Opera. Seems that Bootstrap doesn't support input groups in navbars, only forms (which is what the wiki uses).
Comment 10 Ulrich Müller gentoo-dev 2020-02-09 15:29:47 UTC
Reopening, because I think that the following is still valid.

> The "Home" button is redundant to both the "Back to the homepage" link
> above and the "Master Index" link below, so it isn't very useful.
Comment 11 Ulrich Müller gentoo-dev 2020-02-09 15:30:41 UTC
Created attachment 613086 [details, diff]
devbook.xsl: Remove redundant "Home" button.
Comment 12 Ulrich Müller gentoo-dev 2020-02-09 15:34:00 UTC
@arzano: CCing you, because we had discussed the issue at FOSDEM.

Problem is that the navbar still collapses at the same width, even if it contains only three instead of four items. Is that width a hardcoded constant in the Tyrian layout?
Comment 13 Brian Evans (RETIRED) gentoo-dev 2020-02-25 19:49:33 UTC
Created attachment 615938 [details, diff]
devmanual-remove-search-collapse.patch

Patch to remove collapse from search bar which hides it on small devices
Comment 14 Ulrich Müller gentoo-dev 2020-02-25 19:58:36 UTC
Comment on attachment 613086 [details, diff]
devbook.xsl: Remove redundant "Home" button.

(In reply to Ulrich Müller from comment #11)
> Created attachment 613086 [details, diff] [details, diff]
> devbook.xsl: Remove redundant "Home" button.

I withdraw this one too. The home button is present on other Gentoo sites, so we should keep it as well (and it doesn't take much space).
Comment 15 Ulrich Müller gentoo-dev 2020-02-28 10:37:51 UTC
(In reply to Brian Evans from comment #13)
> Created attachment 615938 [details, diff] [details, diff]
> devmanual-remove-search-collapse.patch
> 
> Patch to remove collapse from search bar which hides it on small devices

Committed: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=62bfb0e50692e56b5a6d6559e85a587a62e67789

commit 62bfb0e50692e56b5a6d6559e85a587a62e67789
Author: Ulrich Müller <ulm@gentoo.org>
Date:   Tue Feb 25 21:10:27 2020 +0100

    devbook.xsl: Remove collapse from search bar.
    
    In order not to hide it on small devices.
    Patch from Brian Evans <grknight@gentoo.org> in bug 615938.
    
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

Let's consider this bug as fixed.