Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Truncate long collection names so the dashboard question picker does not scroll horizontally (#83708)

Anderson2e8bd24aeea4
diff --git a/frontend/src/metabase/common/components/SelectList/SelectListItem.styled.tsx b/frontend/src/metabase/common/components/SelectList/SelectListItem.styled.tsx
index 6fd512dbb0c..1a87c5c21d7 100644
--- a/frontend/src/metabase/common/components/SelectList/SelectListItem.styled.tsx
+++ b/frontend/src/metabase/common/components/SelectList/SelectListItem.styled.tsx
@@ -10,6 +10,7 @@ import { EntityIcon } from "../EntityIcon";
// Unjustified type cast. FIXME
export const ItemTitle = styled(Text)<TextProps>`
margin: 0;
+ min-width: 0;
word-break: break-word;
` as unknown as typeof Text;
diff --git a/frontend/src/metabase/dashboard/components/QuestionPicker/QuestionList.module.css b/frontend/src/metabase/dashboard/components/QuestionPicker/QuestionList.module.css
index 94581acf1f4..1c4cf7d69d7 100644
--- a/frontend/src/metabase/dashboard/components/QuestionPicker/QuestionList.module.css
+++ b/frontend/src/metabase/dashboard/components/QuestionPicker/QuestionList.module.css
@@ -9,10 +9,6 @@
}
}
- .QuestionListItemLabel {
- overflow: hidden;
- }
-
.QuestionListItemIcon {
color: var(--mb-color-core-brand);
}
diff --git a/frontend/src/metabase/dashboard/components/QuestionPicker/QuestionList.tsx b/frontend/src/metabase/dashboard/components/QuestionPicker/QuestionList.tsx
index 82d102f4949..5395b66d434 100644
--- a/frontend/src/metabase/dashboard/components/QuestionPicker/QuestionList.tsx
+++ b/frontend/src/metabase/dashboard/components/QuestionPicker/QuestionList.tsx
@@ -144,10 +144,7 @@ export function QuestionList({
<Flex key={item.id} className={S.QuestionListItemRoot} gap="2px">
<SelectList.Item
id={item.id}
- classNames={{
- root: S.QuestionListItemRoot,
- label: S.QuestionListItemLabel,
- }}
+ classNames={{ root: S.QuestionListItemRoot }}
className={S.QuestionListItem}
name={item.name}
icon={{