Skip to content

Commit c42354c

Browse files
authored
Remove unused SetElementsToRerender action (#6665)
**Problem:** SetElementsToRerender action is not used anymore, let's delete it. **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [x] I could navigate to various routes in Play mode
1 parent 21024fe commit c42354c

File tree

4 files changed

+0
-19
lines changed

4 files changed

+0
-19
lines changed

editor/src/components/editor/action-types.ts

-6
Original file line numberDiff line numberDiff line change
@@ -1104,11 +1104,6 @@ export interface RunEscapeHatch {
11041104
setHuggingParentToFixed: SetHuggingParentToFixed
11051105
}
11061106

1107-
export interface SetElementsToRerender {
1108-
action: 'SET_ELEMENTS_TO_RERENDER'
1109-
value: ElementsToRerender
1110-
}
1111-
11121107
export type ToggleSelectionLock = {
11131108
action: 'TOGGLE_SELECTION_LOCK'
11141109
targets: Array<ElementPath>
@@ -1376,7 +1371,6 @@ export type EditorAction =
13761371
| SetResizeOptionsTargetOptions
13771372
| ForceParseFile
13781373
| RunEscapeHatch
1379-
| SetElementsToRerender
13801374
| ToggleSelectionLock
13811375
| UpdateAgainstGithub
13821376
| SetImageDragSessionState

editor/src/components/editor/actions/action-utils.ts

-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ export function isTransientAction(action: EditorAction): boolean {
119119
case 'UPDATE_INTERACTION_SESSION':
120120
case 'UPDATE_DRAG_INTERACTION_DATA':
121121
case 'SET_USERS_PREFERRED_STRATEGY':
122-
case 'SET_ELEMENTS_TO_RERENDER':
123122
case 'TOGGLE_SELECTION_LOCK':
124123
case 'UPDATE_GITHUB_OPERATIONS':
125124
case 'SET_REFRESHING_DEPENDENCIES':

editor/src/components/editor/actions/actions.tsx

-10
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ import type {
251251
SetCodeEditorVisibility,
252252
SetCurrentTheme,
253253
SetCursorOverlay,
254-
SetElementsToRerender,
255254
SetFilebrowserDropTarget,
256255
SetFilebrowserRenamingTarget,
257256
SetFocusedElement,
@@ -5756,15 +5755,6 @@ export const UPDATE_FNS = {
57565755
return editor
57575756
}
57585757
},
5759-
SET_ELEMENTS_TO_RERENDER: (action: SetElementsToRerender, editor: EditorModel): EditorModel => {
5760-
return {
5761-
...editor,
5762-
canvas: {
5763-
...editor.canvas,
5764-
elementsToRerender: action.value,
5765-
},
5766-
}
5767-
},
57685758
TOGGLE_SELECTION_LOCK: (action: ToggleSelectionLock, editor: EditorModel): EditorModel => {
57695759
const targets = action.targets
57705760
return targets.reduce((working, target) => {

editor/src/components/editor/store/editor-update.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,6 @@ export function runSimpleLocalEditorAction(
447447
return UPDATE_FNS.FORCE_PARSE_FILE(action, state)
448448
case 'RUN_ESCAPE_HATCH':
449449
return UPDATE_FNS.RUN_ESCAPE_HATCH(action, state, builtInDependencies)
450-
case 'SET_ELEMENTS_TO_RERENDER':
451-
return UPDATE_FNS.SET_ELEMENTS_TO_RERENDER(action, state)
452450
case 'TOGGLE_SELECTION_LOCK':
453451
return UPDATE_FNS.TOGGLE_SELECTION_LOCK(action, state)
454452
case 'UPDATE_AGAINST_GITHUB':

0 commit comments

Comments
 (0)