Skip to content

Commit 2b82e39

Browse files
feat(studio): make edit with framey stand out in the header (heygen-com#5019)
Wenbo's feedback: the button read like the ghost controls beside it. It now wears an accent tint and border, a larger Framey and a permanent New badge, and pulses three times as Studio opens (none under reduced motion).
1 parent dcc7210 commit 2b82e39

2 files changed

Lines changed: 23 additions & 4 deletions

File tree

‎packages/studio/src/components/OpenInDesktopButton.tsx‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,15 @@ export function OpenInDesktopButton() {
119119
data-testid="header-open-in-desktop"
120120
data-opening={opening || undefined}
121121
title="Open this project in the HyperFrames desktop app and edit it with Framey"
122-
className="hf-framey-trigger gap-1.5 pl-1.5"
123-
icon={<FrameyGlyph size={20} className="hf-framey" eyeRef={eye} />}
122+
className="hf-framey-trigger gap-1.5 border border-accent/40 bg-accent/10 pl-1 font-semibold text-text-0 enabled:hover:bg-accent/20"
123+
icon={<FrameyGlyph size={24} className="hf-framey" eyeRef={eye} />}
124124
>
125125
{opening ? "Opening in the app…" : "Edit with Framey"}
126+
{!opening && (
127+
<span className="rounded-full bg-accent px-1.5 text-[10px] leading-4 font-bold text-on-accent">
128+
New
129+
</span>
130+
)}
126131
</Button>
127132
}
128133
>

‎packages/studio/src/styles/components.css‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -952,8 +952,8 @@
952952
}
953953
}
954954

955-
/* Framey on the header's "Edit with Framey" (OpenInDesktopButton.tsx): a wiggle on hover, a flight towards
956-
* the app while it opens. The eye follows the pointer from script. */
955+
/* Framey on the header's "Edit with Framey" (OpenInDesktopButton.tsx): a pulse as the page opens, a wiggle
956+
* on hover, a flight towards the app while it opens. The eye follows the pointer from script. */
957957
@keyframes hf-framey-wiggle {
958958
0%,
959959
100% {
@@ -977,6 +977,19 @@
977977
}
978978
}
979979

980+
@keyframes hf-framey-pulse {
981+
0% {
982+
box-shadow: 0 0 0 0 color-mix(in oklch, var(--color-accent) 45%, transparent);
983+
}
984+
100% {
985+
box-shadow: 0 0 0 8px transparent;
986+
}
987+
}
988+
989+
.hf-framey-trigger {
990+
animation: hf-framey-pulse 1.6s ease-out 3;
991+
}
992+
980993
.hf-framey {
981994
transform-origin: 30% 30%;
982995
}
@@ -994,6 +1007,7 @@
9941007
}
9951008

9961009
@media (prefers-reduced-motion: reduce) {
1010+
.hf-framey-trigger,
9971011
.hf-framey-trigger:hover .hf-framey,
9981012
.hf-framey-trigger[data-opening] .hf-framey {
9991013
animation: none;

0 commit comments

Comments
 (0)