Gerrit header and top menu

278 views
Skip to first unread message

Blewitt, Alex

unread,
Sep 11, 2013, 8:46:15 AM9/11/13
to repo-d...@googlegroups.com

Is there a reason why the Gerrit header (provided by GerritSiteHeader.html file) is below the main Gerrit menu?

 

https://gerrit.googlesource.com/gerrit/+/master/gerrit-httpd/src/main/resources/com/google/gerrit/httpd/raw/HostPage.html

 

<body>

    <div id="gerrit_topmenu"></div>

    <div id="gerrit_header"></div>

    …

 

This results in some odd ordering; for example, on the Eclipse Gerrit page, the Eclipse logo is sandwiched in the middle of the Gerrit menu options and the main page body.

 

Swapping the order of these divs results in the GerritSiteHeader.html actually being at the top of the page, allowing the Gerrit menu and body to be closer together.

 

<body>

-    <div id="gerrit_topmenu"></div>

     <div id="gerrit_header"></div>

+    <div id="gerrit_topmenu"></div>

 

I’m happy to provide a patch but wanted to verify before doing so whether there was a real reason to have them in this order before I do.

 

Alex

 

The Goldman Sachs Group, Inc. All rights reserved.

See http://www.gs.com/disclaimer/global_email for important risk disclosures, conflicts of interest and other terms and conditions relating to this e-mail and your reliance on information contained in it.  This message may contain confidential or privileged information.  If you are not the intended recipient, please advise us immediately and delete this message.  See http://www.gs.com/disclaimer/email for further information on confidentiality and the risks of non-secure electronic communication.  If you cannot access these links, please notify us by reply message and we will send the contents to you. 

 

Shawn Pearce

unread,
Sep 11, 2013, 11:31:42 AM9/11/13
to Blewitt, Alex, repo-d...@googlegroups.com
On Wed, Sep 11, 2013 at 5:46 AM, Blewitt, Alex <Alex.B...@gs.com> wrote:
> Is there a reason why the Gerrit header (provided by GerritSiteHeader.html
> file) is below the main Gerrit menu?

Historical reasons. When we launched Android Open Source Project
someone wanted the AOSP logo below the Gerrit menu and above the
content. So we put it there. When we wrote Gerrit 2.x and made it
actually useful for other projects, we made that block of HTML
replaceable as GerritSiteHeader.html.

In the past ~5 years, nobody has done anything about this. :-)

> This results in some odd ordering; for example, on the Eclipse Gerrit page,
> the Eclipse logo is sandwiched in the middle of the Gerrit menu options and
> the main page body.

Yup.

> Swapping the order of these divs results in the GerritSiteHeader.html
> actually being at the top of the page, allowing the Gerrit menu and body to
> be closer together.

This will break a number of existing site header HTML blocks. Its
maybe a change that can be done, I'm just saying its going to break
things. Admins will need to update their HTML/CSS rules to account for
the modified layout.

Martin Fick

unread,
Sep 11, 2013, 11:42:11 AM9/11/13
to repo-d...@googlegroups.com, Shawn Pearce, Blewitt, Alex
On Wednesday, September 11, 2013 09:31:42 am Shawn Pearce
wrote:
> > Swapping the order of these divs results in the
> > GerritSiteHeader.html actually being at the top of the
> > page, allowing the Gerrit menu and body to be closer
> > together.
>
> This will break a number of existing site header HTML
> blocks. Its maybe a change that can be done, I'm just
> saying its going to break things. Admins will need to
> update their HTML/CSS rules to account for the modified
> layout.

Would it then make sense to add another header that lives
where the current one does? Then admins could pick either.

-Martin


--
The Qualcomm Innovation Center, Inc. is a member of Code
Aurora Forum, hosted by The Linux Foundation

Luca Milanesio

unread,
Sep 11, 2013, 11:59:21 AM9/11/13
to Martin Fick, repo-d...@googlegroups.com, Shawn Pearce, Blewitt, Alex
That would be a better approach IMHO.
Still we managed to put it where we wanted, using CSS absolute positioning of the DIV ;-)

Luca.
> --
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages