Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ export const PERSISTED_KEY_REGISTRY: ReadonlyArray<
"src/renderer/routes/_authenticated/_dashboard/pull-requests/stores/pullRequestsFilterStore/pullRequestsFilterStore.ts",
["pull-requests-filter-state"],
],
[
"src/renderer/routes/_authenticated/_dashboard/pull-requests/stores/pullRequestsSplitViewStore/pullRequestsSplitViewStore.ts",
["pull-requests-split-view-state"],
],
[
"src/renderer/components/PostHogUserIdentifier/PostHogUserIdentifier.tsx",
["active_organization_id"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export function DashboardSidebarHeader({
authorFilter: lastPullRequestsAuthorFilter,
reviewFilter: lastPullRequestsReviewFilter,
includeClosed: lastPullRequestsIncludeClosed,
mergedOnly: lastPullRequestsMergedOnly,
} = usePullRequestsFilterStore();

const handleWorkspacesClick = () => {
Expand Down Expand Up @@ -185,6 +186,7 @@ export function DashboardSidebarHeader({
authorFilter: lastPullRequestsAuthorFilter,
reviewFilter: lastPullRequestsReviewFilter,
includeClosed: lastPullRequestsIncludeClosed,
mergedOnly: lastPullRequestsMergedOnly,
}),
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
CommandList,
} from "@superset/ui/command";
import { Popover, PopoverContent, PopoverTrigger } from "@superset/ui/popover";
import { cn } from "@superset/ui/utils";
import { useMemo, useState } from "react";
import {
HiCheck,
Expand All @@ -22,9 +23,17 @@ import { ProjectThumbnail } from "renderer/routes/_authenticated/components/Proj
interface ProjectFilterProps {
value: string[];
onChange: (value: string[]) => void;
/** Shows the label text regardless of container width — the default
* `@4xl:inline` gating assumes a wide inline toolbar row, which doesn't
* apply inside a narrow popover. */
alwaysShowLabel?: boolean;
}

export function ProjectFilter({ value, onChange }: ProjectFilterProps) {
export function ProjectFilter({
value,
onChange,
alwaysShowLabel,
}: ProjectFilterProps) {
const [open, setOpen] = useState(false);
const [search, setSearch] = useState("");

Expand Down Expand Up @@ -97,7 +106,12 @@ export function ProjectFilter({ value, onChange }: ProjectFilterProps) {
) : (
<HiOutlineFolder className="size-4" />
)}
<span className="hidden max-w-32 truncate text-sm @4xl:inline @6xl:max-w-48">
<span
className={cn(
"max-w-32 truncate text-sm @6xl:max-w-48",
alwaysShowLabel ? "inline" : "hidden @4xl:inline",
)}
>
{label}
</span>
<HiChevronDown className="size-3" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { cn } from "@superset/ui/utils";
import { useMatchRoute, useParams } from "@tanstack/react-router";
import { HiOutlineWifi } from "react-icons/hi2";
import { ZoomStable } from "renderer/components/ZoomStable";
Expand Down Expand Up @@ -34,6 +35,8 @@ export function TopBar() {
const isV2CloudEnabled = useIsV2CloudEnabled();
const isSidebarOpen = useWorkspaceSidebarStore((s) => s.isOpen);
const isSidebarCollapsed = useWorkspaceSidebarStore((s) => s.isCollapsed());
const isPullRequestsRoute =
matchRoute({ to: "/pull-requests", fuzzy: true }) !== false;
// Default to Mac layout while loading to avoid overlap with traffic lights
const isMac = platform === undefined || platform === "darwin";
// In v2 the expanded sidebar lives outside the TopBar column, so the TopBar
Expand All @@ -55,7 +58,12 @@ export function TopBar() {
// spacer + title filler), never on this container: `no-drag` carve-outs
// under a `drag` ancestor are lost inside zoomed/masked/scrollable
// wrappers, which makes the whole bar swallow clicks.
className="gap-2 h-12 w-full flex items-center justify-between bg-muted/45 relative dark:bg-muted/35"
className={cn(
"gap-2 h-12 w-full flex items-center justify-between relative dark:bg-muted/35",
isPullRequestsRoute && isSidebarCollapsed
? "bg-sidebar"
: "bg-muted/45",
)}
style={barStyle}
>
<div className="flex items-center h-full">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Input } from "@superset/ui/input";
import { cn } from "@superset/ui/utils";
import { useRef } from "react";
import { HiOutlineMagnifyingGlass } from "react-icons/hi2";
import { useHotkey } from "renderer/hotkeys";
Expand All @@ -8,13 +9,15 @@ interface WorkItemsSearchProps {
onChange: (value: string) => void;
placeholder: string;
label: string;
className?: string;
}

export function WorkItemsSearch({
value,
onChange,
placeholder,
label,
className,
}: WorkItemsSearchProps) {
const inputRef = useRef<HTMLInputElement>(null);

Expand Down Expand Up @@ -45,7 +48,10 @@ export function WorkItemsSearch({
inputRef.current?.blur();
}
}}
className="h-8 border-0 bg-muted/50 pl-9 pr-3 text-sm focus-visible:ring-1"
className={cn(
"h-8 border-0 bg-muted/50 pl-9 pr-3 text-sm focus-visible:ring-1",
className,
)}
/>
</div>
);
Expand Down
Loading
Loading