pierrejeambrun commented on code in PR #71503:
URL: https://github.com/apache/airflow/pull/71503#discussion_r3767784237
##########
airflow-core/src/airflow/ui/src/layouts/Nav/UserSettingsButton.tsx:
##########
@@ -44,6 +44,9 @@ import { NavButton } from "./NavButton";
import { PluginMenuItem } from "./PluginMenuItem";
import TokenGenerationModal from "./TokenGenerationModal";
+// Beyond a handful of teams the list would push the menu items below the fold.
+const MAX_VISIBLE_TEAMS = 5;
Review Comment:
Can you provide a screenshot with both 5 team names, as well as super long
team names such as.
"theteamwithasuperlongnameeeeeeeeeeeeeeeeeeeeeeeeeee" or something like it.
##########
airflow-core/src/airflow/ui/src/layouts/Nav/UserSettingsButton.tsx:
##########
@@ -44,6 +44,9 @@ import { NavButton } from "./NavButton";
import { PluginMenuItem } from "./PluginMenuItem";
import TokenGenerationModal from "./TokenGenerationModal";
+// Beyond a handful of teams the list would push the menu items below the fold.
+const MAX_VISIBLE_TEAMS = 5;
Review Comment:
Also with team name > 5
##########
airflow-core/src/airflow/ui/src/layouts/Nav/UserSettingsButton.tsx:
##########
@@ -97,6 +100,31 @@ export const UserSettingsButton = ({ externalViews }: {
readonly externalViews:
<Box fontSize="md" fontWeight="semibold">
{`${currentUser.username} (id: ${currentUser.id})`}
</Box>
+ {Array.isArray(currentUser.teams) ? (
Review Comment:
Why `Array.isArray` ? Can this be something else than an array?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]