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

Editor / Keep tabs at top. #5463

Open
wants to merge 3 commits into
base: 3.12.x
Choose a base branch
from

Conversation

alcinnz
Copy link
Contributor

@alcinnz alcinnz commented Mar 1, 2021

This keeps the tabs always within reach no matter how far down the page you scroll. Design feedback appreciated!

@fxprunayre fxprunayre requested a review from MichelGabriel March 2, 2021 05:19
@MichelGabriel
Copy link
Contributor

Great idea, it works as expected, thanks! But there are a couple of visual things that caught my attention:

  • it has a blueish background color, not a white one
  • because of the height of the navbar the border-bottom is not connected to the tabs, there is some space in between
  • when you scroll you see the content underneath the navbar, I prefer it hidden (probably a bit tricky to achieve)
  • it would be nice to use a variable for the height of the navbar: height: @gn-menubar-height;

gn-tabs-at-top

@alcinnz
Copy link
Contributor Author

alcinnz commented Mar 2, 2021

I struggled to address the issue with content appearing above the tabs, but I reduced some of the issues by enlarging the width which I'm filling in with (now) white.

As for the spacing between the tabs and their underline, that was already present before I started this work. It looks like GN is what adds the underline (making it easy to e.g. remove), but I'm not seeing where that gap comes from. Probably Bootstrap.

@fxprunayre fxprunayre changed the title Keep tabs at top. Editor / Keep tabs at top. Apr 13, 2021
@MichelGabriel
Copy link
Contributor

My apologies for keeping this PR open for so long.

I played around with some styles and to remove the gap you can do this for the toggle:

form.gn-editor div[data-gn-toggle] {
    position: fixed;
    width: 80px;
    height: 70px;
    top: 50px;
    z-index: 1;
    background: #fff;
    padding-top: 20px;
    right: auto !important;
    margin-left: -5px;
}

and for the navbar something like this:

[ng-app="gn_editor"] form.gn-editor .nav {
    min-height: 42px;
    height: 70px;
    padding-top: 20px;
    margin-top: -30px;
}

only thing is, a fixed navbar doesn't look so good on a really small screen.

Another option would be to put the navbar and toggle both in a new <div> and make this one stick to the top (with removing the fixed position for the navbar and toggle).

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


ByronCinNZ seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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