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

Bad visual top bar on some screen size #20

Closed
PeopleInside opened this issue Jun 12, 2020 · 3 comments · Fixed by #54
Closed

Bad visual top bar on some screen size #20

PeopleInside opened this issue Jun 12, 2020 · 3 comments · Fixed by #54

Comments

@PeopleInside
Copy link

Hi, please see: https://discuss.flarum.org/d/24178-top-bar-issue-on-some-windows-size
Seems this extension is causing that issue.

Shared-Screenshot

@clarkwinkelmann
Copy link
Member

I seem to remember we had another issue about this, but I can't find it.

I see two solutions:

  • Either Flarum should allow for variable width in header through CSS, which would create a horizontal slider. I'd argue this CSS should be shipped in Flarum itself, so that any extension adding stuff there won't break the header
  • We should move additional links into a dropdown when there's not enough space

Solution 2 would be ideal, but it's not easy to implement. The available width isn't fixed. It depends not only on the browser viewport size, but also the username length! So we would need to implement an automatic calculation for which link should be the last link before a dropdown.

And all of this is assuming there's nothing else in the header. What if another extension adds something else. If that other extension also dynamically calculates the required width, we will end up with something that jumps around. We'd need something standardized in Flarum to manage the space between all extensions that want to add something.

The only "solution" for now is to simply not insert too many links, or shorten the labels. I believe we have since introduced the ability to create dropdowns manually, so that's an easy way to group links to reduce horizontal size.

Not really the same, but related https://github.com/flarum/core/issues/1475

@Hona
Copy link

Hona commented Mar 11, 2021

I'm having the same issue, is there some way to make it auto collapse at a wider width?

@frie
Copy link

frie commented Mar 2, 2022

I seem to remember we had another issue about this, but I can't find it.

I see two solutions:

  • Either Flarum should allow for variable width in header through CSS, which would create a horizontal slider. I'd argue this CSS should be shipped in Flarum itself, so that any extension adding stuff there won't break the header
  • We should move additional links into a dropdown when there's not enough space

Solution 2 would be ideal, but it's not easy to implement. The available width isn't fixed. It depends not only on the browser viewport size, but also the username length! So we would need to implement an automatic calculation for which link should be the last link before a dropdown.

And all of this is assuming there's nothing else in the header. What if another extension adds something else. If that other extension also dynamically calculates the required width, we will end up with something that jumps around. We'd need something standardized in Flarum to manage the space between all extensions that want to add something.

The only "solution" for now is to simply not insert too many links, or shorten the labels. I believe we have since introduced the ability to create dropdowns manually, so that's an easy way to group links to reduce horizontal size.

Not really the same, but related flarum/core#1475

A less automatic solution would be to give the choice to the admin: optionally display the links in a dropdown menu. I added some custom css - my site looks better now than before, but not as perfect as I would like. A styling bundled with the extension probably will much better than some css I have to fiddle together myself.

@imorland imorland linked a pull request Feb 1, 2023 that will close this issue
3 tasks
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 a pull request may close this issue.

4 participants