Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

Commit 0eb2b06

Browse files
committed
swap loop icon for animated arrow-clockwise
1 parent 92c2a07 commit 0eb2b06

8 files changed

Lines changed: 37 additions & 22 deletions

File tree

packages/ui/src/features/canvas/components/ChannelNav.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {
22
BellIcon,
33
EnvelopeSimple,
44
Lightning,
5-
RepeatIcon,
65
SlidersHorizontal,
76
} from "@phosphor-icons/react";
87
import {
@@ -31,6 +30,7 @@ import { useFeatureFlag } from "@posthog/ui/features/feature-flags/useFeatureFla
3130
import { useInboxAllReports } from "@posthog/ui/features/inbox/hooks/useInboxAllReports";
3231
import { openSettings } from "@posthog/ui/features/settings/hooks/useOpenSettings";
3332
import { CountBadge } from "@posthog/ui/primitives/CountBadge";
33+
import { LoopIcon } from "@posthog/ui/primitives/LoopIcon";
3434
import {
3535
navigateToActivity,
3636
navigateToInbox,
@@ -76,7 +76,7 @@ function NavIcon({
7676
aria-label={label}
7777
data-selected={isActive || undefined}
7878
onClick={onClick}
79-
className="relative shrink-0 text-muted-foreground data-selected:bg-fill-selected data-selected:text-foreground"
79+
className="group relative shrink-0 text-muted-foreground data-selected:bg-fill-selected data-selected:text-foreground"
8080
>
8181
{icon}
8282
{badge}
@@ -237,7 +237,7 @@ export function ChannelNav() {
237237
{loopsEnabled ? (
238238
<NavIcon
239239
icon={
240-
<RepeatIcon
240+
<LoopIcon
241241
size={16}
242242
weight={view.type === "loops" ? "fill" : "regular"}
243243
/>

packages/ui/src/features/canvas/components/channelPages.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import {
22
BookOpenTextIcon,
33
ChatsCircleIcon,
44
ClockCounterClockwiseIcon,
5-
type Icon,
5+
type IconProps,
66
PackageIcon,
7-
RepeatIcon,
87
ShapesIcon,
98
} from "@phosphor-icons/react";
10-
import type { ReactNode } from "react";
9+
import { LoopIcon } from "@posthog/ui/primitives/LoopIcon";
10+
import type { ComponentType, ReactNode } from "react";
1111

1212
/**
1313
* The pages inside a space, and how each one is named and drawn. One table so
@@ -30,11 +30,11 @@ export type ChannelPageKey =
3030

3131
export const CHANNEL_PAGES: Record<
3232
ChannelPageKey,
33-
{ label: string; Icon: Icon }
33+
{ label: string; Icon: ComponentType<IconProps> }
3434
> = {
3535
home: { label: "Feed", Icon: ChatsCircleIcon },
3636
context: { label: "Context", Icon: BookOpenTextIcon },
37-
loops: { label: "Loops", Icon: RepeatIcon },
37+
loops: { label: "Loops", Icon: LoopIcon },
3838
artifacts: { label: "Artifacts", Icon: PackageIcon },
3939
canvases: { label: "Canvases", Icon: ShapesIcon },
4040
history: { label: "Recents", Icon: ClockCounterClockwiseIcon },

packages/ui/src/features/command/CommandMenu.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
CaretRightIcon,
44
ChartLine,
55
EnvelopeSimple,
6-
RepeatIcon,
76
} from "@phosphor-icons/react";
87
import { workspaceIdSet } from "@posthog/core/command-center/eligibility";
98
import { resolveService } from "@posthog/di/container";
@@ -55,6 +54,7 @@ import { useSidebarStore } from "@posthog/ui/features/sidebar/sidebarStore";
5554
import { useTaskPrStatus } from "@posthog/ui/features/sidebar/useTaskPrStatus";
5655
import { useTasks } from "@posthog/ui/features/tasks/useTasks";
5756
import { useWorkspaces } from "@posthog/ui/features/workspace/useWorkspace";
57+
import { LoopIcon } from "@posthog/ui/primitives/LoopIcon";
5858
import {
5959
goBackInHistory,
6060
goForwardInHistory,
@@ -289,7 +289,7 @@ export function CommandMenu({ open, onOpenChange }: CommandMenuProps) {
289289
id: "loops",
290290
label: "Loops",
291291
keywords: "automations schedules recurring",
292-
icon: <RepeatIcon size={12} className="text-gray-11" />,
292+
icon: <LoopIcon size={12} className="text-gray-11" />,
293293
action: "open-loops" as CommandMenuAction,
294294
onRun: () => {
295295
closeSettingsDialog();
@@ -628,7 +628,7 @@ export function CommandMenu({ open, onOpenChange }: CommandMenuProps) {
628628
// fill the row (so a trailing shortcut can `ml-auto` to the
629629
// end) and let it overflow visibly so the shortcut Kbd
630630
// boxes aren't clipped by the wrapper's `truncate`.
631-
className="flex h-auto! min-h-7 w-full items-center gap-2 py-1.5 pr-2 text-left [&>span]:w-full [&>span]:overflow-visible"
631+
className="group flex h-auto! min-h-7 w-full items-center gap-2 py-1.5 pr-2 text-left [&>span]:w-full [&>span]:overflow-visible"
632632
>
633633
{cmd.icon}
634634
<span className="wrap-break-word min-w-0 whitespace-normal">

packages/ui/src/features/loops/components/LoopHeaderTitle.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { RepeatIcon } from "@phosphor-icons/react";
1+
import { LoopIcon } from "@posthog/ui/primitives/LoopIcon";
22
import { Flex, Text } from "@radix-ui/themes";
33

44
/**
@@ -10,8 +10,8 @@ import { Flex, Text } from "@radix-ui/themes";
1010
*/
1111
export function LoopHeaderTitle({ label }: { label: string }) {
1212
return (
13-
<Flex align="center" gap="2" className="w-full min-w-0">
14-
<RepeatIcon size={12} className="shrink-0 text-gray-10" />
13+
<Flex align="center" gap="2" className="group w-full min-w-0">
14+
<LoopIcon size={12} className="shrink-0 text-gray-10" />
1515
<Text
1616
className="truncate whitespace-nowrap font-medium text-[13px]"
1717
title={label}

packages/ui/src/features/loops/components/LoopRow.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { CaretRightIcon, RepeatIcon } from "@phosphor-icons/react";
1+
import { CaretRightIcon } from "@phosphor-icons/react";
22
import type { LoopSchemas } from "@posthog/api-client/loops";
33
import { formatRelativeTimeLong } from "@posthog/shared";
44
import type { UserBasic } from "@posthog/shared/domain-types";
55
import { userDisplayName } from "@posthog/ui/features/canvas/utils/userDisplay";
66
import { Badge } from "@posthog/ui/primitives/Badge";
7+
import { LoopIcon } from "@posthog/ui/primitives/LoopIcon";
78
import { Flex, Text } from "@radix-ui/themes";
89
import { Link } from "@tanstack/react-router";
910
import {
@@ -62,10 +63,10 @@ export function LoopRow({
6263
to="/code/loops/$loopId"
6364
params={{ loopId: loop.id }}
6465
state={{ loopListOrigin: true }}
65-
className="flex items-center justify-between gap-3 rounded-(--radius-2) border border-border bg-(--color-panel-solid) px-4 py-3.5 no-underline transition-colors duration-150 hover:border-(--gray-6) hover:bg-(--gray-2)"
66+
className="group flex items-center justify-between gap-3 rounded-(--radius-2) border border-border bg-(--color-panel-solid) px-4 py-3.5 no-underline transition-colors duration-150 hover:border-(--gray-6) hover:bg-(--gray-2)"
6667
>
6768
<Flex align="center" gap="3" className="min-w-0">
68-
<RepeatIcon size={20} className="shrink-0 text-gray-11" />
69+
<LoopIcon size={20} className="shrink-0 text-gray-11" />
6970
<Flex direction="column" gap="1" className="min-w-0">
7071
<Flex align="center" gap="2" className="min-w-0">
7172
<Text className="truncate font-medium text-[13px] text-gray-12">

packages/ui/src/features/sidebar/components/CustomizeSidebarDialog.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
DotsSixVertical,
66
EnvelopeSimple,
77
Lightning,
8-
RepeatIcon,
98
SlidersHorizontal,
109
} from "@phosphor-icons/react";
1110
import { LOOPS_FLAG, PROJECT_BLUEBIRD_FLAG } from "@posthog/shared";
@@ -20,6 +19,7 @@ import {
2019
orderedNavItems,
2120
} from "@posthog/ui/features/sidebar/constants";
2221
import { useSidebarStore } from "@posthog/ui/features/sidebar/sidebarStore";
22+
import { LoopIcon } from "@posthog/ui/primitives/LoopIcon";
2323
import { track } from "@posthog/ui/shell/analytics";
2424
import { Button, Checkbox, Flex, Text } from "@radix-ui/themes";
2525
import { type RefCallback, useRef, useState } from "react";
@@ -32,7 +32,7 @@ const ITEM_ICONS: Record<
3232
"command-center": Lightning,
3333
activity: Bell,
3434
configure: SlidersHorizontal,
35-
loops: RepeatIcon,
35+
loops: LoopIcon,
3636
};
3737

3838
function sameOrder(
@@ -195,7 +195,7 @@ function SortableNavItemRow({
195195
<DotsSixVertical size={14} />
196196
</button>
197197
<Text as="label" size="2" className="flex-1">
198-
<Flex gap="2" align="center">
198+
<Flex gap="2" align="center" className="group">
199199
<Checkbox
200200
checked={visible}
201201
onCheckedChange={(checked) => onVisibleChange(checked === true)}

packages/ui/src/features/sidebar/components/items/LoopsItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { RepeatIcon } from "@phosphor-icons/react";
21
import { Badge } from "@posthog/quill";
2+
import { LoopIcon } from "@posthog/ui/primitives/LoopIcon";
33
import { SidebarItem } from "../SidebarItem";
44

55
interface LoopsItemProps {
@@ -12,7 +12,7 @@ export function LoopsItem({ isActive, onClick, depth = 0 }: LoopsItemProps) {
1212
return (
1313
<SidebarItem
1414
depth={depth}
15-
icon={<RepeatIcon size={16} weight={isActive ? "fill" : "regular"} />}
15+
icon={<LoopIcon size={16} weight={isActive ? "fill" : "regular"} />}
1616
label="Loops"
1717
badge={<Badge variant="info">Alpha</Badge>}
1818
isActive={isActive}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { ArrowClockwiseIcon, type IconProps } from "@phosphor-icons/react";
2+
import { cn } from "@posthog/quill";
3+
4+
export function LoopIcon({ className, ...props }: IconProps) {
5+
return (
6+
<ArrowClockwiseIcon
7+
{...props}
8+
className={cn(
9+
"transition-transform duration-800 ease-[cubic-bezier(0.22,1,0.36,1)] motion-safe:group-hover:rotate-360 motion-safe:hover:rotate-360",
10+
className,
11+
)}
12+
/>
13+
);
14+
}

0 commit comments

Comments
 (0)