Fixes a bug where if you deleted all but one character in the workspace
name, you couldn't delete the final character. To fix this, I have made
the workspace editor save a separate entry from the backend. The backend
will also only update its DB value and notify the frontend if something
was actually edited. If you delete all the characters in the name and
don't put anything new in, though, the name will be whatever the last
character you had was, since the name of a saved workspace cannot be
empty.
Also moves icon and color definitions to the backend and makes it so the
new workspaces get created with a different icon color for each index.
If an ephemeral window has more than one tab, always create a new window
when switching workspaces
Also fixes workspace accelerators on macOS
Only create new tab in `CheckAndFixWindow` if no tabs or pinned tabs
exist
Update `resolvers.resolveTabNum` to account for pinned tabs
Remove obsolete and unused `wstore.DeleteTab`
Only show accelerators for first 9 workspaces in workspace app menu to
be consistent with other keybindings
Fix tabbar spacing to remove min size for drag right spacer, account for
workspace switcher button size
Fix updatebanner size calculations
Moves the wlayout package contents to wcore to prevent import cycles.
Moves the layout calls to other wcore functions instead of being handled
by the services. Removes redundant CreateTab in EnsureInitialData and
adds a isInitialLaunch flag to the CreateTab and CreateWorkspace
functions to ensure that the initial tab is pinned and does not have the
initial tab layout (since the starter layout gets applied later)
Adds a new app menu for creating a new workspace or switching to an
existing one. This required adding a new WPS event any time a workspace
gets updated, since the Electron app menus are static.
This also fixes a bug where closing a workspace could delete it if it
didn't have both a pinned and an unpinned tab.
implements `wsh run` command. lots of fixes (and new options) for command blocks. cleans up the UX/UI for command blocks. lots of bug fixes for blockcontrollers. other minor bug fixes.
also makes editor:* vars into settings override atoms.
![image](https://github.com/user-attachments/assets/a4072368-b204-4eed-bb65-8e3884687f9a)
This functions very similarly to VSCode's pinned tab feature. To pin a
tab, you can right-click on it and select "Pin tab" from the context
menu. Once pinned, a tab will be fixed to the left-most edge of the tab
bar, in order of pinning. Pinned tabs can be dragged around like any
others. If you drag an unpinned tab into the pinned tabs section (any
index less than the highest-index pinned tab), it will be pinned. If you
drag a pinned tab out of the pinned tab section, it will be unpinned.
Pinned tabs' close button is replaced with a persistent pin button,
which can be clicked to unpin them. This adds an extra barrier to
accidentally closing a pinned tab. They can still be closed from the
context menu.
When a tab was being deleted, for instance, the last block that got
deleted would cascade to delete its parent tab, even though the
`DeleteTab` function was already going to do this. This would produce DB
collisions that would put the app into a bad state. Now we pass a
`recursive` flag that is used to determine whether to perform the
recursive close of the parents.
Also updates `DeleteWorkspace` so that named workspaces will always be
deleted if they're empty, even if `force` is false
Updates `DeleteBlock` to close its parent tab if the tab has no more
blocks. This will also cascade to close the workspace if it no longer
has any tabs, same for window.
I had to move some block-related functionality around on the backend.
This fixes a bug where closing the active tab would clean up the closed
tab view before switching to an un-closed tab view, putting the window
into an unrecoverable state. This also moves around some of the CloseTab
logic so that it's more standardized and reduces unnecessary
frontend-backend comms and DB writes
There was a bug in main-server where we were returning Window from
EnsureInitialData and then overwriting the layout on the active tab. The
return values from this function are unclear. Some of the initial data
was being set in the wcore.EnsureInitialData and some was being set in
main, so I've moved all the logic into EnsureInitialData and now it just
returns error.
This migrates all remaining eventbus events sent over the websocket to
use the wps interface. WPS is more flexible for registering events and
callbacks and provides support for more reliable unsubscribes and
resubscribes.
- Adds connection buttons for previews
- Makes it possible for graphs and previews to connect on backend
(without a terminal open to connection)
- Changes the wsh install message