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.
Types of Changes
Prerequisites
Please make sure you can check the following two boxes:
Contribution Type
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Description
This is another attempt to upgrade Precise UI dependencies. Lots of our dependencies including such major ones as Typescript, Webpack, Styleguidist, or React are one or many major versions behind. There were 3 unfinished attempts to update some or all of them during the last year:
react-styleguidist
andjest
#321This attempt is not based on any of them directly, but I used them for reference. My primary goal was to update Typescript to version 4. Most of the other updates are cascading changes needed to fix issues with the main upgrade. There are still many dependencies that have to be updated, but the PR is already huge. Here are some points I want to highlight:
Text snapshot changes
During the upgrade, I had to update some snapshots. There are 3 main reasons for the changes:
Some of these changes may potentially cause problems. I ran the visual tests before committing them, and they were OK, so I hope I have not broken anything. I am not an expert in frontend and not closely familiar with Precise UI, so please check the changes thoroughly.
Visual snapshot changes
I have updated Puppeteer and Chromium. There was a bunch of broken snapshots but the difference mostly was not noticeable visually. I guess it was caused by the rendering engine changes in Chromium.
I have attached the visual diff files for your convenience. Please take a look, as some of the changes were more significant, like the ones in StackPanel_3-diff.png, TagBuilder_15-diff.png, and Flyout_11-diff.png
Bundle size
The bundle size has increased from 650 to 726 Kb. I did not try to do anything with it as I am not an expert in this field and optimizing the bundle was not my primary goal. Maybe there is a way to decrease it, but I am not capable of doing it myself.
There is still lots of work to do, including updates of Jest, Webpack, some other packages, but I believe we should move forward with smaller steps, so I have stopped here.