Skip to content

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

Fix Select Visual Bugs (#62466)

Ryan Lauriea8fe573099d4
diff --git a/frontend/src/metabase/metadata/components/SemanticTypePicker/SemanticTypePicker.module.css b/frontend/src/metabase/metadata/components/SemanticTypePicker/SemanticTypePicker.module.css
deleted file mode 100644
index 40c989e960d..00000000000
--- a/frontend/src/metabase/metadata/components/SemanticTypePicker/SemanticTypePicker.module.css
+++ /dev/null
@@ -1,4 +0,0 @@
-.semanticTypePicker {
- /* override our own weird default for Select, to prevent scrollbar being shown */
- overflow: visible;
-}
diff --git a/frontend/src/metabase/metadata/components/SemanticTypePicker/SemanticTypePicker.tsx b/frontend/src/metabase/metadata/components/SemanticTypePicker/SemanticTypePicker.tsx
index 8bc965e9c1c..f9701060023 100644
--- a/frontend/src/metabase/metadata/components/SemanticTypePicker/SemanticTypePicker.tsx
+++ b/frontend/src/metabase/metadata/components/SemanticTypePicker/SemanticTypePicker.tsx
@@ -5,7 +5,6 @@ import _ from "underscore";
import { Select, type SelectProps } from "metabase/ui";
import type { Field } from "metabase-types/api";
-import S from "./SemanticTypePicker.module.css";
import { getCompatibleSemanticTypes } from "./utils";
const NO_SEMANTIC_TYPE = null;
@@ -39,7 +38,6 @@ export const SemanticTypePicker = ({
return (
<Select
- className={S.semanticTypePicker}
comboboxProps={{
middlewares: {
flip: true,
diff --git a/frontend/src/metabase/ui/components/inputs/Select/Select.config.tsx b/frontend/src/metabase/ui/components/inputs/Select/Select.config.tsx
index 07adcef5392..b4ff12d4ee1 100644
--- a/frontend/src/metabase/ui/components/inputs/Select/Select.config.tsx
+++ b/frontend/src/metabase/ui/components/inputs/Select/Select.config.tsx
@@ -8,7 +8,6 @@ export const selectOverrides = {
Select: Select.extend({
defaultProps: {
size: "md",
- maxDropdownHeight: 512,
withScrollArea: false,
allowDeselect: false,
inputWrapperOrder: ["label", "description", "input", "error"],
diff --git a/frontend/src/metabase/ui/components/inputs/Select/Select.module.css b/frontend/src/metabase/ui/components/inputs/Select/Select.module.css
index 4c0a835dd6d..576d5ee73c3 100644
--- a/frontend/src/metabase/ui/components/inputs/Select/Select.module.css
+++ b/frontend/src/metabase/ui/components/inputs/Select/Select.module.css
@@ -1,7 +1,6 @@
.SelectRoot {
border-color: var(--mb-color-border);
padding: 0;
- overflow: auto;
& > div {
max-height: none !important;
@@ -89,12 +88,6 @@
}
}
-.SelectItems_Options {
- padding: 0.75rem;
- max-height: rem(500px);
- overflow-y: auto;
-}
-
.SelectItems_Item {
--combobox-option-padding: 0;
@@ -150,10 +143,18 @@
line-height: var(--select-item-line-height);
}
+.SelectItems_Options {
+ padding: 0.75rem;
+ /*
+ this clobbers bottom padding when the content overflows, but it's less bad than
+ double scrollbars or overflowing the viewport, see #62466, #61889
+ */
+ max-height: rem(500px);
+}
+
.Dropdown {
background-color: var(--mb-color-background);
border-color: var(--mb-color-border);
- overflow: auto;
}
.SelectError {