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

Mantine 7 support #5340

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
13cbd1f
feat(mantine): mantine 7
glebtv Feb 21, 2024
51f4503
feat(inferencer): mantine 7
glebtv Feb 21, 2024
8cdbcb8
feat(ui-tests): mantine 7
glebtv Feb 21, 2024
41febc0
feat(live-previews): mantine 7
glebtv Feb 21, 2024
e06b1dd
feat(examples): mantine 7
glebtv Feb 21, 2024
f7b8900
fix(mantine): mantine select crashes when label is undefined
glebtv Feb 21, 2024
9aaa2d9
Merge branch 'master' into mantine7.v4
BatuhanW Feb 21, 2024
29349da
fix(mantine): fix e2e tests
glebtv Feb 22, 2024
fcee89d
chore: format files
BatuhanW Feb 26, 2024
c85e590
Merge branch 'master' into mantine7.v4
BatuhanW Feb 26, 2024
c67ad52
fix(mantine): restore accidentally removed class
glebtv Feb 26, 2024
9aba874
fix(inferencer): update test snapshots
glebtv Feb 26, 2024
7f16ddb
chore(mantine): remove unused types, remove ThemedLayout v1, remove c…
glebtv Feb 27, 2024
e152887
chore(mantine): add changeset, undo changes to package versions
glebtv Feb 27, 2024
e5e65a5
fix(mantine): better action button variant handling
glebtv Feb 27, 2024
00b4538
fix(mantine): move github banner to appshell footer
glebtv Feb 27, 2024
082517b
fix: restore refinedev/mantine version
glebtv Feb 27, 2024
cde6385
fix: examples/base-mantine remove unused filter
glebtv Feb 27, 2024
d2c8563
fix: remove commented code, better mantine test wrapper
glebtv Feb 27, 2024
451ad37
Merge branch 'master' into mantine7.v4
glebtv Feb 29, 2024
230c0a6
Merge branch 'master' into mantine7.v4
BatuhanW Feb 29, 2024
2a05017
fix(inferencer): add React import to mantine inferencer generated code
glebtv Feb 29, 2024
3221708
Merge branch 'master' into mantine7.v4
BatuhanW Feb 29, 2024
6afde2f
Merge branch 'master' into mantine7.v4
BatuhanW Mar 4, 2024
04e0f4b
chore(mantine): split changesets as per review
glebtv Mar 4, 2024
2d89b2f
chore(mantine): remove commented code
glebtv Mar 4, 2024
f7d75f7
chore(mantine): icon color should be primary
glebtv Mar 4, 2024
34480b7
fix(inferencer): filterDataOnExactSearchMatch is no longer available …
glebtv Mar 4, 2024
9260b67
Merge branch 'master' into mantine7.v4
BatuhanW Mar 7, 2024
1817134
Merge remote-tracking branch 'upstream/master' into mantine7-v2-1
glebtv Mar 28, 2024
f20d327
fix(mantine): try fix biome lint error
glebtv Mar 28, 2024
e0e99af
chore(mantine): update mantine version in docs
glebtv Mar 28, 2024
bacc65a
Merge remote-tracking branch 'upstream/releases/april' into mantine7.v4
glebtv Mar 29, 2024
77f7e9c
chore: try fix biome errors
glebtv Mar 29, 2024
515dc57
chore: fix versions after merge, fix mantine delete button tests
glebtv Mar 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/mantine-7-inferencer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@refinedev/inferencer": minor
---

feat: Update to mantine 7
5 changes: 5 additions & 0 deletions .changeset/mantine-7-live-previews.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@refinedev/live-previews": minor
---

feat: Update to mantine 7
7 changes: 7 additions & 0 deletions .changeset/mantine-7-mantine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@refinedev/mantine": major
---

feat: Update to mantine 7

Resolves #5178
5 changes: 5 additions & 0 deletions .changeset/mantine-7-ui-tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@refinedev/ui-tests": minor
---

feat: Update to mantine 7
43 changes: 41 additions & 2 deletions cypress/support/commands/mantine/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,52 @@ export const getMantineLoadingOverlay = () => {
return cy.get(".mantine-LoadingOverlay-root");
};

export const clearMantineSelect = (field: string) => {
cy.get(field).each(($elm) => {
cy.wrap($elm)
.invoke("val")
.then((text) => {
if (text) {
cy.get(field).click();
cy.get(".mantine-Popover-dropdown:visible .mantine-Select-option")
.contains(text as string)
.click();
}
});
});
};

export const fillMantineStatus = (status = "Published") => {
// Select option if it's not selected
cy.get("#status").each(($elm) => {
cy.wrap($elm)
.invoke("val")
.then((text) => {
if (status) {
if (text === status) {
} else {
cy.get("#status").click();
cy.get(".mantine-Popover-dropdown:visible .mantine-Select-option")
.contains(status)
.click();
}
} else {
cy.get("#status").click();
cy.get(".mantine-Popover-dropdown:visible .mantine-Select-option")
.first()
.click();
}
});
});
};

export const fillMantineForm = () => {
cy.fixture("mock-post").then((mockPost) => {
cy.get("#title").clear().type(mockPost.title);
cy.get("#content textarea").clear({ force: true }).type(mockPost.content, {
delay: 32,
});
cy.get("#status").click().get("#status-0").click();
cy.get("#categoryId").clear().get("#categoryId-1").click();
cy.fillMantineStatus();
cy.get("#categoryId").click().type("{downArrow}{enter}", { force: true });
});
};
4 changes: 4 additions & 0 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import {
getMantineLoadingOverlay,
getMantineNotification,
getMantinePopoverDeleteButton,
fillMantineStatus,
clearMantineSelect,
} from "./commands/mantine";
import {
getCreateButton,
Expand Down Expand Up @@ -112,6 +114,8 @@ Cypress.Commands.add(
);
Cypress.Commands.add("getMaterialUIColumnHeader", getMaterialUIColumnHeader);

Cypress.Commands.add("clearMantineSelect", clearMantineSelect);
Cypress.Commands.add("fillMantineStatus", fillMantineStatus);
Cypress.Commands.add("fillMantineForm", fillMantineForm);
Cypress.Commands.add("getMantineNotification", getMantineNotification);
Cypress.Commands.add(
Expand Down
2 changes: 2 additions & 0 deletions cypress/support/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ declare namespace Cypress {
params: IGetMantineFormItemErrorParams,
): Chainable<JQuery<HTMLElement>>;
getMantineLoadingOverlay(): Chainable<JQuery<HTMLElement>>;
fillMantineStatus: (status?: string) => void;
clearMantineSelect: (field: string) => void;
fillMantineForm: () => void;

getMaterialUINotification(): Chainable<JQuery<HTMLElement>>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export function MantineAuth() {
"react-router": "latest",
"@tabler/icons-react": "^3.1.0",
"@emotion/react": "^11.8.2",
"@mantine/core": "^5.10.4",
"@mantine/hooks": "^5.10.4",
"@mantine/notifications": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/notifications": "^7.5.1",
}}
startRoute="/login"
files={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export default function ServerSideValidationMantine() {
"@tanstack/react-table": "^8.2.6",
"@tabler/icons-react": "^3.1.0",
"@emotion/react": "^11.8.2",
"@mantine/core": "^5.10.4",
"@mantine/hooks": "^5.10.4",
"@mantine/form": "^5.10.4",
"@mantine/notifications": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/form": "^7.5.1",
"@mantine/notifications": "^7.5.1",
"react-router": "latest",
"react-router-dom": "^6.8.1",
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export default function UseSelectMantine() {
"@refinedev/simple-rest": "latest",
"@refinedev/react-hook-form": "latest",
"@refinedev/mantine": "^2.28.21",
"@mantine/core": "^5.10.4",
"@mantine/notifications": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/notifications": "^7.5.1",
"@emotion/react": "^11.8.2",
"@mantine/form": "^5.10.4",
"@mantine/form": "^7.5.1",
}}
startRoute="/"
files={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function MantineAuth() {
"@refinedev/react-table": "latest",
"react-router-dom": "latest",
"react-router": "latest",
"@mantine/core": "^5.10.4",
"@mantine/core": "^7.5.1",
}}
startRoute="/login"
files={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export function MantineLayout() {
"react-router": "latest",
"@tabler/icons-react": "^3.1.0",
"@emotion/react": "^11.8.2",
"@mantine/core": "^5.10.4",
"@mantine/hooks": "^5.10.4",
"@mantine/notifications": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/notifications": "^7.5.1",
}}
startRoute="/my-products"
files={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ export default function NotificationMantine() {
dependencies={{
"@refinedev/core": "latest",
"@refinedev/simple-rest": "latest",
"@mantine/notifications": "^5.10.4",
"@mantine/notifications": "^7.5.1",
"@emotion/react": "^11.8.2",
"@mantine/core": "^5.10.4",
"@mantine/hooks": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@refinedev/mantine": "^2.28.21",
}}
startRoute="/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function BaseMantineTable() {
"@refinedev/mantine": "latest",
"@refinedev/react-table": "latest",
"@tanstack/react-table": "latest",
"@mantine/core": "^5.10.4",
"@mantine/core": "^7.5.1",
"@tabler/icons-react": "^3.1.0",
}}
startRoute="/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export default function AuthPage() {
"@tanstack/react-table": "^8.2.6",
"@tabler/icons-react": "^3.1.0",
"@emotion/react": "^11.8.2",
"@mantine/core": "^5.10.4",
"@mantine/hooks": "^5.10.4",
"@mantine/form": "^5.10.4",
"@mantine/notifications": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/form": "^7.5.1",
"@mantine/notifications": "^7.5.1",
"react-router": "latest",
"react-router-dom": "^6.8.1",
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export default function BasicViews() {
"@tanstack/react-table": "^8.2.6",
"@tabler/icons-react": "^3.1.0",
"@emotion/react": "^11.8.2",
"@mantine/core": "^5.10.4",
"@mantine/hooks": "^5.10.4",
"@mantine/form": "^5.10.4",
"@mantine/notifications": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/form": "^7.5.1",
"@mantine/notifications": "^7.5.1",
"react-router": "latest",
"react-router-dom": "^6.8.1",
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export default function Example() {
"@tanstack/react-table": "^8.2.6",
"@tabler/icons-react": "^3.1.0",
"@emotion/react": "^11.8.2",
"@mantine/core": "^5.10.4",
"@mantine/hooks": "^5.10.4",
"@mantine/form": "^5.10.4",
"@mantine/notifications": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/form": "^7.5.1",
"@mantine/notifications": "^7.5.1",
"react-router": "latest",
"react-router-dom": "^6.8.1",
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export default function LayoutReactRouterDom() {
"@tanstack/react-table": "^8.2.6",
"@tabler/icons-react": "^3.1.0",
"@emotion/react": "^11.8.2",
"@mantine/core": "^5.10.4",
"@mantine/hooks": "^5.10.4",
"@mantine/form": "^5.10.4",
"@mantine/notifications": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/form": "^7.5.1",
"@mantine/notifications": "^7.5.1",
"react-router": "latest",
"react-router-dom": "^6.8.1",
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export default function LayoutRemix() {
"@tanstack/react-table": "^8.2.6",
"@tabler/icons-react": "^3.1.0",
"@emotion/react": "^11.8.2",
"@mantine/core": "^5.10.4",
"@mantine/hooks": "^5.10.4",
"@mantine/form": "^5.10.4",
"@mantine/notifications": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/form": "^7.5.1",
"@mantine/notifications": "^7.5.1",
"@refinedev/remix-router": "latest",
}}
startRoute="/products"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export default function Usage() {
"@tanstack/react-table": "^8.2.6",
"@tabler/icons-react": "^3.1.0",
"@emotion/react": "^11.8.2",
"@mantine/core": "^5.10.4",
"@mantine/hooks": "^5.10.4",
"@mantine/form": "^5.10.4",
"@mantine/notifications": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/form": "^7.5.1",
"@mantine/notifications": "^7.5.1",
"react-router": "latest",
"react-router-dom": "^6.8.1",
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export default function UsageNextjs() {
"@tanstack/react-table": "^8.2.6",
"@tabler/icons-react": "^3.1.0",
"@emotion/react": "^11.8.2",
"@mantine/core": "^5.10.4",
"@mantine/hooks": "^5.10.4",
"@mantine/form": "^5.10.4",
"@mantine/notifications": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/form": "^7.5.1",
"@mantine/notifications": "^7.5.1",
"@refinedev/nextjs-router": "latest",
}}
// template="nextjs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export default function UsageReactRouterDom() {
"@tanstack/react-table": "^8.2.6",
"@tabler/icons-react": "^3.1.0",
"@emotion/react": "^11.8.2",
"@mantine/core": "^5.10.4",
"@mantine/hooks": "^5.10.4",
"@mantine/form": "^5.10.4",
"@mantine/notifications": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/form": "^7.5.1",
"@mantine/notifications": "^7.5.1",
"@refinedev/react-router-v6": "^4.5.4",
"react-router": "latest",
"react-router-dom": "^6.8.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export default function UsageRemix() {
"@tanstack/react-table": "^8.2.6",
"@tabler/icons-react": "^3.1.0",
"@emotion/react": "^11.8.2",
"@mantine/core": "^5.10.4",
"@mantine/hooks": "^5.10.4",
"@mantine/form": "^5.10.4",
"@mantine/notifications": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/form": "^7.5.1",
"@mantine/notifications": "^7.5.1",
"@refinedev/remix-router": "latest",
}}
startRoute="/products"
Expand Down
7 changes: 4 additions & 3 deletions examples/auth-mantine/cypress/e2e/all.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe("auth-mantine", () => {
describe("logout", () => {
it("should logout", () => {
login();
cy.get("button")
cy.get("a")
.contains(/logout/i)
.click();
cy.location("pathname").should("eq", "/login");
Expand All @@ -136,8 +136,9 @@ describe("auth-mantine", () => {
describe("get identity", () => {
it("should render getIdentity response on header", () => {
login();
cy.get(".mantine-Text-root").contains(/jane doe/i);
cy.get(".mantine-Avatar-image").should("have.attr", "src");

cy.get("header .mantine-Title-root").contains(/jane doe/i);
cy.get("header .mantine-Avatar-image").should("have.attr", "src");
});
});
});
8 changes: 4 additions & 4 deletions examples/auth-mantine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
},
"dependencies": {
"@emotion/react": "^11.8.2",
"@mantine/core": "^5.10.4",
"@mantine/form": "^5.10.4",
"@mantine/hooks": "^5.10.4",
"@mantine/notifications": "^5.10.4",
"@mantine/core": "^7.5.1",
"@mantine/form": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/notifications": "^7.5.1",
"@refinedev/cli": "^2.16.27",
"@refinedev/core": "^4.48.0",
"@refinedev/mantine": "^2.29.5",
Expand Down
Loading
Loading