Commit 2606826
authored
refactor: Fix fast refresh invalidations (#1150)
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 `GridRenderer` doesn'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 refreshes
We 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 `renderFileListItem` to `FileListItem`.
Renamed `RenderFileListItemProps` to `FileListItemProps`.
Removed exports for `ConsolePlugin.assertIsConsolePluginProps`,
`GridPlugin.SUPPORTED_TYPES`, `FileList.getPathFromItem`,
`FileList.DRAG_HOVER_TIMEOUT`, `FileList.getItemIcon`,
`Grid.directionForKey`, `GotoRow.isIrisGridProxyModel`, and
`Aggregations.SELECTABLE_OPTIONS`. These were all only being consumed
within their own file and are not consumed in enterprise1 parent 362928f commit 2606826
53 files changed
Lines changed: 392 additions & 304 deletions
File tree
- packages
- code-studio/src
- main
- settings
- styleguide
- components/src
- console/src
- command-history
- console-history
- dashboard-core-plugins/src
- linker
- panels
- embed-chart/src
- embed-grid/src
- eslint-config
- file-explorer/src
- grid/src
- iris-grid/src
- sidebar/aggregations
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | | - | |
| 380 | + | |
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
| 395 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
907 | | - | |
| 907 | + | |
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
| 912 | + | |
| 913 | + | |
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
647 | | - | |
648 | | - | |
649 | | - | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
631 | 631 | | |
632 | 632 | | |
633 | 633 | | |
634 | | - | |
635 | | - | |
636 | | - | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
0 commit comments