-
Notifications
You must be signed in to change notification settings - Fork 2k
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
UI: Refactor page chrome #4533
UI: Refactor page chrome #4533
Conversation
dda9a43
to
ee1241c
Compare
ee1241c
to
5dd32ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey!
👍 Nice addition.
I had a brief look over the code, which LGTM from a code point of view. But then I tried checking it out for a play, set the mirageWithNamespaces
setting, and I get an error in console after clicking around for a bit?
Seems to be related to the refreshRoute method that's deleted here?
I've deleted the entire repo and checked it all out again, and I can't replicate it so maybe it similar to what happened a couple of weeks ago? Could the ember tmp/
folder be affecting this?
Apart from that I found a few things that are maybe not related to this by clicking around on stuff in various places, the only one I can replicate reliably is the 'Logs: getReader' error.
This one was whilst navigating around using JS, not from typing a url into the url bar or manually refreshing the page.
If these aren't related then maybe this could be merged and those ^ sorted in another PR? The actual namespace switching thing seemed to work fine.
Shout me if you want me to try to replicate more, I can try on master also if you want? Actually just having checked again now, I can get the 404 one quite a bit also, is that maybe a mirage thing? Sorry bit more info in case it means something, I just noticed that I got a bunch of those 404 errors when I was on job/job-4 but I all the errors were for loads of weirdly numbered job urls (so job/27, job/32, job/28 etc etc)
So that first But as you noted, the ids for those 404s are weird in that the IDs don't start with |
I got to the bottom of the job 404 errors. It was in fact due to some faulty Mirage code. I fixed it in this pr: #4539. |
Cool, just approved #4539 , lemme know when you want me to have a re-look at this one. I just had a look at the Thanks, |
5dd32ab
to
7aeba80
Compare
This is ready for a re-review. I'm not sure if there is a good way around the So I could also guard in there against mirage being used in the environment, but the best solution would be for these mocking tools to support the newer interfaces. If you manage to get that error against a real cluster, please do let me know! |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
The only user-facing impact is the namespace switcher will redirect to the jobs list page for the selected namespace even when on non-job routes (e.g., client detail).
Namespaces are an enterprise feature.
By rethinking the way the namespace switcher works, I was able to generalize the usage of
gutter-menu
. Before it needed anonNamespaceChange
action provided to it for the namespace switcher to do anything beyond setting the active namespace. Now it transitions to the jobs list page with the new namespace set in the query param.Now that all usages of
gutter-menu
are the same, it could be moved up the route hierarchy. It now lives in a newpage-layout
component that contains both theglobal-header
and thegutter-menu
. So all that page chrome that's on most pages only needs to be included on the root template of each route hierarchy.The logical continuation of this process would be to move the call site of
page-layout
toapplication.hbs
. This, however, will never happen. Currentlyfreestyle
doesn't use the page chrome, and keeping the opportunity for non-page-layout pages to exist is important.Final note: most of the diff is indentation change.