We were updating the view's state but missed a `notify`, which caused
the `UniformList` responsible for rendering the saved conversations
to panic when some files were deleted.
Updates all collab sounds, add screen sharing sounds.
Release Notes:
- Improved collaboration sounds for joining and leaving a call, muting
and unmuting the mic.
- Added a sound when you start and stop screen sharing.
Current logic does not need to access inlays by id in O(1), future
dynamic hints would need to know which hint they hover at, but that will
be done using binary search over the position's anchor we hover on;
nothing else seems to need this HashMap in the near future.
Because of that removal, no need to store `InlayId` apart from the
`Inlay`, hence remove the `InlayProperties` struct entirely.
This allows to eliminate a few generics along the way.
Release Notes:
- N/A
Just some theme tidying, renames some things to be more consistent with
our planned naming conventions going forward.
Release Notes:
- N/A (No public facing changes)
We removed the `theme_testbench` crate a while back - It seems like that
was the only thing using the `color_scheme` field in the exported theme.
Removing this from the theme removes something like 42k lines of
generated JSON every time we build the theme (2k lines / 28% of the
total lines per generated theme!)
Release Notes:
- N/A (No public facing changes)
This PR adds a theme store to allow components to directly access the
theme without requiring it to be passed down as props every time it is
used.
So before, you might need to do something like `text(theme, "variant",
"hovered")`, you could now just call `text("variant", "hovered")`.
This also means that style_trees don't need to be called with a theme
either:
```ts
export default function app(): any {
const theme = useTheme()
return {
meta: {
name: theme.name,
is_light: theme.is_light,
},
command_palette: command_palette(),
contact_notification: contact_notification(),
// etc...
}
}
```
We do this by creating a zustand store to store the theme, and allow it
to be accessed with `useThemeStore.getState().theme`.
```ts
import { create } from "zustand"
import { ColorScheme } from "./color_scheme"
type ThemeState = {
theme: ColorScheme | undefined
setTheme: (theme: ColorScheme) => void
}
export const useThemeStore = create<ThemeState>((set) => ({
theme: undefined,
setTheme: (theme) => set(() => ({ theme })),
}))
export const useTheme = (): ColorScheme => {
const { theme } = useThemeStore.getState()
if (!theme) throw new Error("Tried to use theme before it was loaded")
return theme
}
```
Release Notes:
- N/A (No public facing changes)