Skip to content

Commit 072a6d8

Browse files
committed
Finish mobile menu
1 parent f365421 commit 072a6d8

File tree

6 files changed

+345
-51
lines changed

6 files changed

+345
-51
lines changed

site/src/components/DropdownMenu/DropdownMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export const DropdownMenuSeparator = forwardRef<
198198
>(({ className, ...props }, ref) => (
199199
<DropdownMenuPrimitive.Separator
200200
ref={ref}
201-
className={cn(["-mx-1 my-1 h-px bg-border"], className)}
201+
className={cn(["-mx-1 my-3 h-px bg-border"], className)}
202202
{...props}
203203
/>
204204
));

site/src/contexts/ProxyContext.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import {
1515
import { useQuery } from "react-query";
1616
import { type ProxyLatencyReport, useProxyLatency } from "./useProxyLatency";
1717

18+
export type Proxies = readonly Region[] | readonly WorkspaceProxy[];
19+
export type ProxyLatencies = Record<string, ProxyLatencyReport>;
1820
export interface ProxyContextValue {
1921
// proxy is **always** the workspace proxy that should be used.
2022
// The 'proxy.selectedProxy' field is the proxy being used and comes from either:
@@ -43,15 +45,15 @@ export interface ProxyContextValue {
4345
// WorkspaceProxy[] is returned if the user is an admin. WorkspaceProxy extends Region with
4446
// more information about the proxy and the status. More information includes the error message if
4547
// the proxy is unhealthy.
46-
proxies?: readonly Region[] | readonly WorkspaceProxy[];
48+
proxies?: Proxies;
4749
// isFetched is true when the 'proxies' api call is complete.
4850
isFetched: boolean;
4951
isLoading: boolean;
5052
error?: unknown;
5153
// proxyLatencies is a map of proxy id to latency report. If the proxyLatencies[proxy.id] is undefined
5254
// then the latency has not been fetched yet. Calculations happen async for each proxy in the list.
5355
// Refer to the returned report for a given proxy for more information.
54-
proxyLatencies: Record<string, ProxyLatencyReport>;
56+
proxyLatencies: ProxyLatencies;
5557
// refetchProxyLatencies will trigger refreshing of the proxy latencies. By default the latencies
5658
// are loaded once.
5759
refetchProxyLatencies: () => Date;

site/src/index.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,10 @@
7070
* {
7171
@apply border-border;
7272
}
73+
74+
/** Related to https://github.com/radix-ui/primitives/issues/3251 */
75+
html body[data-scroll-locked] {
76+
--removed-body-scroll-bar-size: 0 !important;
77+
margin-right: 0 !important;
78+
}
7379
}

0 commit comments

Comments
 (0)