refactor: Fix fast refresh invalidations#1150
Merged
mattrunyon merged 3 commits intodeephaven:mainfrom Mar 17, 2023
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1150 +/- ##
==========================================
+ Coverage 43.46% 44.50% +1.03%
==========================================
Files 437 442 +5
Lines 32951 32961 +10
Branches 8305 8304 -1
==========================================
+ Hits 14323 14670 +347
+ Misses 18579 18242 -337
Partials 49 49
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 19 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
mofojed
reviewed
Mar 15, 2023
mofojed
previously approved these changes
Mar 15, 2023
mofojed
approved these changes
Mar 17, 2023
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #727 as best we can w/o requiring major changes. HMR works best w/ functional components and that's too big of a change to switch everything to functional components just for HMR.
Added an eslint rule which will warn about things that will almost certainly invalidate HMR. Fixed the warnings it emitted.
Tested locally by changing some displayed text values in some panels and seeing if the page triggered a full reload. I didn't have any specific files/cases that triggered full reloads previously and it seems Vite 4 has made it better on its own. If we start running into cases.
Saving
GridRendererdoesn't trigger a full page reload (didn't before either), but massively slows the page (also had this behavior prior to this change). The change eventually propagates and refreshesWe should keep an eye on vitejs/vite#12062 which will likely also fix the slow HMR issues on some components. There seems to be duplication of modules in the update list and it can explode at times (like GridRenderer triggers 14 unique modules, but 20k updates consisting of just those 14)
BREAKING CHANGE:
Renamed
renderFileListItemtoFileListItem.Renamed
RenderFileListItemPropstoFileListItemProps.Removed exports for
ConsolePlugin.assertIsConsolePluginProps,GridPlugin.SUPPORTED_TYPES,FileList.getPathFromItem,FileList.DRAG_HOVER_TIMEOUT,FileList.getItemIcon,Grid.directionForKey,GotoRow.isIrisGridProxyModel, andAggregations.SELECTABLE_OPTIONS. These were all only being consumed within their own file and are not consumed in enterprise