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

Missing personal toolbar when expanding the horizontal toolbar #950

Closed
hvelarde opened this issue Sep 11, 2015 · 15 comments
Closed

Missing personal toolbar when expanding the horizontal toolbar #950

hvelarde opened this issue Sep 11, 2015 · 15 comments
Assignees
Milestone

Comments

@hvelarde
Copy link
Member

The toolbar with icons only:

selection_004

The toolbar expanded with legends; the user icon is missing:

selection_005

@hvelarde hvelarde added this to the Plone 5.0 milestone Sep 11, 2015
@vangheem
Copy link
Member

\cc @bloodbare

@hvelarde hvelarde mentioned this issue Sep 11, 2015
19 tasks
@ichim-david
Copy link
Sponsor Member

It's not missing, it's just moved to the bottom below the toolbar.
At least with plone 5.0rc I can still see faintly the white text.
I am checking the css to see if I can easily fix it.

On a side note what a frustrating way to find out how to change the toolbar from left to top.
I tried to search google how to change the pattern and the best that I got was code talk such as this
plone/plone.app.layout@176bdca
where I had to go in configuration resources and change the option from the side to the top as modifying the class to use in viewlets/toolbar.pt didn't make any difference ( turns out the classes need to be added on the body).

@hvelarde
Copy link
Member Author

@ichim-david there's an option on the Site control panel configlet for that.

@ichim-david ichim-david self-assigned this Sep 13, 2015
@pbauer
Copy link
Sponsor Member

pbauer commented Sep 13, 2015

ichim-david added a commit that referenced this issue Sep 13, 2015
- Add content views from right to left to options subset until
  personal toolbar fits on the same line as the other menus
- Cleaned hideElements of duplicated selectors
- Take into consideration that you could go from a width that can't
  fit the toolbar to a view that is even smaller.
  This happens when using a Samsung galaxy 10 resolution of 1280x800.
  On german translation both resolutions can't display fully the toolbar
  however on the smaller size we need to hide even more items as such
  moving also the content views and not only the content menus
@ichim-david
Copy link
Sponsor Member

I have started working on this issue within a branch as can be seen within the referenced commit.
Basically in order for the personal toolbar to always remain visible and on the toolbar we need
to move also content views which I chose to move from right to left as can be seen from the following screenshot:
more-menu

I still have some small cleaning up to do and to add some comments to the changed code but it is already a lot cleaner that it was before.

I am still surprised though that 1280px can't fully display the toolbar using the German translation and
I think we should fix this even if we need to lower some of the padding and/or font size.
EDIT:
here is a screenshot to prove that by default Plone can't show all of the info. This is because even though we might have larger resolutions the max width will always be 1200 and right now it doesn't fit all of the actions
missing-portal-properties

ichim-david added a commit that referenced this issue Sep 14, 2015
- moveViewsToSubset now has a clearer condition name for the moving
  of the view to the subset
- run the hideElements action when clicking on the toobar logo to
  expand the toolbar. If it needs to resize it will, otherwise nothing
  will happen
@ichim-david
Copy link
Sponsor Member

Found more issues when the more options is clicked and you contract the toolbar, the more-options move back to the toolbar however they don't have enough room to display the text and the popup is displaced.
See screenshot:
after-fix

Still better that what was before but the whole more button selected action I will need to check.
For starters if I contract or expand I think the more options should be hidden.

@hvelarde
Copy link
Member Author

@ichim-david thanks, for taking care of this; there is something else that seems weird to me: why the name of the menu item appears duplicated on all menus?

selection_004

selection_005

@bloodbare
Copy link
Member

Hey,

We implemented some solution to fit the toolbar on horizontal in a rush some weeks ago: the more button. Its not perfect, neither nice, but we saw that it's impossible to make it fit in 1200px the menu with texts.

The code is there :
https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/static/patterns/toolbar/src/toolbar.js#L219

The problem was that the calculations were not acurate and there were a bunch of container sizes where it was miscalculated.

It's great somebody is taking care of it!

@ichim-david
Copy link
Sponsor Member

@hvelarde this is the way it was coded, if you look at plone.app.contentmenu
or plone.app.layout and search for plone-toolbar-submenu-header you will find it present as a submenu.

I think it might be too late to get rid of them as a design decision now but you could easily hide them with this css line
.plone-toolbar-submenu-header:first-child { display: none;}
it is normally found in toolbar.plone.less from CMFPlone.

If others agree with your assessment they can easily be removed.

ichim-david added a commit that referenced this issue Sep 16, 2015
- jQuery offset returns strange results when zooming as appose
  to normal offsetTop which we use to calculate whether the
  personal toolbar is moved
- Move only the views that are not already hidden avoiding thus
  duplications if there is more than one view to move to the more
  section
@davilima6
Copy link
Member

I agree menu titles shouldn't be repeated. I think that was useful when "More options" toolbar icon brought both Portlet management and Display menu links. But that should be another issue.

@hvelarde
Copy link
Member Author

I opened a new issue for that: #1007

ichim-david added a commit that referenced this issue Sep 16, 2015
- Properly set the active class on the toolbar menu list item when
  clicking on the more link
- Fixed case where the more button lost it's active class when clicking
  on the children content menus.
- Clicking on the body now hides also the opened more sublist
- Fixed a case where the more sublist remained opened even when you were
  clicking on the white portal-header area because the nav bar expands
  in height to fit the sublist even though it's black styling remains
  at 50px
- Fixed an issue where clicking on the sublist content menus removed the
  active class from the more link
ichim-david added a commit that referenced this issue Sep 16, 2015
- Menus are now closed when switching from expanded to contracted
  and back
- Clicking the personal bar link now closes the subset menu as well
- Fixed the position of the subset menus when collapsed by removing
  the hardcoded value of 105px from toolbar.plone.less
ichim-david added a commit that referenced this issue Sep 16, 2015
- Add content views from right to left to options subset until
  personal toolbar fits on the same line as the other menus
- Cleaned hideElements of duplicated selectors
- Take into consideration that you could go from a width that can't
  fit the toolbar to a view that is even smaller.
  This happens when using a Samsung galaxy 10 resolution of 1280x800.
  On german translation both resolutions can't display fully the toolbar
  however on the smaller size we need to hide even more items as such
  moving also the content views and not only the content menus
ichim-david added a commit that referenced this issue Sep 16, 2015
- moveViewsToSubset now has a clearer condition name for the moving
  of the view to the subset
- run the hideElements action when clicking on the toobar logo to
  expand the toolbar. If it needs to resize it will, otherwise nothing
  will happen
ichim-david added a commit that referenced this issue Sep 16, 2015
- jQuery offset returns strange results when zooming as appose
  to normal offsetTop which we use to calculate whether the
  personal toolbar is moved
- Move only the views that are not already hidden avoiding thus
  duplications if there is more than one view to move to the more
  section
ichim-david added a commit that referenced this issue Sep 16, 2015
- Properly set the active class on the toolbar menu list item when
  clicking on the more link
- Fixed case where the more button lost it's active class when clicking
  on the children content menus.
- Clicking on the body now hides also the opened more sublist
- Fixed a case where the more sublist remained opened even when you were
  clicking on the white portal-header area because the nav bar expands
  in height to fit the sublist even though it's black styling remains
  at 50px
- Fixed an issue where clicking on the sublist content menus removed the
  active class from the more link
ichim-david added a commit that referenced this issue Sep 16, 2015
- Menus are now closed when switching from expanded to contracted
  and back
- Clicking the personal bar link now closes the subset menu as well
- Fixed the position of the subset menus when collapsed by removing
  the hardcoded value of 105px from toolbar.plone.less
@ichim-david
Copy link
Sponsor Member

I've added a pull request fixing this issue and a couple of other issues as well.
I wanted to add a jenkins build but it seems I don't have permissions.

@hvelarde
Copy link
Member Author

I already added it.

ichim-david added a commit that referenced this issue Sep 17, 2015
- Add content views from right to left to options subset until
  personal toolbar fits on the same line as the other menus
- Cleaned hideElements of duplicated selectors
- Take into consideration that you could go from a width that can't
  fit the toolbar to a view that is even smaller.
  This happens when using a Samsung galaxy 10 resolution of 1280x800.
  On german translation both resolutions can't display fully the toolbar
  however on the smaller size we need to hide even more items as such
  moving also the content views and not only the content menus
ichim-david added a commit that referenced this issue Sep 17, 2015
- moveViewsToSubset now has a clearer condition name for the moving
  of the view to the subset
- run the hideElements action when clicking on the toobar logo to
  expand the toolbar. If it needs to resize it will, otherwise nothing
  will happen
ichim-david added a commit that referenced this issue Sep 17, 2015
- jQuery offset returns strange results when zooming as appose
  to normal offsetTop which we use to calculate whether the
  personal toolbar is moved
- Move only the views that are not already hidden avoiding thus
  duplications if there is more than one view to move to the more
  section
ichim-david added a commit that referenced this issue Sep 17, 2015
- Properly set the active class on the toolbar menu list item when
  clicking on the more link
- Fixed case where the more button lost it's active class when clicking
  on the children content menus.
- Clicking on the body now hides also the opened more sublist
- Fixed a case where the more sublist remained opened even when you were
  clicking on the white portal-header area because the nav bar expands
  in height to fit the sublist even though it's black styling remains
  at 50px
- Fixed an issue where clicking on the sublist content menus removed the
  active class from the more link
ichim-david added a commit that referenced this issue Sep 17, 2015
- Menus are now closed when switching from expanded to contracted
  and back
- Clicking the personal bar link now closes the subset menu as well
- Fixed the position of the subset menus when collapsed by removing
  the hardcoded value of 105px from toolbar.plone.less
ichim-david added a commit that referenced this issue Sep 17, 2015
ichim-david added a commit that referenced this issue Sep 17, 2015
@ichim-david
Copy link
Sponsor Member

Fixes committed to CMFPlone from pull request #1009
A new commit will need to be done to compile plone resources otherwise you will get the fixes only
when in devel mode.
I can't do this now since I've upgraded to node 4.0 and plone-compile-resources script fails with it.
@hvelarde maybe you can update the plone compiled resources.

@hvelarde
Copy link
Member Author

hvelarde commented Oct 2, 2015

This is still happening in Plone 5.0 final; I'm going to open another issue describing it with more details.

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

No branches or pull requests

6 participants