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

feat: update to react 18 #3771

Merged
merged 65 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
d5349d7
feat: update to react 18
brunozoric Dec 13, 2023
06e01cd
chore: lint run
brunozoric Dec 13, 2023
429f3dd
fix: update root package json react-dom and types
brunozoric Dec 13, 2023
bce5857
feat: upgrade to react 18 - fix build #1 (#3773)
neatbyte-vnobis Dec 14, 2023
e7b62b9
feat: upgrade to react 18 - updated rmwc version (#3775)
neatbyte-vnobis Dec 19, 2023
4396207
feat: upgrade to react 18 - fix build #2 (#3774)
neatbyte-vnobis Dec 21, 2023
f293865
feat: upgrade to react 18 - fix build #3 (#3779)
neatbyte-vnobis Jan 2, 2024
c4d14c2
feat: upgrade to react 18 - fix build #4 (#3788)
neatbyte-vnobis Jan 11, 2024
16ac9b6
feat: upgrade to react 18 - fix build #5 (#3797)
neatbyte-vnobis Jan 11, 2024
d117fa8
fix(app-aco): missing types after upgrade to react 18
brunozoric Jan 12, 2024
b607f90
fix(app-graphql-playground): fix types after react 18 upgrades
brunozoric Jan 12, 2024
94b92ed
fix(app-admin-users-cognito): fix types after react 18 upgrades
brunozoric Jan 12, 2024
f9a4ffc
fix(lexical-editor-pb-element): fix types after react 18 upgrades
brunozoric Jan 12, 2024
7072f11
fix(app-form-builder): fix types after react 18 upgrades
brunozoric Jan 12, 2024
4597aad
fix(app-page-builder-editor): fix types after react 18 upgrades
brunozoric Jan 12, 2024
a9c2cff
fix(app-theme-manager): fix types after react 18 upgrades
brunozoric Jan 12, 2024
9596eb1
fix(app-headless-cms): fix types after react 18 upgrades
brunozoric Jan 12, 2024
22c7e5f
fix(app-apw): fix types after react 18 upgrades
brunozoric Jan 12, 2024
1ae9cee
fix(app-audit-logs): fix types after react 18 upgrades
brunozoric Jan 12, 2024
f032856
fix(app-admin-okta): fix types after react 18 upgrades
brunozoric Jan 12, 2024
7acd00f
feat: upgrade to react 18 - fix build #6 (#3819)
neatbyte-vnobis Jan 17, 2024
60d647e
style: prettier run
brunozoric Jan 17, 2024
d1bf33e
feat: upgrade to react 18 - fix build #7 (#3824)
neatbyte-vnobis Jan 17, 2024
4dfab55
feat: upgrade to react 18 - fix build #8 (#3832)
neatbyte-vnobis Feb 5, 2024
cc9835a
chore: update packages
brunozoric Feb 6, 2024
4268096
feat: upgrade to react 18 - fix build #9 (#3860)
neatbyte-vnobis Feb 12, 2024
9afaa36
feat: upgrade to react 18 - fix build #10 (#3868)
neatbyte-vnobis Feb 13, 2024
7fbb472
fix: after next merge
brunozoric Feb 14, 2024
8ff206c
feat: upgrade to react 18 - fix build #11 (#3870)
neatbyte-vnobis Feb 27, 2024
edd63dd
fix: after next merge
brunozoric Mar 13, 2024
066cd51
fix: update react related packages to latest
brunozoric Mar 13, 2024
0535978
fix: use new react-dom client
brunozoric Mar 13, 2024
2e7f675
fix(cli-plugin-scaffold-react-app): missing react import
brunozoric Mar 13, 2024
7ac3dda
fix(app-headless-cms): icon picker
brunozoric Mar 13, 2024
f0a61ca
fix(ui): rmwc version
brunozoric Mar 14, 2024
74576ad
fix(ui): slider
brunozoric Mar 14, 2024
bc490f9
fix(app-apw): nested elements
brunozoric Mar 15, 2024
de7e7e0
fix(app-page-builder): remove nested p
brunozoric Mar 15, 2024
2b0a2fd
fix(ui): remove bottom margin on dialog title
brunozoric Mar 15, 2024
1d110ac
fix(ui): select width
brunozoric Mar 15, 2024
3c36f97
fix(cypress): page block export
brunozoric Mar 15, 2024
56ffb24
fix(ui): browser freeze due to data table getRowModel method
brunozoric Mar 18, 2024
13e2734
chore: fix after next merge
brunozoric Mar 18, 2024
c4d75e8
fix(ui): memoize data table columns and data
brunozoric Mar 18, 2024
df34108
fix(ui): data table continuous rendering
brunozoric Mar 18, 2024
3a50174
feat: introduce `useStateWithCallback` hook
adrians5j Mar 19, 2024
922b144
fix: properly open/close "create page template" dialog
adrians5j Mar 19, 2024
6a8feb3
fix: redirect only when the state has been set
adrians5j Mar 19, 2024
bcb8061
chore: run prettier
adrians5j Mar 19, 2024
cfde576
fix: redirect only when the state has been set
adrians5j Mar 19, 2024
80ea667
fix: remove unneeded `open` flag
adrians5j Mar 19, 2024
5d928bf
fix: use `open` prop instead of conditionally rendering the component
adrians5j Mar 19, 2024
f87e30e
fix: assign `PagePreviewDimension` type to `dimensions` param
adrians5j Mar 20, 2024
3eeb21d
fix: remove "Successfully" word
adrians5j Mar 20, 2024
270b8f7
fix: improve message
adrians5j Mar 21, 2024
a0df3a2
fix: make graceful error messages more prominent
adrians5j Mar 21, 2024
302ae01
fix: add `twoLine={true}` prop
adrians5j Apr 8, 2024
b887942
fix: ensure Chip/Chips components the same as before
adrians5j Apr 9, 2024
be0beef
fix: update Checkbox and Typography usage
Pavel910 Apr 8, 2024
eaa0041
fix: ensure Chip/Chips components the same as before
adrians5j Apr 9, 2024
ea8046c
chore: add `cy:setup`
adrians5j Apr 9, 2024
0e3e7fb
fix: remove unneeded component
adrians5j Apr 9, 2024
02b2283
fix: bring back the original design of the list
adrians5j Apr 9, 2024
04e416d
fix: after next merge
brunozoric May 2, 2024
b5557ec
fix(app-admin): div cannot be inside p tag
brunozoric May 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ apps/**/build/
cypress.json
cypress.config.ts
cypress/screenshots/*
cypress-tests/cypress/screenshots/*
.pulumi
Pulumi.*
!Pulumi.yaml
Expand Down
6 changes: 3 additions & 3 deletions apps/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@editorjs/list": "^1.6.0",
"@editorjs/quote": "^2.4.0",
"@editorjs/underline": "^1.0.0",
"@types/react": "17.0.39",
"@types/react": "18.2.65",
"@webiny/app-admin": "0.0.0",
"@webiny/app-admin-users-cognito": "0.0.0",
"@webiny/app-form-builder": "0.0.0",
Expand All @@ -22,8 +22,8 @@
"core-js": "^3.0.1",
"cross-fetch": "^3.0.4",
"prop-types": "^15.7.2",
"react": "17.0.2",
"react-dom": "17.0.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"regenerator-runtime": "^0.13.5",
"theme": "^0.1.0",
"tslib": "^2.4.0"
Expand Down
8 changes: 4 additions & 4 deletions apps/admin/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";
import "cross-fetch/polyfill";
import "core-js/stable";
import "regenerator-runtime/runtime";
import React from "react";
import ReactDOM from "react-dom";
import { App } from "./App";
import "./plugins";

const render = module.hot ? ReactDOM.render : ReactDOM.hydrate;
render(<App />, document.getElementById("root"));
import { renderApp } from "@webiny/app-admin";

renderApp(<App />);
21 changes: 10 additions & 11 deletions apps/theme/layouts/forms/DefaultFormLayout/Cell.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import styled from "@emotion/styled";

export const Cell = styled.div`
width: 100%;
background-color: ${props => props.theme.styles.colors["color6"]};
padding: 15px;
width: 100%;
background-color: ${props => props.theme.styles.colors["color6"]};
padding: 15px;

${props => props.theme.breakpoints["desktop"]} {
&:first-of-type {
padding-left: 0;
}
${props => props.theme.breakpoints["desktop"]} {
&:first-of-type {
padding-left: 0;
}

&:last-child {
padding-right: 0;
&:last-child {
padding-right: 0;
}
}
}
}
`;
2 changes: 1 addition & 1 deletion apps/theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@webiny/utils": "0.0.0",
"@webiny/validation": "0.0.0",
"graphql": "^15.7.2",
"react": "17.0.2",
"react": "18.2.0",
"react-hamburger-menu": "^1.1.1"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@emotion/react": "^11.10.6",
"@types/react": "17.0.39",
"@types/react": "18.2.65",
"@webiny/app": "0.0.0",
"@webiny/app-form-builder": "0.0.0",
"@webiny/app-page-builder": "0.0.0",
Expand All @@ -20,8 +20,8 @@
"cross-fetch": "^3.0.4",
"graphql": "^15.7.2",
"graphql-tag": "^2.12.6",
"react": "17.0.2",
"react-dom": "17.0.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"regenerator-runtime": "^0.13.5",
"theme": "^0.1.0"
},
Expand Down
8 changes: 4 additions & 4 deletions apps/website/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from "react";
import "cross-fetch/polyfill";
import "core-js/stable";
import "regenerator-runtime/runtime";
import React from "react";
import ReactDOM from "react-dom";
import { App } from "./App";
import "./plugins";
import "theme/global.scss";

const render = module.hot ? ReactDOM.render : ReactDOM.hydrate;
render(<App />, document.getElementById("root"));
import { renderApp } from "@webiny/app";

renderApp(<App />);
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ context("Forms Creation", () => {
.first()
.within(() => {
cy.findByText(newFormTitle2).should("be.visible");
cy.findByTestId("edit-form-action").click({ force: true });
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("edit-form-action")` if issue is fixed.
cy.get('button[data-testid="edit-form-action"]').click({ force: true });
});
});

Expand Down Expand Up @@ -88,7 +90,9 @@ context("Forms Creation", () => {
cy.findAllByTestId("default-data-list-element")
.first()
.within(() => {
cy.findByTestId("delete-form-action").click({ force: true });
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("delete-form-action")` if issue is fixed.
cy.get('button[data-testid="delete-form-action"]').click({ force: true });
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ context("Forms Creation", () => {
});

// 4. UnPublish the form
cy.findByTestId("fb.form-preview.header.unpublish").click();
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("fb.form-preview.header.unpublish")` if issue is fixed.
cy.get('button[data-testid="fb.form-preview.header.unpublish"]').click();
cy.findByTestId("fb.form-preview.header.unpublish-dialog").within(() => {
cy.findByTestId("confirmationdialog-confirm-action").click();
});
Expand All @@ -60,7 +62,9 @@ context("Forms Creation", () => {
});

// 5. Create a new revision from the locked v1 and publish it
cy.findByTestId("fb.form-preview.header.create-revision").click();
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("fb.form-preview.header.create-revision")` if issue is fixed.
cy.get('button[data-testid="fb.form-preview.header.create-revision"]').click();
cy.wait(500);
// 5.1. Add "Website" field to the form
cy.findByTestId("form-editor-field-group-contact").click();
Expand Down Expand Up @@ -126,7 +130,9 @@ context("Forms Creation", () => {
cy.findAllByTestId("fb.form-revisions.action-menu.create-revision").last().click();
cy.wait(1000);
// 8. Go back in form details view and check it's status
cy.findByTestId("fb-editor-back-button").click();
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("fb-editor-back-button")` if issue is fixed.
cy.get('button[data-testid="fb-editor-back-button"]').click();
cy.wait(1000);

cy.findByTestId("default-data-list").within(() => {
Expand All @@ -140,7 +146,9 @@ context("Forms Creation", () => {
});

// Delete form.
cy.findByTestId("fb.form-preview.header.delete").click();
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("fb.form-preview.header.delete")` if issue is fixed.
cy.get('button[data-testid="fb.form-preview.header.delete"]').click();
cy.wait(500);
cy.findByTestId("fb.form-preview.header.delete-dialog").within(() => {
cy.findByText("Confirmation required!").should("exist");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ context("Headless CMS - Content Models CRUD", () => {
});
cy.findByText(`Your content model was saved successfully!`).should("exist");
// Get back to the list view
cy.findByTestId("cms-editor-back-button").click();
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("cms-editor-back-button")` if issue is fixed.
cy.get('button[data-testid="cms-editor-back-button"]').click();
cy.wait(1000);
// 3.3 Check newly created model in data list
cy.findByTestId("default-data-list").within(() => {
Expand All @@ -106,15 +108,21 @@ context("Headless CMS - Content Models CRUD", () => {
.first()
.within(() => {
cy.findByText(`Book - ${uniqueId}`).should("exist");
cy.findByTestId("cms-edit-content-model-button").click({ force: true });
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("cms-edit-content-model-button")` if issue is fixed.
cy.get('button[data-testid="cms-edit-content-model-button"]').click({
force: true
});
});
});
// 4.2 Add field validations
// a) Click on the edit icon
cy.findAllByTestId("cms.editor.field-row")
.first()
.within(() => {
cy.findByTestId("cms.editor.edit-field").click();
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("cms.editor.edit-field")` if issue is fixed.
cy.get('button[data-testid="cms.editor.edit-field"]').click();
});
cy.findByTestId("cms-editor-edit-fields-dialog").within(() => {
// b) Select validation tab from dialog
Expand All @@ -123,7 +131,7 @@ context("Headless CMS - Content Models CRUD", () => {
cy.findByTestId("cms.editor.field-validator.required")
.parent()
.within(() => {
cy.findByLabelText("Enabled").check();
cy.findByLabelText("Enabled").click();
cy.findByTestId("cms.editfield.validators.required").clear();
cy.findByTestId("cms.editfield.validators.required")
.type("Title is required.")
Expand All @@ -145,7 +153,9 @@ context("Headless CMS - Content Models CRUD", () => {
cy.findByTestId("fr.input.number.Edition").type("2");
cy.findByText("Title is required.").should("exist");
// Get back to the list view
cy.findByTestId("cms-editor-back-button").click();
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("cms-editor-back-button")` if issue is fixed.
cy.get('button[data-testid="cms-editor-back-button"]').click();
cy.wait(1000);

// Delete new model
Expand All @@ -155,7 +165,9 @@ context("Headless CMS - Content Models CRUD", () => {
.within(() => {
cy.findByText(`Book - ${uniqueId}`).should("exist");
// a. Click on delete button
cy.findByTestId("cms-delete-content-model-button").click({
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("cms-delete-content-model-button")` if issue is fixed.
cy.get('button[data-testid="cms-delete-content-model-button"]').click({
force: true
});
cy.wait(1000);
Expand Down Expand Up @@ -223,7 +235,9 @@ context("Headless CMS - Content Models CRUD", () => {
//cy.findByTestId("fr.input.file.Image").should("exist");

// Get back to the list view
cy.findByTestId("cms-editor-back-button").click();
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("cms-editor-back-button")` if issue is fixed.
cy.get('button[data-testid="cms-editor-back-button"]').click();
cy.wait(1000);

// Delete new model
Expand All @@ -233,7 +247,9 @@ context("Headless CMS - Content Models CRUD", () => {
.within(() => {
cy.findByText(`Book - ${uniqueId}`).should("exist");
// a. Click on delete button
cy.findByTestId("cms-delete-content-model-button").click({
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("cms-delete-content-model-button")` if issue is fixed.
cy.get('button[data-testid="cms-delete-content-model-button"]').click({
force: true
});
cy.wait(1000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,14 @@ context("Headless CMS - Search and Sort Content Models", () => {
cy.visit("/cms/content-models");

// Sort groups by "Newest to Oldest"
cy.findByTestId("default-data-list.filter").click();
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("default-data-list.filter")` if issue is fixed.
cy.get('button[data-testid="default-data-list.filter"]').click();
cy.findByTestId("ui.list.data-list").within(() => {
cy.get("select").select("savedOn_DESC");
cy.findByTestId("default-data-list.filter").click();
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("default-data-list.filter")` if issue is fixed.
cy.get('button[data-testid="default-data-list.filter"]').click();
});
// Last model should be on the top
cy.findByTestId("default-data-list").within(() => {
Expand All @@ -141,10 +145,14 @@ context("Headless CMS - Search and Sort Content Models", () => {
});

// Sort groups by "Oldest to Newest"
cy.findByTestId("default-data-list.filter").click();
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("default-data-list.filter")` if issue is fixed.
cy.get('button[data-testid="default-data-list.filter"]').click();
cy.findByTestId("ui.list.data-list").within(() => {
cy.get("select").select("savedOn_ASC");
cy.findByTestId("default-data-list.filter").click();
// Workaround for "@rmwc/icon-button" v14 issue: props duplication onto <i>, causing multiple elements with same `data-testid`.
// Now targeting <button> directly. Revert to `.findByTestId("default-data-list.filter")` if issue is fixed.
cy.get('button[data-testid="default-data-list.filter"]').click();
});
// Last model should not be on the top
cy.findByTestId("default-data-list").within(() => {
Expand Down
Loading
Loading