Repository navigation
Persist tab state without adding to browser history - #582
Conversation
|
@spadgett WDYT of this change? I can't think of a reason that reloadOnSearch matters on the pages where we have tabs or filters. |
|
+1 |
943d4f1 to
93b7eb0
Compare
|
@spadgett ok i think I got all the pages that have tabs today |
|
@jwforres, i think select="selectTab('environment')"and the JS could just be: $scope.selectTab = function(what) {
$location.replace().search('tab', what);
};might be nice, less code, no additional $watch? Tempted to even put that little fn in our $scope.selectTab = navigate.selectTaband get it down to a controller one-liner. |
|
@benjaminapetersen in the version we have its on each tab, it adds it to every tab in the view |
|
I agree its less code for the controller, but it doesn't feel right to me to make each tab in the view responsible for making sure the callback gets fired. In my ideal world the uib-tabset element should have had a callback option for when any of its tabs are selected |
|
@jwforres, yup, each would get |
|
Hmm. I think if our views are declarative & we get all the work into a service its a win, but I'm good if you prefer the current approach! |
|
@spadgett can be the deciding vote |
|
Cool cool! I'll readily admit I'm an awful controller troll/nag 😄 |
38fbd08 to
9d578a9
Compare
|
@benjaminapetersen how do you feel about the latest version |
| }); | ||
| }; | ||
| }) | ||
| .directive('persistTabState', function($routeParams, $location) { |
There was a problem hiding this comment.
Probably worth a comment saying reloadOnSearch should be false for the route to use this directive.
|
Oooo nice, even less in the controllers! +1 <uib-tabset class="mar-top-none" persist-tab-state>Either way though, def looks good to me. |
9d578a9 to
a7809a4
Compare
|
[merge] |
|
Evaluated for origin web console merge up to a7809a4 |
|
Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/432/) |
No description provided.