-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Organize action code to prepare for moving to v12 and moving code into core.
My goal with this organization is to identify which parts of the code have significant dependencies and which operate as standalone. Many actions only need a few pieces of information: a canCurrentlyEdit function, a workspace, a getState function, and a cursor on which to act.
The Navigation class currently has implementations of a lot of callbacks. Several can be encapsulated in their respective actions, while the remainder give us information about missing APIs. The Navigation and NavigationController classes also add handlers, change listeners, and monkeypatches that will become unnecessary as their implementations are moved into core.
Several actions clearly can move into separate files, including both the shortcut/context menu and the actual implementation of the action:
- show action menu (chore: move action menu to its own file #285)
- disconnect (chore: move disconnect action to its own file #284)
- clipboard, including paste (chore: move paste implementation into clipboard.ts #283)
- workspace movement (chore: move workspace movement into a separate file #281)
- list shortcuts (Move "list shortcuts" to the shortcut dialog #294)
- arrow key navigation (Move previous/next/in/out shortcuts to a new file #296)
- enter/space (Move enter action and helpers to a new file #297)
- exit (Move exit action to a new file #298)
- edit (feat: Edit option in block context menu #274)
Other actions may need to be deleted wholesale (#286, #264, and #295).
There is already a PR open to remove the markedNode field from navigator.ts (#273)