-
Notifications
You must be signed in to change notification settings - Fork 106
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
Fix Tabs/Menu/Paginator wrapping when width is too small #1973
base: develop
Are you sure you want to change the base?
Conversation
There is an fomantic/Fomantic-UI#2345 issue. How did you find the solution, any docs? Also I wonder why this PR is lowering the coverage. |
When I was developing another component I now understand what Fomantic-UI source code:
the title of this PR is correct (ie. for/based on mobile devices with small viewport width), but I would say we should NOT merge it, as we do not want to stack based on viewport width, but instead on owning element width the general usecase is limitted owning element width, like several tables (with paginator/menu) next to each other please read fomantic/Fomantic-UI#2345 - the solution is to use if you would like to get this patched before fixed in FUI officially, you need to patch CSS to add at least to fix #1780, |
@mvorisek From a UI perspective, menus should stack, not wrap from my understanding if you have small mobile screens vertically- you don‘t want more than one element per line in small viewport widths. On vertical oriented mobiles all menus are stacked in common web applications, otherwise it is not easy to be used. Wrapping would afaik line-break according to available size which can be on top for desktop screens. Nevertheless, for mobile it ahould stack. @mvorisek @lubber-de What do you think? |
src/Tabs.php
Outdated
@@ -9,7 +9,7 @@ | |||
class Tabs extends View | |||
{ | |||
public $defaultTemplate = 'tabs.html'; | |||
public $ui = 'tabular menu'; | |||
public $ui = 'tabular menu stackable'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not for menu? Please try a grid with larger horizontal top menu: The rows stack perfectly, but the menu does not in current code. With stackable all fine, so I would merge both changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #1973 (comment)
my primary comment on this PR was in reaction on "fix 1780" description, which is definitely not fixed by this PR
stackable in Menu might be ok in some cases, but UX can be visually very different and can take much more space which might be not wanted
test demos/collection/grid.php
demo - when viewport width is below stackable treshold, the table is already very badly reformat, so I would actually prefer to unstackable
there
src/Menu.php
Outdated
@@ -9,7 +9,7 @@ | |||
|
|||
class Menu extends View | |||
{ | |||
public $ui = 'menu'; | |||
public $ui = 'menu stackable'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed best would be to hide remaining menu items with three dot menu, or make it horizontally scrollable as on Amazon.de. Currently it destroys the whole UI as the menu is very wide, but the rows are stacked, so stacking at least would be consistent to rest of grid
@@ -1,4 +1,4 @@ | |||
<div class="{PaginatorType}ui pagination menu{/}"> | |||
<div class="{PaginatorType}{/}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was a bug, class is added by Paginator as well
basic: false, | ||
compact: 'very', | ||
basic: 'very', | ||
unstackable: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when width is > stackable width (desktop), the format can be hard too read already, so this needs to be fixed properly in another PR
@mkrecek234 please test this PR, my primary goal is to develop atk4/ui in a way unlimited components/nesting is possible, so the goal is not to focus on stackable (small viewports only) "wrapping buttons" together with "menu" seems to be a good workaround for fomantic/Fomantic-UI#2345 and I am completely ok to merge this PR even if the visual style might be not perfect/officially supported by Fomantic-UI ATM when wrapped |
|
FUI 2.9.2 seems to be solving this both for paginator and also for menus if we add |
Please investigate the coverage drop. |
This reverts commit c7484b4.
@mkrecek234 it is your job to answer the CI questions in order to get this PR merged. The coverage is decreased, please explain. |
fix #1780