Updating to Mantine 8.3.18 (#72710)

* Updating to Mantine 8.3.18

* adjusting e2e

* green ci?

* fix stray failing test
This commit is contained in:
Nick Fitzpatrick
2026-04-20 22:30:29 +05:30
committed by GitHub
parent 29c59aa988
commit 9b4ddd2460
25 changed files with 94 additions and 98 deletions

View File

@@ -34,9 +34,9 @@
"@lezer/highlight": "^1.2.1",
"@lezer/lr": "^1.4.2",
"@loki/browser": "0.35.0",
"@mantine/core": "8.3.5",
"@mantine/dates": "8.3.5",
"@mantine/hooks": "8.3.5",
"@mantine/core": "8.3.18",
"@mantine/dates": "8.3.18",
"@mantine/hooks": "8.3.18",
"@popperjs/core": "^2.11.8",
"@react-oauth/google": "^0.11.1",
"@reduxjs/toolkit": "^2.5.0",
@@ -1153,11 +1153,11 @@
"@loki/target-native-ios-simulator": ["@loki/target-native-ios-simulator@0.35.0", "", { "dependencies": { "@ferocia-oss/osnap": "^1.3.5", "@loki/core": "^0.35.0", "@loki/target-native-core": "^0.35.0", "fs-extra": "^9.1.0", "tempy": "^1.0.0" } }, "sha512-KyN0vmDWr0elcOJJA97wS795zVA/R3WLqOip7rb2RvTt3Zb8gBigRFMHs8DZyXVL0uBMfeIYL9zcQNjH6eraHA=="],
"@mantine/core": ["@mantine/core@8.3.5", "", { "dependencies": { "@floating-ui/react": "^0.27.16", "clsx": "^2.1.1", "react-number-format": "^5.4.4", "react-remove-scroll": "^2.7.1", "react-textarea-autosize": "8.5.9", "type-fest": "^4.41.0" } }, "sha512-PdVNLMgOS2vFhOujRi6/VC9ic8w3UDyKX7ftwDeJ7yQT8CiepUxfbWWYpVpnq23bdWh/7fIT2Pn1EY8r8GOk7g=="],
"@mantine/core": ["@mantine/core@8.3.18", "", { "dependencies": { "@floating-ui/react": "^0.27.16", "clsx": "^2.1.1", "react-number-format": "^5.4.4", "react-remove-scroll": "^2.7.1", "react-textarea-autosize": "8.5.9", "type-fest": "^4.41.0" }, "peerDependencies": { "@mantine/hooks": "8.3.18", "react": "^18.x || ^19.x", "react-dom": "^18.x || ^19.x" } }, "sha512-9tph1lTVogKPjTx02eUxDUOdXacPzK62UuSqb4TdGliI54/Xgxftq0Dfqu6XuhCxn9J5MDJaNiLDvL/1KRkYqA=="],
"@mantine/dates": ["@mantine/dates@8.3.5", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-LkIdC4eWPNQFv1BU1c52U3Z3RuA3yU1asvTgMEIQ/MdJsGK8GePwpgMH/jKQ8ba/AW9NfksdvtOJ6uIqPwjCkg=="],
"@mantine/dates": ["@mantine/dates@8.3.18", "", { "dependencies": { "clsx": "^2.1.1" }, "peerDependencies": { "@mantine/core": "8.3.18", "@mantine/hooks": "8.3.18", "dayjs": ">=1.0.0", "react": "^18.x || ^19.x", "react-dom": "^18.x || ^19.x" } }, "sha512-FHx5teJOhupI0gO2o5evtVYQEdqOjayOkLRhEQfB5Nc5DvcysfPfmNILGkc1Nrp9ZQeQWKLT9qr+CkcCXwHOaw=="],
"@mantine/hooks": ["@mantine/hooks@8.3.5", "", {}, "sha512-0Wf08eWLKi3WkKlxnV1W5vfuN6wcvAV2VbhQlOy0R9nrWorGTtonQF6qqBE3PnJFYF1/ZE+HkYZQ/Dr7DmYSMQ=="],
"@mantine/hooks": ["@mantine/hooks@8.3.18", "", { "peerDependencies": { "react": "^18.x || ^19.x" } }, "sha512-QoWr9+S8gg5050TQ06aTSxtlpGjYOpIllRbjYYXlRvZeTsUqiTbVfvQROLexu4rEaK+yy9Wwriwl9PMRgbLqPw=="],
"@marijn/find-cluster-break": ["@marijn/find-cluster-break@1.0.2", "", {}, "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g=="],

View File

@@ -115,14 +115,14 @@ describe("scenarios > admin > settings > user provisioning", () => {
cy.log("should be able to disable scim and info stay");
scimToggle().click();
scimToggle().findByText("Disabled");
scimSetting().findByLabelText("Disabled").should("exist");
scimEndpointInput().should("be.visible");
scimTokenInput().should("be.visible");
cy.findByRole("button", { name: /Regenerate/ }).should("be.disabled");
cy.log("should be able to re-enable");
scimToggle().click();
scimToggle().findByText("Enabled");
scimSetting().findByLabelText("Enabled").should("exist");
});
it("should warn users that saml user provisioning will be disabled before enabling scim", () => {
@@ -137,9 +137,9 @@ describe("scenarios > admin > settings > user provisioning", () => {
cy.findByText(samlWarningMessage).should("exist");
cy.log("message should not exist once scim has been enabled");
scimToggle().findByText("Disabled");
scimSetting().findByText("Disabled");
scimToggle().click();
scimToggle().findByText("Enabled");
scimSetting().findByText("Enabled");
});
H.modal().within(() => {
@@ -199,7 +199,10 @@ describe("scenarios > admin > settings > user provisioning", () => {
});
function scimToggle() {
return cy.findByTestId("scim-enabled-setting").findByText(/Enabled|Disabled/);
return scimSetting().findByLabelText(/Enabled|Disabled/);
}
function scimSetting() {
return cy.findByTestId("scim-enabled-setting");
}
function scimEndpointInput() {

View File

@@ -691,7 +691,7 @@ function assertDbRoutingDisabled() {
function setupModelPersistence() {
interceptPerformanceRoutes();
cy.visit("/admin/performance/models");
cy.findByTestId("admin-layout-content").findByText("Disabled").click();
cy.findByTestId("admin-layout-content").findByLabelText("Disabled").click();
cy.wait("@enablePersistence");
}
@@ -717,7 +717,7 @@ function enableModelActionsViaApi(databaseId: DatabaseId) {
function enableGlobalModelPersistence() {
cy.visit("/admin/performance/models");
cy.findByText("Disabled").click();
cy.findByLabelText("Disabled").click();
}
function workspacesSection() {

View File

@@ -794,23 +794,22 @@ describe("scenarios > admin > databases > sample database", () => {
// `auto_run_queries` toggle should be ON by default
cy.findByLabelText(/Rerun queries for simple explorations/)
.should("have.attr", "data-checked", "true")
.click({ force: true });
.click();
// Reported failing in v0.36.4
cy.log(
"should respect the settings for automatic query running (metabase#13187)",
);
cy.findByLabelText(/Rerun queries for simple explorations/).should(
"not.have.attr",
"have.attr",
"data-checked",
"false",
);
cy.log("change the metadata_sync period");
cy.findByLabelText(/Choose when syncs and scans happen/).click({
force: true,
});
cy.findByLabelText(/Choose when syncs and scans happen/).click();
cy.findByDisplayValue("Hourly").click();
H.popover().within(() => {
cy.findByText("Daily").click({ force: true });
cy.findByText("Daily").click();
});
// "lets you change the cache_field_values period"

View File

@@ -365,7 +365,7 @@ const closeCleanUpModal = () =>
cy.findAllByTestId("cleanup-collection-modal-close-btn").click();
const recursiveFilter = () =>
cy.findByText(/Include items in sub-collections/).should("exist");
cy.findByLabelText(/Include items in sub-collections/).should("exist");
const dateFilter = () => cy.findByTestId("cleanup-date-filter");
const pagination = () => cy.findByTestId("cleanup-collection-modal-pagination");
const emptyState = () => cy.findByText(/All items have been used in the past/);

View File

@@ -638,7 +638,7 @@ describe("scenarios > question > custom column", () => {
cy.findByRole("listbox").findByText("years").click();
H.popover().within(() => {
cy.findByText("Include this year").click();
cy.findByLabelText("Include this year").click();
cy.button("Add filter").click();
});

View File

@@ -71,7 +71,7 @@ describe(
);
H.openDashboardSettingsSidebar();
H.sidesheet().within(() => {
cy.findByText(filterToggleLabel).click();
cy.findByLabelText(filterToggleLabel).click();
cy.wait("@updateDashboard");
cy.findByLabelText(filterToggleLabel).should("not.be.checked");
});
@@ -106,7 +106,7 @@ describe(
H.openDashboardSettingsSidebar();
H.sidesheet().within(() => {
cy.findByText(filterToggleLabel).click();
cy.findByLabelText(filterToggleLabel).click();
cy.wait("@updateDashboard");
cy.findByLabelText(filterToggleLabel).should("be.checked");
});
@@ -127,7 +127,7 @@ describe(
H.openDashboardSettingsSidebar();
H.sidesheet().within(() => {
cy.findByText(filterToggleLabel).click();
cy.findByLabelText(filterToggleLabel).click();
cy.wait("@updateDashboard");
cy.findByLabelText(filterToggleLabel).should("not.be.checked");
});
@@ -250,7 +250,7 @@ describe(
H.openDashboardSettingsSidebar();
H.sidesheet().within(() => {
cy.findByLabelText(filterToggleLabel).should("be.checked");
cy.findByText(filterToggleLabel).click();
cy.findByLabelText(filterToggleLabel).click();
cy.wait("@updateDashboard");
cy.findByLabelText(filterToggleLabel).should("not.be.checked");
});
@@ -276,7 +276,7 @@ describe(
H.openDashboardSettingsSidebar();
H.sidesheet().within(() => {
cy.findByLabelText(filterToggleLabel).should("not.be.checked");
cy.findAllByText(filterToggleLabel).click();
cy.findAllByLabelText(filterToggleLabel).click();
cy.wait("@updateDashboard");
cy.findByLabelText(filterToggleLabel).should("be.checked");
});
@@ -459,7 +459,7 @@ describe("scenarios > dashboards > filters > auto apply", () => {
H.openDashboardSettingsSidebar();
H.sidesheet().within(() => {
cy.findByText(filterToggleLabel).click();
cy.findByLabelText(filterToggleLabel).click();
cy.wait("@updateDashboard");
cy.findByLabelText(filterToggleLabel).should("not.be.checked");
H.expectUnstructuredSnowplowEvent({
@@ -475,7 +475,7 @@ describe("scenarios > dashboards > filters > auto apply", () => {
H.openDashboardSettingsSidebar();
H.sidesheet().within(() => {
cy.findByText(filterToggleLabel).click();
cy.findByLabelText(filterToggleLabel).click();
cy.wait("@updateDashboard");
cy.findByLabelText(filterToggleLabel).should("be.checked");
H.assertNoUnstructuredSnowplowEvent({

View File

@@ -443,7 +443,7 @@ describe("issue 16559", () => {
H.closeDashboardInfoSidebar();
H.openDashboardSettingsSidebar();
H.sidesheet().findByText("Auto-apply filters").click();
H.sidesheet().findByLabelText("Auto-apply filters").click();
cy.wait("@saveDashboard");
H.closeDashboardSettingsSidebar();

View File

@@ -1456,7 +1456,7 @@ describe("scenarios > dashboard", () => {
// toggle full-width
H.editDashboard();
cy.findByLabelText("Toggle width").click();
H.popover().findByText("Full width").click();
H.popover().findByLabelText("Full width").click();
H.assertDashboardFullWidth();
H.expectUnstructuredSnowplowEvent({
event: "dashboard_width_toggled",
@@ -1471,7 +1471,7 @@ describe("scenarios > dashboard", () => {
// toggle back to fixed
H.editDashboard();
cy.findByLabelText("Toggle width").click();
H.popover().findByText("Full width").click();
H.popover().findByLabelText("Full width").click();
H.assertDashboardFixedWidth();
H.expectUnstructuredSnowplowEvent({
event: "dashboard_width_toggled",

View File

@@ -416,7 +416,7 @@ describe("scenarios > embedding > questions > downloads", () => {
.as("allow-download-toggle")
.should("be.checked");
cy.findByText("Download (csv, xlsx, json, png)").click();
cy.findByLabelText("Download (csv, xlsx, json, png)").click();
cy.get("@allow-download-toggle").should("not.be.checked");
cy.log('Use API to "publish" this question and to enable its filter');

View File

@@ -84,7 +84,7 @@ tokens.forEach((token) => {
cy.findByRole("tab", { name: "Look and Feel" }).click();
// set transparent background metabase#23477
cy.findByText("Dashboard background").click();
cy.findByLabelText("Dashboard background").click();
codeBlock()
.first()
.invoke("text")
@@ -100,8 +100,8 @@ tokens.forEach((token) => {
if (token === "pro-self-hosted") {
// Disable both download options
cy.findByText("Export to PDF").click();
cy.findByText("Results (csv, xlsx, json, png)").click();
cy.findByLabelText("Export to PDF").click();
cy.findByLabelText("Results (csv, xlsx, json, png)").click();
codeBlock()
.first()
@@ -161,7 +161,7 @@ tokens.forEach((token) => {
// hide download button for pro/enterprise users metabase#23477
if (token === "pro-self-hosted") {
cy.findByText("Download (csv, xlsx, json, png)").click();
cy.findByLabelText("Download (csv, xlsx, json, png)").click();
codeBlock()
.first()

View File

@@ -499,7 +499,7 @@ describe("scenarios > question > filter", () => {
cy.findByText("Created At").click();
cy.findByText("Relative date range…").click();
cy.findByText("Previous").click();
cy.findByText(/^Include/).click();
cy.findByLabelText(/^Include/).click();
cy.button("Add filter").click();
});

View File

@@ -82,20 +82,12 @@ describe("time-series chrome filter widget", () => {
cy.log("Toggle should be always off initially");
// This is targeting the input checkbox that is hidden
cy.findByLabelText("Include today").should(
"have.attr",
"aria-checked",
"false",
);
cy.findByLabelText("Include today").should("not.be.checked");
// This is clicking on an actual label in the UI
cy.findByText("Include today").click();
cy.findByLabelText("Include today").click();
cy.findByLabelText("Include today").should(
"have.attr",
"aria-checked",
"true",
);
cy.findByLabelText("Include today").should("be.checked");
cy.button("Apply").click();
cy.wait("@dataset");
});
@@ -114,21 +106,13 @@ describe("time-series chrome filter widget", () => {
"true",
);
cy.findByLabelText("Include today").should(
"have.attr",
"aria-checked",
"true",
);
cy.findByLabelText("Include today").should("be.checked");
cy.log(
"Switch should preserve its state after we change the direction",
);
cy.findByRole("tab", { name: "Next" }).click();
cy.findByLabelText("Include today").should(
"have.attr",
"aria-checked",
"true",
);
cy.findByLabelText("Include today").should("be.checked");
});
});
});
@@ -197,7 +181,7 @@ describe("time-series chrome filter widget", () => {
);
// Toggle off
cy.findByText("Include this quarter").click();
cy.findByLabelText("Include this quarter").click();
});
cy.log("Change the direction");

View File

@@ -67,7 +67,7 @@ export function setAdHocFilter(
if (includeCurrent) {
popover()
.findByText(/Include/)
.findByLabelText(/Include/)
.click();
}

View File

@@ -337,7 +337,7 @@ describe("scenarios > home > custom homepage", () => {
cy.findByTestId("custom-homepage-setting").within(() => {
cy.findByText("Disabled").should("be.visible");
cy.findByText("Disabled").click();
cy.findByLabelText("Disabled").click();
cy.findByText("Enabled").should("be.visible");
});
@@ -361,7 +361,7 @@ describe("scenarios > home > custom homepage", () => {
cy.findByTestId("custom-homepage-setting").within(() => {
cy.findByText("Enabled").should("exist");
cy.findByText("Enabled").click();
cy.findByLabelText("Enabled").click();
cy.findByText("Disabled").should("exist");
});
@@ -369,7 +369,7 @@ describe("scenarios > home > custom homepage", () => {
cy.findByTestId("custom-homepage-setting").within(() => {
cy.findByText("Disabled").should("exist");
cy.findByText("Disabled").click();
cy.findByLabelText("Disabled").click();
cy.findByText("Enabled").should("exist");
});
@@ -643,7 +643,9 @@ describe("scenarios > setup", () => {
it("should send snowplow events through admin settings", () => {
cy.visit("/admin/settings/general");
cy.findByTestId("custom-homepage-setting").findByText("Disabled").click();
cy.findByTestId("custom-homepage-setting")
.findByLabelText("Disabled")
.click();
cy.findByTestId("custom-homepage-dashboard-setting")
.findByRole("button")

View File

@@ -183,7 +183,7 @@ describe("scenarios > setup", () => {
cy.intercept(SUBSCRIBE_URL, {}).as("subscribe");
// Finish & Subscribe
cy.findByText(
cy.findByLabelText(
"Get infrequent emails about new releases and feature updates.",
).click();
@@ -681,7 +681,7 @@ describe("scenarios > setup", () => {
step: "completed",
});
cy.findByText(
cy.findByLabelText(
"Get infrequent emails about new releases and feature updates.",
).click();
@@ -691,7 +691,7 @@ describe("scenarios > setup", () => {
event_detail: "opted-in",
});
cy.findByText(
cy.findByLabelText(
"Get infrequent emails about new releases and feature updates.",
).click();

View File

@@ -892,7 +892,7 @@ describe("scenarios > search", () => {
cy.wait("@search");
cy.findByTestId("verified-search-filter")
.findByText("Verified items only")
.findByLabelText("Verified items only")
.click();
cy.wait("@search");
@@ -910,7 +910,7 @@ describe("scenarios > search", () => {
cy.wait("@search");
cy.findByTestId("verified-search-filter")
.findByText("Verified items only")
.findByLabelText("Verified items only")
.click();
cy.url().should("not.include", "verified=true");
@@ -975,7 +975,7 @@ describe("scenarios > search", () => {
});
cy.findByTestId("search_native_query-search-filter")
.findByText("Search the contents of native queries")
.findByLabelText("Search the contents of native queries")
.click();
cy.url().should("include", "search_native_query=true");
@@ -996,7 +996,7 @@ describe("scenarios > search", () => {
});
cy.findByTestId("search_native_query-search-filter")
.findByText("Search the contents of native queries")
.findByLabelText("Search the contents of native queries")
.click();
expectSearchResultItemNameContent({
@@ -1091,7 +1091,7 @@ describe("scenarios > search", () => {
.should("exist");
cy.findByTestId("archived-search-filter")
.findByText("Search items in trash")
.findByLabelText("Search items in trash")
.click();
cy.findAllByTestId("search-result-item").should("have.length", 0);

View File

@@ -501,7 +501,7 @@ describe("scenarios > search > snowplow", () => {
});
cy.findByTestId("verified-search-filter")
.findByText("Verified items only")
.findByLabelText("Verified items only")
.click();
H.expectUnstructuredSnowplowEvent({
@@ -523,7 +523,7 @@ describe("scenarios > search > snowplow", () => {
});
cy.findByTestId("verified-search-filter")
.findByText("Verified items only")
.findByLabelText("Verified items only")
.click();
H.expectUnstructuredSnowplowEvent({
@@ -558,7 +558,7 @@ describe("scenarios > search > snowplow", () => {
});
cy.findByTestId("search_native_query-search-filter")
.findByText("Search the contents of native queries")
.findByLabelText("Search the contents of native queries")
.click();
H.expectUnstructuredSnowplowEvent({
@@ -580,7 +580,7 @@ describe("scenarios > search > snowplow", () => {
});
cy.findByTestId("search_native_query-search-filter")
.findByText("Search the contents of native queries")
.findByLabelText("Search the contents of native queries")
.click();
H.expectUnstructuredSnowplowEvent({
@@ -615,7 +615,7 @@ describe("scenarios > search > snowplow", () => {
});
cy.findByTestId("archived-search-filter")
.findByText("Search items in trash")
.findByLabelText("Search items in trash")
.click();
H.expectUnstructuredSnowplowEvent({
@@ -637,7 +637,7 @@ describe("scenarios > search > snowplow", () => {
});
cy.findByTestId("archived-search-filter")
.findByText("Search items in trash")
.findByLabelText("Search items in trash")
.click();
H.expectUnstructuredSnowplowEvent({

View File

@@ -104,7 +104,7 @@ describe("scenarios > alert > types", { tags: "@external" }, () => {
});
H.modal().within(() => {
cy.findByText("Delete this Alert after it's triggered").click();
cy.findByLabelText("Delete this Alert after it's triggered").click();
cy.button("Done").click();
});

View File

@@ -66,7 +66,7 @@ describe("scenarios > admin > settings > public sharing", () => {
cy.visit("/admin/settings/public-sharing");
cy.findByTestId("enable-public-sharing-setting").within(() => {
cy.findByText("Enabled").should("be.visible");
cy.findByText("Enabled").click();
cy.findByLabelText("Enabled").click();
cy.findByText("Disabled").should("be.visible");
});
});

View File

@@ -785,9 +785,10 @@ describe("UXW-2696", () => {
H.getDocumentSidebar().within(() => {
cy.findByRole("radio", { name: /axes/i }).click({ force: true });
cy.findByRole("switch", { name: /auto y-axis range/i }).should(
"not.have.attr",
cy.findByLabelText("Auto y-axis range").should(
"have.attr",
"data-checked",
"false",
);
cy.findByLabelText("Min").clear().type("70");
@@ -828,9 +829,10 @@ describe("UXW-2696", () => {
H.modal().within(() => {
cy.findByRole("radio", { name: /axes/i }).click({ force: true });
cy.findByRole("switch", { name: /auto y-axis range/i }).should(
"not.have.attr",
cy.findByLabelText("Auto y-axis range").should(
"have.attr",
"data-checked",
"false",
);
assertNoPoints(false);

View File

@@ -22,12 +22,16 @@ interface TestInputProps {
}
function TestInput({ defaultValue = "", onChange }: TestInputProps) {
const [value, setValue] = useState(defaultValue);
const [value, setValue] = useState<number | string>(defaultValue);
// onChange returns either a valid number or string edge cases like "" or "."
// onChange returns either a valid number or string edge cases like "", ".", or "15."
const handleChange = (value: number | string) => {
setValue(typeof value === "number" ? value : "");
onChange?.(typeof value === "number" ? value : "");
setValue(value);
if (typeof value === "number") {
onChange?.(value);
} else if (value === "") {
onChange?.("");
}
};
return <NumberInput label="Number" value={value} onChange={handleChange} />;

View File

@@ -8,6 +8,7 @@ export const menuOverrides = {
radius: "sm",
shadow: "md",
withinPortal: true,
returnFocus: false,
},
classNames: {
dropdown: MenuStyles.dropdown,

View File

@@ -39,9 +39,9 @@
"@lezer/highlight": "^1.2.1",
"@lezer/lr": "^1.4.2",
"@loki/browser": "0.35.0",
"@mantine/core": "8.3.5",
"@mantine/dates": "8.3.5",
"@mantine/hooks": "8.3.5",
"@mantine/core": "8.3.18",
"@mantine/dates": "8.3.18",
"@mantine/hooks": "8.3.18",
"@popperjs/core": "^2.11.8",
"@react-oauth/google": "^0.11.1",
"@reduxjs/toolkit": "^2.5.0",

View File

@@ -1,9 +1,10 @@
diff --git a/node_modules/@mantine/core/styles.css b/node_modules/@mantine/core/styles.css
index d85c47e..eff1daa 100644
index f88cb14..38be78c 100644
--- a/node_modules/@mantine/core/styles.css
+++ b/node_modules/@mantine/core/styles.css
@@ -1,37 +1,3 @@
-:root {
@@ -1,38 +1,3 @@
-:root,
-:host {
- color-scheme: var(--mantine-color-scheme);
-}
-
@@ -25,7 +26,8 @@ index d85c47e..eff1daa 100644
- text-transform: none;
-}
-
-body {
-body,
-:host {
- margin: 0;
- font-family: var(--mantine-font-family);
- font-size: var(--mantine-font-size-md);
@@ -36,7 +38,6 @@ index d85c47e..eff1daa 100644
- -webkit-font-smoothing: var(--mantine-webkit-font-smoothing);
- -moz-osx-font-smoothing: var(--mantine-moz-font-smoothing);
-}
-
@media screen and (max-device-width: 31.25em) {
body {