Skip to content

Commit

Permalink
Remove unused SetElementsToRerender action (#6665)
Browse files Browse the repository at this point in the history
**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
  • Loading branch information
gbalint authored Nov 20, 2024
1 parent 21024fe commit c42354c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 19 deletions.
6 changes: 0 additions & 6 deletions editor/src/components/editor/action-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1104,11 +1104,6 @@ export interface RunEscapeHatch {
setHuggingParentToFixed: SetHuggingParentToFixed
}

export interface SetElementsToRerender {
action: 'SET_ELEMENTS_TO_RERENDER'
value: ElementsToRerender
}

export type ToggleSelectionLock = {
action: 'TOGGLE_SELECTION_LOCK'
targets: Array<ElementPath>
Expand Down Expand Up @@ -1376,7 +1371,6 @@ export type EditorAction =
| SetResizeOptionsTargetOptions
| ForceParseFile
| RunEscapeHatch
| SetElementsToRerender
| ToggleSelectionLock
| UpdateAgainstGithub
| SetImageDragSessionState
Expand Down
1 change: 0 additions & 1 deletion editor/src/components/editor/actions/action-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ export function isTransientAction(action: EditorAction): boolean {
case 'UPDATE_INTERACTION_SESSION':
case 'UPDATE_DRAG_INTERACTION_DATA':
case 'SET_USERS_PREFERRED_STRATEGY':
case 'SET_ELEMENTS_TO_RERENDER':
case 'TOGGLE_SELECTION_LOCK':
case 'UPDATE_GITHUB_OPERATIONS':
case 'SET_REFRESHING_DEPENDENCIES':
Expand Down
10 changes: 0 additions & 10 deletions editor/src/components/editor/actions/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ import type {
SetCodeEditorVisibility,
SetCurrentTheme,
SetCursorOverlay,
SetElementsToRerender,
SetFilebrowserDropTarget,
SetFilebrowserRenamingTarget,
SetFocusedElement,
Expand Down Expand Up @@ -5756,15 +5755,6 @@ export const UPDATE_FNS = {
return editor
}
},
SET_ELEMENTS_TO_RERENDER: (action: SetElementsToRerender, editor: EditorModel): EditorModel => {
return {
...editor,
canvas: {
...editor.canvas,
elementsToRerender: action.value,
},
}
},
TOGGLE_SELECTION_LOCK: (action: ToggleSelectionLock, editor: EditorModel): EditorModel => {
const targets = action.targets
return targets.reduce((working, target) => {
Expand Down
2 changes: 0 additions & 2 deletions editor/src/components/editor/store/editor-update.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,6 @@ export function runSimpleLocalEditorAction(
return UPDATE_FNS.FORCE_PARSE_FILE(action, state)
case 'RUN_ESCAPE_HATCH':
return UPDATE_FNS.RUN_ESCAPE_HATCH(action, state, builtInDependencies)
case 'SET_ELEMENTS_TO_RERENDER':
return UPDATE_FNS.SET_ELEMENTS_TO_RERENDER(action, state)
case 'TOGGLE_SELECTION_LOCK':
return UPDATE_FNS.TOGGLE_SELECTION_LOCK(action, state)
case 'UPDATE_AGAINST_GITHUB':
Expand Down

0 comments on commit c42354c

Please sign in to comment.