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

Slate, webpack, toastify and cypress #6852

Merged
merged 25 commits into from
Jul 27, 2023
Merged

Slate, webpack, toastify and cypress #6852

merged 25 commits into from
Jul 27, 2023

Conversation

demshy
Copy link
Member

@demshy demshy commented Jul 24, 2023

This PR and branch will integrate changes from #6811 in stages while ensuring the system still works after each step, to make changes more transparent and efficient. Each stage includes the changes from the previous in the rc branch, but for clarity the branches are completely independent for now.

Stage 1 - rc-base

Lint some of the recent repo changes and update some snapshots. Cypress tests fail because Slate is not yet upgraded.

✅ yarn start, yarn test, yarn build

❌ yarn test:e2e

Stage 2 - rc-slate

Upgrade Slate to the new (breaking) version. Most e2e tests should pass, but are not really relevant at this point.

✅ yarn start, yarn test, yarn build

❌ yarn test:e2e

Stage 3 - rc-webpack

Upgrade Webpack because Toastify won’t play nicely with the old version.

✅ yarn start, yarn test, yarn build

❌ yarn test:e2e

Stage 4 - rc-toastify

Replace redux-notifications which is no longer maintained and is also causing some minor problems with the new cypress with Toastify.

✅ yarn start, yarn test, yarn build

❌ yarn test:e2e

Stage 5 - rc-cypress

Update cypress to the latest version and change the tests accordingly where needed. Some changes needed for it to work with new slate.

✅ yarn start, yarn test, yarn build, yarn test:e2e


At this point the project seems stable and ready to be merged into master. We are comfortable with merging open PR’s and new ones that fix existing (and potential new) issues.

There is still a lot of work left to be done and some work that was actually done, but is not included at this point due to instability that react 18 brings to the whole project (some more context below). I will try to put these changes into separate PR drafts so they can be used once the next step is taken.

react 16 → 18

For the most part, the project is stable on react 18, but there are some new bugs and caveats that made us decide to postpone this. There will be a draft PR containing the changes, but it might not be stable until some other PR’s are resolved.

react-sortable-hoc → @dnd-kit/sortable

With react 18, the sortable library introduces some bugs that makes it unusable. Also the library is unmaintained (clauderic/react-sortable-hoc#838). Transition to dnd-kit is already done for galleries, but might be more problematic in relation widget where it is tightly connected to react-select.

lerna 4 → 6

Lerna 6 now uses nx task runner and a lot of scripts for running, building and testing the project have to be adapted. This is already functioning and will become a PR, but needs some testing and consideration. Maybe we could move away from lerna and let yarn do all the work (or most of it).

uuid 3 → 8

This is not really trivial but still fairly simple. We did this along the way so there is no point in throwing it away, but can easily be it’s own PR. Requires changes in a lot of files and some mocks.

@martinjagodic martinjagodic self-requested a review July 27, 2023 11:31
@demshy demshy changed the title Rc Slate, webpack, toastify and cypress Jul 27, 2023
@demshy demshy merged commit b806c55 into master Jul 27, 2023
24 checks passed
@demshy demshy deleted the rc branch July 27, 2023 11:34
martinjagodic pushed a commit that referenced this pull request Oct 16, 2023
* chore: upgrade slate editor to 0.9

* chore: upgrade slate editor to 0.9

* chore: update cypress to 12, update configs and tests to work with it

* chore: replace redux-notifications with toastify

* chore: lint & test recent changes

* chore: upgrade slate editor to 0.9

* chore: update webpack to 5

* chore: upgrade slate editor to 0.9

* chore: lint & test recent changes

* chore: update code to ts4

* chore: lint proxy server and lint some code

* chore: lint & set node version in workflow

* fix: update ObjectControl and ListControl proptypes

* fix: add table renderers and serializers

* feat: add history to visual and raw editor

* feat: add thematic break

* fix: add image renderer and fix thematic-break

* chore: cleanup old slate code

* test: deploy rc
martinjagodic pushed a commit that referenced this pull request Oct 17, 2023
* chore: upgrade slate editor to 0.9

* chore: upgrade slate editor to 0.9

* chore: update cypress to 12, update configs and tests to work with it

* chore: replace redux-notifications with toastify

* chore: lint & test recent changes

* chore: upgrade slate editor to 0.9

* chore: update webpack to 5

* chore: upgrade slate editor to 0.9

* chore: lint & test recent changes

* chore: update code to ts4

* chore: lint proxy server and lint some code

* chore: lint & set node version in workflow

* fix: update ObjectControl and ListControl proptypes

* fix: add table renderers and serializers

* feat: add history to visual and raw editor

* feat: add thematic break

* fix: add image renderer and fix thematic-break

* chore: cleanup old slate code

* test: deploy rc
martinjagodic pushed a commit to geotrev/netlify-cms that referenced this pull request Oct 17, 2023
* chore: upgrade slate editor to 0.9

* chore: upgrade slate editor to 0.9

* chore: update cypress to 12, update configs and tests to work with it

* chore: replace redux-notifications with toastify

* chore: lint & test recent changes

* chore: upgrade slate editor to 0.9

* chore: update webpack to 5

* chore: upgrade slate editor to 0.9

* chore: lint & test recent changes

* chore: update code to ts4

* chore: lint proxy server and lint some code

* chore: lint & set node version in workflow

* fix: update ObjectControl and ListControl proptypes

* fix: add table renderers and serializers

* feat: add history to visual and raw editor

* feat: add thematic break

* fix: add image renderer and fix thematic-break

* chore: cleanup old slate code

* test: deploy rc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants