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

Buttons overflow #38

Closed
jerone opened this issue May 8, 2015 · 8 comments · Fixed by #47
Closed

Buttons overflow #38

jerone opened this issue May 8, 2015 · 8 comments · Fixed by #47
Assignees

Comments

@jerone
Copy link
Contributor

jerone commented May 8, 2015

When exceeding the amount of buttons after the window width, buttons will overflow onto a new row in horizontal mode (see screenshot):

toolbar overflow

Buttons that exceed the window height in vertical mode, even disappear (see screenshot):

toolbar overflow vertical

@jerone
Copy link
Contributor Author

jerone commented May 8, 2015

Possible solutions:

  1. Increase (flexible) ToolBar width/height.
  2. Inherit from ScrollView instead of View and make the ToolBar scrollable.

@suda
Copy link
Collaborator

suda commented May 9, 2015

I would vote for adding another row/column of buttons when they don't fit by adjusting the width/height

@jerone jerone added the bug label May 24, 2015
@jerone
Copy link
Contributor Author

jerone commented May 25, 2015

So I thought this would be easy, but it isn't for some reason 😞

The following code adds another row on the toolbar for position top and bottom:

  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: stretch;
  align-content: flex-start;

When changing to left and right position however it does something weird. In above code I changed the flex-direction to column, but still the toolbar won't stretch to allow buttons to overflow to the right (screenshot 1). Adding width: 100%; to the parent atom-panel allows the buttons to overflow but with more width then is necessary (screenshot 2). The extra width seems to come from the minimum size is needed for all buttons to fit when minimizing the window. Why?...

no width width: 100%;
atom atom

@simurai I was hoping you could chip in as CSS expert and fellow Haarlemer 😊

@jerone
Copy link
Contributor Author

jerone commented May 25, 2015

Online demo if anyone wants to help: http://output.jsbin.com/vimihurelo/1

@simurai
Copy link
Contributor

simurai commented May 26, 2015

Hmmm.. yeah, somehow the width of the flexbox stays like there would be no wrapping. Probably a bug.. maybe same as this inline flexbox bug: https://code.google.com/p/chromium/issues/detail?id=247963

Maybe in the meantime it could wrap top/bottom, but overflow-scroll when left/right? Like https://github.com/jerone/tool-bar/pull/1


@jerone You live in Haarlem? Damn.. I lived there a few years. Super nice town.

@jerone
Copy link
Contributor Author

jerone commented May 26, 2015

@simurai commented on 26 mei 2015 07:21 CEST:

Hmmm.. yeah, somehow the width of the flexbox stays like there would be no wrapping. Probably a bug.. maybe same as this inline flexbox bug: https://code.google.com/p/chromium/issues/detail?id=247963

Looks like the same bug. Weird that both Chrome and Firefox do it 'wrong', while IE expands the container correctly. Anyways, subscribing to that issue...

Maybe in the meantime it could wrap top/bottom, but overflow-scroll when left/right? Like https://github.com/jerone/tool-bar/pull/1

Making left/right scrollable was my fallback too, and as it stands will be a good solution. I'll have a look at your PR tonight. Thank you very much for checking.


@jerone You live in Haarlem? Damn.. I lived there a few years. Super nice town.

Yeah, born and raised, in North, near the ice skating rink. "Waarom heb je in Haarlem gewoond? Vanwege werk?".

@jerone jerone self-assigned this May 26, 2015
@jerone jerone closed this as completed in 89f7d11 May 26, 2015
jerone added a commit that referenced this issue May 26, 2015
@simurai
Copy link
Contributor

simurai commented May 27, 2015

@jerone Yes, was working in Amsterdam for a few years. But I liked Haarlem more. Less tourists and more relaxed. 😄

@jerone
Copy link
Contributor Author

jerone commented May 27, 2015

@simurai Same situation. Way relaxer, and closer to the beach :P

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

Successfully merging a pull request may close this issue.

3 participants