-
Notifications
You must be signed in to change notification settings - Fork 23
Bento onboarding splash screen #2125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
42a3e55
feat(onboarding): Bento box intro
Twixes a1db683
Hide placeholder label
Twixes 2d71648
Update apps/code/src/renderer/features/onboarding/components/FeatureB…
Twixes 71832ec
Update apps/code/src/renderer/features/onboarding/components/FeatureB…
Twixes 4179a18
feat(onboarding): lead bento with product data context, signals inbox…
jonathanlab f7fdb47
chore: fix useSortedClasses lint on FeatureBentoCard
jonathanlab 6a58f17
fix(onboarding): hide bento grid scrollbar during entrance animation
jonathanlab File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
96 changes: 96 additions & 0 deletions
96
apps/code/src/renderer/features/onboarding/components/FeatureBentoCard.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| .feature-bento-card { | ||
| position: relative; | ||
| display: flex; | ||
| flex-direction: column; | ||
| padding: 10px; | ||
| border-radius: var(--radius-4); | ||
| border: 1px solid var(--gray-a4); | ||
| background: var(--color-panel-solid); | ||
| transition: | ||
| border-color 0.25s ease, | ||
| transform 0.25s ease, | ||
| box-shadow 0.25s ease; | ||
| overflow: hidden; | ||
| cursor: default; | ||
| user-select: none; | ||
| } | ||
|
|
||
| .feature-bento-card:hover, | ||
| .feature-bento-card--active { | ||
| border-color: var(--accent-a7); | ||
| transform: translateY(-2px); | ||
| box-shadow: | ||
| 0 1px 0 0 var(--gray-a3) inset, | ||
| 0 8px 24px -12px var(--accent-a4); | ||
| } | ||
|
|
||
| .feature-bento-card__placeholder { | ||
| position: relative; | ||
| flex: 1 1 0; | ||
| min-height: 0; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| border-radius: var(--radius-3); | ||
| border: 1px dashed var(--gray-a5); | ||
| background: | ||
| radial-gradient(120% 80% at 50% 0%, var(--accent-a2) 0%, transparent 60%), | ||
| linear-gradient(180deg, var(--gray-2) 0%, var(--gray-3) 100%); | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| .feature-bento-card__placeholder-grid { | ||
| position: absolute; | ||
| inset: 0; | ||
| background-image: | ||
| linear-gradient(to right, var(--gray-a3) 1px, transparent 1px), | ||
| linear-gradient(to bottom, var(--gray-a3) 1px, transparent 1px); | ||
| background-size: 16px 16px; | ||
| background-position: -1px -1px; | ||
| mask-image: radial-gradient(120% 80% at 50% 50%, black 30%, transparent 80%); | ||
| opacity: 0.5; | ||
| transition: opacity 0.1s ease; | ||
| } | ||
|
|
||
| .feature-bento-card__placeholder-glow { | ||
| position: absolute; | ||
| inset: -20%; | ||
| background: radial-gradient(closest-side, var(--accent-a3), transparent 70%); | ||
| opacity: 0; | ||
| transition: opacity 0.1s ease; | ||
| pointer-events: none; | ||
| } | ||
|
|
||
| .feature-bento-card:hover .feature-bento-card__placeholder-glow, | ||
| .feature-bento-card--active .feature-bento-card__placeholder-glow { | ||
| opacity: 1; | ||
| } | ||
|
|
||
| .feature-bento-card:hover .feature-bento-card__placeholder-grid, | ||
| .feature-bento-card--active .feature-bento-card__placeholder-grid { | ||
| opacity: 0.8; | ||
| } | ||
|
|
||
| .feature-bento-card__icon { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| width: 36px; | ||
| height: 36px; | ||
| border-radius: var(--radius-3); | ||
| background: var(--color-panel-solid); | ||
| border: 1px solid var(--gray-a5); | ||
| color: var(--gray-12); | ||
| box-shadow: 0 1px 0 0 var(--gray-a3) inset; | ||
| transition: | ||
| transform 0.1s ease, | ||
| border-color 0.1s ease, | ||
| color 0.1s ease; | ||
| } | ||
|
|
||
| .feature-bento-card:hover .feature-bento-card__icon, | ||
| .feature-bento-card--active .feature-bento-card__icon { | ||
| transform: scale(1.05); | ||
| border-color: var(--accent-a7); | ||
| color: var(--accent-11); | ||
| } |
68 changes: 68 additions & 0 deletions
68
apps/code/src/renderer/features/onboarding/components/FeatureBentoCard.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| import { Flex, Text } from "@radix-ui/themes"; | ||
| import { motion } from "framer-motion"; | ||
| import type { ReactNode } from "react"; | ||
| import "./FeatureBentoCard.css"; | ||
|
|
||
| interface FeatureBentoCardProps { | ||
| icon: ReactNode; | ||
| title: string; | ||
| description: string; | ||
| active?: boolean; | ||
| index?: number; | ||
| /** Tailwind classes controlling the cell's grid placement (e.g. "col-span-4 row-span-2"). */ | ||
| className?: string; | ||
| onMouseEnter?: () => void; | ||
| onMouseLeave?: () => void; | ||
| } | ||
|
|
||
| export function FeatureBentoCard({ | ||
| icon, | ||
| title, | ||
| description, | ||
| active = false, | ||
| index = 0, | ||
| className = "", | ||
| onMouseEnter, | ||
| onMouseLeave, | ||
| }: FeatureBentoCardProps) { | ||
| return ( | ||
| <motion.div | ||
| initial={{ opacity: 0, y: 12 }} | ||
| animate={{ opacity: 1, y: 0 }} | ||
| transition={{ duration: 0.3, delay: index * 0.08 }} | ||
| onMouseEnter={onMouseEnter} | ||
| onMouseLeave={onMouseLeave} | ||
| className={`feature-bento-card ${active ? "feature-bento-card--active" : ""} ${className}`} | ||
| > | ||
| <div className="feature-bento-card__placeholder"> | ||
| <div | ||
| className="feature-bento-card__placeholder-grid" | ||
| aria-hidden="true" | ||
| /> | ||
| <div | ||
| className="feature-bento-card__placeholder-glow" | ||
| aria-hidden="true" | ||
| /> | ||
| <Flex | ||
| align="center" | ||
| justify="center" | ||
| className="relative z-10 text-(--gray-9)" | ||
| > | ||
| <div className="feature-bento-card__icon">{icon}</div> | ||
| </Flex> | ||
| </div> | ||
| <Flex | ||
| direction="column" | ||
| gap="1" | ||
| className="feature-bento-card__content shrink-0 px-1 pt-3 pb-1" | ||
| > | ||
| <Text className="font-medium text-(--gray-12) text-sm leading-snug"> | ||
| {title} | ||
| </Text> | ||
| <Text className="text-(--gray-11) text-[12px] leading-snug"> | ||
| {description} | ||
| </Text> | ||
| </Flex> | ||
| </motion.div> | ||
| ); | ||
| } | ||
16 changes: 0 additions & 16 deletions
16
apps/code/src/renderer/features/onboarding/components/FeatureListItem.css
This file was deleted.
Oops, something went wrong.
63 changes: 0 additions & 63 deletions
63
apps/code/src/renderer/features/onboarding/components/FeatureListItem.tsx
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.