patternfly / patternfly-3

This repo contains the HTML, CSS, and JQuery for the PatternFly 3 project.
https://www.patternfly.org/v3
MIT License
1.15k stars 239 forks source link

Vertical nav widget API? #580

Closed gashcrumb closed 7 years ago

gashcrumb commented 7 years ago

Hey guys! Using the vertical nav for our ipaas console, but for some pages we need to toggle the vertical nav depending on the view. Is there an API for doing that? Previously I've achieved the desired effect by adding collapsed and collapsed-nav tags to the relevant elements, but it'd be nicer if I could just toggle it via a javascript call. Thanks!

kahboom commented 7 years ago

Preferably without using jQuery, as we are using Angular 2 and want to avoid having to manipulate the DOM from any logic/functionality.

EDIT: Nvm we are using more jQuery than I thought. I guess there is a lot more cleanup to be done than I originally thought.

gashcrumb commented 7 years ago

@kahboom Well, it's a jquery plugin, isn't it? At least the code that sizes it to the window etc all appears to be, if that's the option I can live with it for now.

jeff-phillips-18 commented 7 years ago

there is an angular patternfly directive for vertical navigation but is for Angular 1. Version 4.x of angular patternfly (currently in alpha) can be upverted to Angular 2 since all the directives have been changed to components. If you are interested in that, then the vertical nav component could be enhanced with this feature but it does not exist at this time.

gashcrumb commented 7 years ago

Okay cool. yeah, I think it'd be a handy feature to have for sure, we'll have to look into pulling in the alpha as well. I may be able to work around the lack of an API for now, but then using 4.x might be a better use of my time :-)

jeff-phillips-18 commented 7 years ago

@LHinson Can we add a story to the backlog to add the ability to hide/show the vertical nav bar in the angular patternfly component (at least in 4.x, might want to add to 3.x as well)?

LHinson commented 7 years ago

Thanks for bringing this up @gashcrumb Would you be willing to send a PR for this?

gashcrumb commented 7 years ago

@LHinson yeah, I could probably do that, give me a bit to grok the code :-)

gashcrumb commented 7 years ago

@LHinson actually I should ask, the jquery based one in this repo or the angular-patternfly implementation? Or both?

andresgalante commented 7 years ago

@gashcrumb awesome! Thanks!

LHinson commented 7 years ago

@gashcrumb beggers can't be choosers haha. We would take both if you want to send a PR for both!

gashcrumb commented 7 years ago

With this PR merged I'd consider this closed, one follow on question, when's the next release planned? :-)

bleathem commented 7 years ago

Resolved with #582;