-
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: Namespaces redesign #10444
UI: Namespaces redesign #10444
Conversation
Ember Asset Size actionAs of 735f056 Files that got Bigger 🚨:
Files that stayed the same size 🤷:
|
Ember Test Audit comparison
|
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.
I left a few comments but nothing truly blocking.
I tried this out locally, though it’s extensive and I’m not sure I exercised everything.
The behaviour with cachedNamespace
is a bit surprising maybe, because it’s only used before a controller has been visited; subsequent visits have the same namespace instead of the shared/cached one. But that’s just query parameters for you!
I noticed that pagination might need resetting when the filter has caused the collection to shrink:
But then it’s also a thing with other facets so we can declare that out of scope 😆
{{/let}} |
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.
Quite minor but is .editorconfig
not working somehow 🤔
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.
Is this about the lack of newline? I know I don't have the editor config vim plugin. I should get it though...
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.
ya it’s configured to not add newlines in Handlebars files; it probably doesn’t matter in this case but sometimes it matters
|
||
&[aria-selected='true'] { | ||
background: $blue-050; | ||
} | ||
} | ||
|
||
.dropdown-empty { |
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.
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.
Yeah, I noticed that but let it slide 😞 I think it's some default ember-power-selector styles that need to be overwritten.
label: text(), | ||
}), | ||
facets: { | ||
namespace: singleFacet('[data-test-namespace-facet]'), |
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.
Nice that you were able to adapt the existing interface 🤩
@@ -113,37 +113,6 @@ export default class SystemService extends Service { | |||
return namespaces.length && namespaces.some(namespace => namespace.get('id') !== 'default'); | |||
} | |||
|
|||
@computed('namespaces.[]') |
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.
Since system.cachedNamespace
is set and used elsewhere, what do you think of adding a “declaration” for it, and maybe an explanatory comment?
In the same style as the multi select dropdown
This way it includes all of the facet components (right now multi select and single select).
Either deleting irrelevant tests or marking failing tests as TODO pending new namespaces implementation.
… ones This is the bulk of this refactor: Namespace should no longer be global because lists should support various namespace configurations. Furthermore, namespace is an attribute of the ID of a job but a filter on the jobs list page. Therefore, they should be modeled differently.
Without this, the optimize page is hidden despite the existence of recommendations.
9128e56
to
b5163de
Compare
b5163de
to
a81e2b8
Compare
This can happen if a job doesn't have a namespace (which shouldn't actually ever happen, but it can in tests).
I documented the |
Ember Test Audit flaky testsEmber Test Audit detected these flaky tests on main:
|
get _namespace() { | ||
if (!this.namespace) return 'default'; | ||
if (typeof this.namespace === 'string') return this.namespace; | ||
return get(this.namespace, 'name'); | ||
} |
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.
activeNamespace
was previously set in our models based on query parameters. We're noticing that we can't detect namespace-specific policy capabilities (with ACL's).
Should we continue the behavior of setting system.activeNamespace
in our models to grab namespaces from the query params.
Also, since we're setting namespace
to default
on line 17, what's the purpose of the control flow logic on lines 19-22.
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.
Maybe we can set this value based on qpNamespace
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. |
This rethinks namespaces as a filter on list pages rather than a global setting. Namespaces are still part of job and CSI volume identifiers, so there was lots of plumbing involved.
The biggest net-new feature here is being able to select
All (*)
to list all jobs or CSI volumes across namespaces.This PR has the following in it (in hindsight it should have been multiple PRs, sorry)
SingleSelectDropdown
component that wraps Ember Power Select and gives it a similar API asMultiSelectDropdown
default
)