-
Notifications
You must be signed in to change notification settings - Fork 102
Refactored to use XState typegen #341
base: dev
Are you sure you want to change the base?
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/statelyai/xstate-viz/DGqQ4WaJU9dBL1UB45CxiQhMgac1 |
@@ -149,27 +152,22 @@ export const dragSessionTracker = dragSessionModel.createMachine( | |||
return ctx.session; | |||
}, | |||
}), | |||
clearSessionData: assign({ | |||
clearSessionData: assign((ctx) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, this might be worth investigating - ideally this unused argument/function shouldn't be needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw. the event here is typed as never
but that is incorrect - this action is an exit action used in the active state and this should be able to receive at least DRAG_SESSION_STOPPED
setPositionAfterSourceChanged: 'SOURCE_CHANGED'; | ||
assignZoomAfterFitToContent: 'FIT_TO_CONTENT'; | ||
assignViewBoxAfterFitToContent: 'FIT_TO_CONTENT'; | ||
persistPositionToLocalStorage: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is definitely wrong, cause like we've discussed - this should always be a union of string literals (or a single string literal)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, this would be different if I did it with the extension now
@@ -49,6 +49,7 @@ const dragModel = createModel( | |||
|
|||
const dragMachine = dragModel.createMachine( | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -49,6 +49,7 @@ const dragModel = createModel( | |||
|
|||
const dragMachine = dragModel.createMachine( | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -107,6 +114,14 @@ const editorPanelModel = createModel( | |||
|
|||
const editorPanelMachine = editorPanelModel.createMachine( | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.