Skip to content

Commit dc5baee

Browse files
committed
Merge remote-tracking branch 'origin/main' into sig/inbox-keyboard-nav
# Conflicts: # apps/code/src/renderer/features/inbox/components/InboxSignalsTab.tsx
2 parents 29a5f56 + 17f783b commit dc5baee

File tree

15 files changed

+807
-247
lines changed

15 files changed

+807
-247
lines changed

apps/code/src/renderer/api/posthogClient.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,9 @@ export class PostHogAPIClient {
953953
if (params?.ordering) {
954954
url.searchParams.set("ordering", params.ordering);
955955
}
956+
if (params?.source_product) {
957+
url.searchParams.set("source_product", params.source_product);
958+
}
956959

957960
const response = await this.api.fetcher.fetch({
958961
method: "get",

apps/code/src/renderer/constants/keyboard-shortcuts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const SHORTCUTS = {
1818
COPY_PATH: "mod+shift+c",
1919
TOGGLE_FOCUS: "mod+r",
2020
PASTE_AS_FILE: "mod+shift+v",
21-
INBOX: "mod+shift+i",
21+
INBOX: "mod+i",
2222
BLUR: "escape",
2323
SUBMIT_BLUR: "mod+enter",
2424
} as const;

apps/code/src/renderer/features/command-center/components/CommandCenterToolbar.tsx

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,55 @@ import {
1515
useCommandCenterStore,
1616
} from "../stores/commandCenterStore";
1717

18-
const LAYOUT_OPTIONS: { value: LayoutPreset; label: string }[] = [
19-
{ value: "1x1", label: "1x1" },
20-
{ value: "2x1", label: "2x1" },
21-
{ value: "1x2", label: "1x2" },
22-
{ value: "2x2", label: "2x2" },
23-
{ value: "3x2", label: "3x2" },
24-
{ value: "3x3", label: "3x3" },
18+
function LayoutIcon({ cols, rows }: { cols: number; rows: number }) {
19+
const size = 14;
20+
const gap = 1.5;
21+
const cellW = (size - gap * (cols - 1)) / cols;
22+
const cellH = (size - gap * (rows - 1)) / rows;
23+
24+
const rects: React.ReactElement[] = [];
25+
for (let r = 0; r < rows; r++) {
26+
for (let c = 0; c < cols; c++) {
27+
rects.push(
28+
<rect
29+
key={`${r}-${c}`}
30+
x={c * (cellW + gap)}
31+
y={r * (cellH + gap)}
32+
width={cellW}
33+
height={cellH}
34+
rx={1}
35+
fill="currentColor"
36+
opacity={0.5}
37+
/>,
38+
);
39+
}
40+
}
41+
42+
return (
43+
<svg
44+
width={size}
45+
height={size}
46+
viewBox={`0 0 ${size} ${size}`}
47+
role="img"
48+
aria-label={`${cols} by ${rows} grid`}
49+
>
50+
{rects}
51+
</svg>
52+
);
53+
}
54+
55+
const LAYOUT_OPTIONS: {
56+
value: LayoutPreset;
57+
label: string;
58+
cols: number;
59+
rows: number;
60+
}[] = [
61+
{ value: "1x1", label: "1x1", cols: 1, rows: 1 },
62+
{ value: "2x1", label: "2x1", cols: 2, rows: 1 },
63+
{ value: "1x2", label: "1x2", cols: 1, rows: 2 },
64+
{ value: "2x2", label: "2x2", cols: 2, rows: 2 },
65+
{ value: "3x2", label: "3x2", cols: 3, rows: 2 },
66+
{ value: "3x3", label: "3x3", cols: 3, rows: 3 },
2567
];
2668

2769
interface CommandCenterToolbarProps {
@@ -86,7 +128,10 @@ export function CommandCenterToolbar({
86128
<Select.Content>
87129
{LAYOUT_OPTIONS.map((opt) => (
88130
<Select.Item key={opt.value} value={opt.value}>
89-
{opt.label}
131+
<Flex align="center" gap="2">
132+
<LayoutIcon cols={opt.cols} rows={opt.rows} />
133+
{opt.label}
134+
</Flex>
90135
</Select.Item>
91136
))}
92137
</Select.Content>

0 commit comments

Comments
 (0)