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

Patternfly vertical navigation and project bar #1932

Merged
merged 1 commit into from Sep 1, 2017

Conversation

spadgett
Copy link
Member

@spadgett spadgett commented Aug 14, 2017

https://trello.com/c/ZcLBaLK7

screen shot 2017-08-31 at 8 23 31 am

This is #1929, rebased

@sg00dwin I've left you as the commit author.
@rhamilto FYI

TODOs:

  • [P0] Navigating to Membership for the first time from catalog dropdown "View Membership" link results in permissions error. But if you have previously visited the Membership page using the nav within the project and then navigate back using the catalog dropdown option, the bug doesn't occur. Additionally, if you hard refresh on the Membership page, the bug also occurs.
  • UXD design feedback needed:
    • product branding is always present
    • project bar is always present if in a project
      • remove project name from breadcrumb
    • pages that didn't previously include sidebar nav should
  • make nav keyboard accessible --> see fix(input-group):simplifies input group patternfly/patternfly#723
  • persist collapsed nav state in localStorage
  • project bar permanently disappears when navigating away from chromeless logs page (fixed)
  • no bottom margin on add autoscaler page
  • fix mismatched tags in edit/build-config.html
  • clean up indentation in views
  • remove orphaned code
    • look for orphaned LESS variables
  • Don't request self-subject rules reviews twice for a project -- fixed by Avoid multiple selfsubjectrulesreviews requests origin-web-common#165

Follow on:

@@ -24,38 +24,38 @@ angular.module('openshiftConsole')
dropdownItems = dropdownItems.concat([{
type: 'dom',
node: [
'<li>',
'<li class="list-group-item">',
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 will break existing extensions if we require a new class on menu items.

@rhamilto @jeff-phillips-18 Any ideas on how we can avoid that?

Copy link
Member

Choose a reason for hiding this comment

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

Options:

  1. Duplicate the PatternFly's LESS rules related to styling the mobile nav in the console's LESS. Poses a maintenance challenge and duplicates rules.

  2. Use JS to add the classes.

Both options are not ideal, but I think I favor the second one?

Copy link
Member

Choose a reason for hiding this comment

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

We've also got a bug that's related. As it stands, primary nav links need an ng-click="nav.showMobileNav = false;" to correctly close the nav at mobile.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have this fixed except for active styles.

Copy link
Member Author

Choose a reason for hiding this comment

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

The active styles work now too

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 17, 2017
@spadgett spadgett removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 24, 2017
@spadgett
Copy link
Member Author

@dtaylor113 FYI, we should be able to update the application launcher menu to match the mobile design when this lands. I suggest we do it as a follow on to this PR.

@spadgett spadgett changed the title [WIP] [DO NOT MERGE] Use Patternfly vertical navigation and add project bar Use Patternfly vertical navigation and add project bar Aug 28, 2017
@spadgett spadgett changed the title Use Patternfly vertical navigation and add project bar [WIP] Use Patternfly vertical navigation and add project bar Aug 28, 2017
@rhamilto rhamilto mentioned this pull request Aug 28, 2017
5 tasks
@@ -7,7 +7,15 @@
// Patternfly overrides
@dropdown-divider-margin: 4px 0;
@list-view-hover-bg: #fafafa;
@navbar-pf-alt-navbar-brand-padding: 20px 0;
@navbar-pf-height:
Copy link
Member Author

Choose a reason for hiding this comment

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

Needs a value?

Copy link
Member

Choose a reason for hiding this comment

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

actually not used, needs to be removed

@navbar-os-header-height-mobile: 46px;
@navbar-header-right-margin: 10px;
@navbar-os-header-desktop: 59px;
@navbar-os-header-mobile: 39px;
Copy link
Member Author

Choose a reason for hiding this comment

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

Why remove height from the var name?

Copy link
Member

Choose a reason for hiding this comment

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

can't recall why 🤔 but shouldn't have been.

@spadgett
Copy link
Member Author

I've added some basic accessibility support to the nav. Tested using the keyboard and iOS simulator.

</a>

<!-- mobile secondary nav -->
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think this is just for mobile? It's secondary nav for desktop, too, right?

If so, let's update the comment.

@spadgett
Copy link
Member Author

@jeff-phillips-18 Let me know if you'd like to review this. It's a large PR, but the views are mostly whitespace changes and removed elements. The important changes are in nav.js, header.html, and _sidebar.html -- and then of course many changes to the less styles.

@rhamilto Is working on a few last items to show active nav for pages that didn't used to have a left nav. We are showing this at the design review today to verify what we've done with @openshift/team-ux-review

We opted to go with base Patternfly to keep compatibility with our extension points. We have about 5 extension points in the masthead and left nav that we must keep supporting without breaking existing extensions.

I'd like to give this PR review priority if possible. For one, if we merge it earlier in the sprint, it has more soak time. It's also difficult to rebase since it touches many files.

@rhamilto Can you review the less changes from @sg00dwin?

@openshift/team-ux-review I'm really happy with the UX of the new nav. Thanks! This PR also removes more code than it adds, while adding function, which is great.

@rhamilto @sg00dwin Thanks for all your work on this

@spadgett
Copy link
Member Author

@abhgupta Heads up that nav changes are likely coming this sprint. You should not need to change any of the online extensions, but we should verify.

margin-left: 20px;
}
.nav-vertical-primary {
display: none;
Copy link
Member Author

Choose a reason for hiding this comment

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

Ideally we should use an ng-if for this rather than hiding the vertical nav in CSS

@rhamilto
Copy link
Member

rhamilto commented Aug 31, 2017

@abhgupta Heads up that nav changes are likely coming this sprint. You should not need to change any of the online extensions, but we should verify.

https://github.com/openshift/online/pull/1408 is required for the new nav to work correctly with online.

@spadgett spadgett force-pushed the pf-vertical-nav branch 2 times, most recently from 2111a81 to c2913bf Compare September 1, 2017 13:02
@spadgett
Copy link
Member Author

spadgett commented Sep 1, 2017

Cleaned up indentation in the views, squashed, and added dist

@spadgett spadgett changed the title [WIP] Use Patternfly vertical navigation and add project bar Patternfly vertical navigation and project bar Sep 1, 2017
@spadgett
Copy link
Member Author

spadgett commented Sep 1, 2017

[test]

Copy link
Member

@rhamilto rhamilto left a comment

Choose a reason for hiding this comment

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

Great teamwork on this one!

@spadgett
Copy link
Member Author

spadgett commented Sep 1, 2017

Looks like we have some test failures to work through :)

@spadgett
Copy link
Member Author

spadgett commented Sep 1, 2017

@sg00dwin We should try to avoid the double scrollbars. I'm not sure the sidebar needs to scroll separately. (Can be a follow on.)

screen shot 2017-09-01 at 12 23 09 pm

Update navigation to use the standard Patternfly vertical navigation.
Add a project bar to the masthead when in the context of a project.
@spadgett
Copy link
Member Author

spadgett commented Sep 1, 2017

Tests are passing. Thanks everyone.

[merge]

@openshift-bot
Copy link

Evaluated for origin web console test up to bc13e0e

@openshift-bot
Copy link

Origin Web Console Test Results: Running (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_web_console/111/) (Base Commit: 4be3793) (PR Branch Commit: bc13e0e)

@openshift-bot
Copy link

Evaluated for origin web console merge up to bc13e0e

@openshift-bot
Copy link

openshift-bot commented Sep 1, 2017

Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin_web_console/95/) (Base Commit: 4be3793) (PR Branch Commit: bc13e0e)

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.

None yet

5 participants