-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
chore: Update react / cypress / slate / toast & more #6811
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for decap-www ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
… cypress-file-upload dep
5dfe3a4
to
0b060b2
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
A major overhaul of dependencies and required changes in code+tests to adapt to the new library versions. There are obviously a lot of changes and I will try to make a summary here of what was done as well as what was intentionally left out for the next phase (and why).
This version is currently deployed in a private repo and undergoing internal testing with some of our bigger sites where we used as much of the cms functionalities as possible. We are already aware of some bugs, that will be listed below.
Upgraded libraries
Fixed some minor typing inconsistencies but nothing big.
Not many changes needed apart from some configuration files
Lerna 6 now uses nx task runner and a lot of scripts for running, building and testing the project had to be adapted. File change watching is now done by Lerna instead of webpack and react-hot-loader was removed (we might need to find an alternative for this?)
Needed to adapt the e2e tests for some of the things the new version does differently. Some updated snapshots, some stuff that worked in previous version, but shouldn't have and some stability hacks for slate to be tested properly. There were some suggestions among the community to consider Playwright as a Cypress replacement and i would gladly explore this after this PR.
This was the biggest and most time (and nerve) consuming update because it is basically a rewrite of the whole implementation https://docs.slatejs.org/concepts/xx-migrating
Luckily the serializers were split into two parts - slate>remark>markdown so only slate>remark part needed adaptations. There were a lot of slate plugins that needed work - lists being the most problematic. We were relying on cypress e2e tests to ensure everything works as before but also the tests needed some adaptations to play nice with the new version.
Replaced libaries
Some libraries that are no longer maintained needed to be replaced with alternatives.
One of the first things that we did because redux-notifications is unmaintained and outdated
Sortable elements are not working as they were supposed to after upgrading React. As the react-sortable-hoc github suggests, we moved to the suggested solution. It is already implemented on file lists, but might be a bit more complicated with relations, because it uses react-select and migrating is not as straight forward as it seems: Update the Sortable Multiselect component documentation JedWatson/react-select#5212
Todo