ManageIQ / ui-components

Angular UI Components for ManageIQ
Apache License 2.0
16 stars 52 forks source link

fix uib-dropdown according to documentation #418

Closed bekasovoleg closed 5 years ago

bekasovoleg commented 5 years ago

Fix issue #416

miq-bot commented 5 years ago

Checked commit https://github.com/bekasovoleg/ui-components/commit/0bc6130a978b7fc3ee6ae74b5ba8c670f3d6c744 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 0 files checked, 0 offenses detected Everything looks fine. :trophy:

bekasovoleg commented 5 years ago

1st dropdown on screenshot has uib-dropdown-menu directive and works properly

https://github.com/ManageIQ/ui-components/blob/master/src/common/components/miqPfSort.html#L7

miq_table

himdel commented 5 years ago

LGTM, thanks! :)


Looks like the original code only worked with angular-ui-bootstrap pre-1.0 (class support was removed in https://github.com/angular-ui/bootstrap/pull/4975).

angular-patternfly dropped 0.14 in https://github.com/patternfly/angular-patternfly/commit/ff80d4a41225fbf0e8488887f9c3dc71dc09f18b, but that's v4, we're using v3, which still depends on 0.14.

Both ui-classic and ui-service are now using the last angular-ui-bootstrap release - 2.5.6, and have been for about 2 years:

himdel commented 5 years ago

We do have css for .uib-dropdown-menu (and .uib-dropdown-menu-right), so looks like the class has to stay too :+1:.

Searching for more, 'class='\''[^'\'']*uib' or 'class="[^"]*uib' in ui-service doesn't find anything, in ui-components, this finds only:

src/toolbar/components/toolbar-menu/toolbar-list.html
2:  <button type="button" uib-dropdown-toggle class="btn uib-dropdown-toggle btn-default"
10:  <ul class="uib-dropdown-menu" uib-dropdown-menu role="menu">

src/site-switcher/site-switcher.html
5:  <div uib-dropdown-menu class="uib-dropdown-menu uib-dropdown-menu-right" aria-labelledby="domain-switcher">

And in ui-classic, \.uib also finds nothing.

So, looks like found the last of these :+1: