diff --git a/src/components/ui/Category.tsx b/src/components/ui/Category.tsx index 38980b19f5906a4db78c276c78ae32c2a08057cb..3f76d2846d585b5b5beaabdfe5b3e5d8e793b020 100644 --- a/src/components/ui/Category.tsx +++ b/src/components/ui/Category.tsx @@ -33,7 +33,6 @@ const CategoryBase = styled.div<Pick<Props, 'variant'>>` type Props = Omit<JSX.HTMLAttributes<HTMLDivElement>, 'children' | 'as' | 'action'> & { text: Children; - // TODO: rename from action to prevent type conflicts with the dom action?: () => void; variant?: 'default' | 'uniform'; } diff --git a/src/context/Theme.tsx b/src/context/Theme.tsx index a6764784a159b7b5f93b6794680404496c5fced0..065d6952b12c40a3f557479ba3c8badab5ce63e1 100644 --- a/src/context/Theme.tsx +++ b/src/context/Theme.tsx @@ -31,7 +31,14 @@ export type Variables = | "status-busy" | "status-streaming" | "status-invisible" - | "sidebar-active"; + +// While this isn't used, it'd be good to keep this up to date as a reference or for future use +export type HiddenVariables = + | "font" + | "ligatures" + | "app-height" + | "sidebar-active" + | "monospace-font" export type Fonts = 'Open Sans' | 'Inter' | 'Atkinson Hyperlegible' | 'Roboto' | 'Noto Sans' | 'Lato' | 'Bree Serif' | 'Montserrat' | 'Poppins' | 'Raleway' | 'Ubuntu' | 'Comic Neue'; export type MonoscapeFonts = 'Fira Code' | 'Roboto Mono' | 'Source Code Pro' | 'Space Mono' | 'Ubuntu Mono'; @@ -215,8 +222,7 @@ export const PRESETS: Record<string, Theme> = { "status-away": "#F39F00", "status-busy": "#F84848", "status-streaming": "#977EFF", - "status-invisible": "#A5A5A5", - "sidebar-active": "var(--secondary-background)" + "status-invisible": "#A5A5A5" }, dark: { light: false, @@ -243,8 +249,7 @@ export const PRESETS: Record<string, Theme> = { "status-away": "#F39F00", "status-busy": "#F84848", "status-streaming": "#977EFF", - "status-invisible": "#A5A5A5", - "sidebar-active": "var(--secondary-background)" + "status-invisible": "#A5A5A5" }, }; diff --git a/src/context/Voice.tsx b/src/context/Voice.tsx index 2f6fedf6049110512370d94d226b2aa84c544043..6190c363d31c14909d7032f418fe27ba23b8e05b 100644 --- a/src/context/Voice.tsx +++ b/src/context/Voice.tsx @@ -33,8 +33,7 @@ export interface VoiceState { participants?: Readonly<Map<string, VoiceUser>>; } -// [bree] TODO: I feel like these should be typechecked anyways but whatever, -// I'm asserting that they aren't null because they get used near immedietly from what I can tell +// They should be present from first render. - insert's words export const VoiceContext = createContext<VoiceState>(null!); export const VoiceOperationsContext = createContext<VoiceOperations>(null!); diff --git a/src/context/intermediate/modals/Input.tsx b/src/context/intermediate/modals/Input.tsx index ec4c9de7e16dfca23c4752297250e9cb2382c6dd..d57ba8d81539a2a80e4e63217b5b0e572bc49e64 100644 --- a/src/context/intermediate/modals/Input.tsx +++ b/src/context/intermediate/modals/Input.tsx @@ -119,9 +119,8 @@ export function SpecialInputModal(props: SpecialProps) { question={<Text id="app.settings.permissions.create_role" />} field={<Text id="app.settings.permissions.role_name" />} callback={async name => { - // bree: this returns void, dunno why props.callback was being called const role = await client.servers.createRole(props.server, name); - // props.callback(role.id); + props.callback(role.id); }} />; } diff --git a/src/context/revoltjs/RevoltClient.tsx b/src/context/revoltjs/RevoltClient.tsx index 99ad0ebd73f079aeea44585b1b70425f39c2b3bc..a975c101e85dffbde75601c92f0bbb8455ff7fde 100644 --- a/src/context/revoltjs/RevoltClient.tsx +++ b/src/context/revoltjs/RevoltClient.tsx @@ -34,7 +34,9 @@ export interface ClientOperations { openDM: (user_id: string) => Promise<string>; } -// TODO: remove temporary non-null assertions and properly typecheck these as they aren't always immedietely initialized +// By the time they are used, they should all be initialized. +// Currently the app does not render until a client is built and the other two are always initialized on first render. +// - insert's words export const AppContext = createContext<Client>(null!); export const StatusContext = createContext<ClientStatus>(null!); export const OperationsContext = createContext<ClientOperations>(null!); @@ -94,7 +96,7 @@ function Context({ auth, children, dispatcher }: Props) { const login = () => dispatcher({ type: "LOGIN", - session: client.session! // TODO: verify that this null assertion is correct + session: client.session! // This [null assertion] is ok, we should have a session by now. - insert's words }); if (onboarding) {