Skip to content

pfVerticalNavigation: on mobile, move the masthead utility items to the vertical navigation #747

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

Merged

Conversation

dtaylor113
Copy link
Member

@dtaylor113 dtaylor113 commented Jun 14, 2018

Description

Added a mobileOnly property to nav. item objects; when 'true' items only display in mobile mode.
Addresses: #745

Ex: The Help and User vert. nav items only appear when in mobile (< 768px) mode, and are hidden when not in mobile mode:
mobileonly

Note the masthead utility items (Help & User dropdowns) continue to be hidden at mobile; this PR allows app devs to mimic them 'moving' to the vert nav menu.

@alexkieling

PR Checklist

  • Screenshots are attached (if there are visual changes in the UI)
  • A Designer (@beanh66) is assigned as a reviewer (if there are visual changes in the UI)

Copy link
Member

@jeff-phillips-18 jeff-phillips-18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to address #746 while you are working here. It should effect the hide/show of the nav header items in the navigation menu as well.

iconClass: "fa pficon-help",
href: "#/help",
mobileOnly: "true"
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have Help and About as children to be consistent with the header.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes should be made in the -router example as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have Help and About as children to be consistent with the header.

Wasn't crazy about having sub-menus:

Help -> Help
        About

So left out 'About' as maybe something you wouldn't need at mobile.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, just thinking we should show consistency.

@@ -30,7 +30,7 @@
'force-hide-secondary-nav-pf': $ctrl.forceHidden,
'show-mobile-nav': $ctrl.showMobileNav}">
<ul class="list-group">
<li ng-repeat="item in $ctrl.items" class="list-group-item"
<li ng-repeat="item in $ctrl.items | navItems:$ctrl.inMobileState" class="list-group-item"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be easer just to add:

'visible-xs': item.mobileOnly

to the ng-class rather than filtering.

iconClass: "fa pficon-user",
mobileOnly: "true",
children: [
{ title: "Preferences" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change Preferences to User Preferences both here and in the header area? It was a UX request in the patternfly-react repo, so might as well update here as well.

beanh66
beanh66 previously approved these changes Jun 15, 2018
Copy link
Member

@beanh66 beanh66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @dtaylor113!

@@ -35,6 +35,8 @@
* <li>.tooltip - (string) Tooltip to display for the badge
* <li>.badgeClass: - (string) Additional class(es) to add to the badge container
* </ul>
* <li>.mobileOnly - (string) When set to 'true', menu item will only be displayed when browser is in mobile mode (<768px).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use a string here rather than a boolean?

@dtaylor113
Copy link
Member Author

Hi @jeff-phillips-18, I believe I have addressed your comments, except the one about the Help-at-mobile menu, IMO I think leaving off the 'About' menu item represents a truer @mobile menu.

@dtaylor113
Copy link
Member Author

Might want to address #746 while you are working here...

I'd prefer to do that in a follow up pr, thanks :-)

…ects; when 'true' items only display in mobile mode.
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