Skip to content
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

[release-4.9] Bug 2042041: Console 2969: Changes to the project selector to allow system namespaces that are Favorited to be included in the Favorited list even when the option to Show default projects is unselected. #10886

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -285,6 +285,9 @@ const NamespaceMenu: React.FC<{
(option, checkIsFavorite: boolean) => {
const containsFilterText = fuzzysearch(filterText.toLowerCase(), option.title.toLowerCase());

if (checkIsFavorite) {
return containsFilterText && isFavorite(option);
}
return (
containsFilterText &&
(systemNamespaces || !isSystemNamespace(option)) &&
Expand Down Expand Up @@ -335,12 +338,6 @@ const NamespaceMenu: React.FC<{
filterText={filterText}
isProject={isProjects}
/>
<SystemSwitch
hasSystemNamespaces={hasSystemNamespaces}
isProject={isProjects}
isChecked={systemNamespaces}
onChange={setSystemNamespaces}
/>
{filteredOptions.length === 0 ? (
<NoResults
isProjects={isProjects}
Expand All @@ -358,6 +355,12 @@ const NamespaceMenu: React.FC<{
selectedKey={selected}
favorites={favorites}
/>
<SystemSwitch
hasSystemNamespaces={hasSystemNamespaces}
isProject={isProjects}
isChecked={systemNamespaces}
onChange={setSystemNamespaces}
/>
<NamespaceGroup options={filteredOptions} selectedKey={selected} favorites={favorites} />
</MenuContent>
<Footer
Expand Down