Repository navigation
설문 응답 UX 및 결과 화면 개선 #8
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
6 commits
Select commit
Hold shift + click to select a range
91e4f04
feat: polish survey UX with required marks, analyzing step, and fortu…
yolophg 47edd88
feat: preview dev type and fortune on survey intro and simplify copy
yolophg 978d8c1
feat: add save step, meaning line, and star motion to analyzing screen
yolophg 56e8f93
fix: save done flag before analyzing delay and unify fortune name
yolophg 6a36501
Merge remote-tracking branch 'origin/main' into feat/survey-ux-polish
yolophg e584e2f
fix: apply final review on turnstile retry, reduced motion, and share…
yolophg 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
There are no files selected for viewing
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 |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ status: draft | |
|
|
||
| sections: | ||
| - id: about | ||
| title: 나에 대해 | ||
| title: 기본 정보 | ||
| questions: | ||
| - id: status | ||
| fixed: true | ||
|
|
||
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
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
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,60 @@ | ||
| import { Icon } from 'daleui' | ||
| import { useState } from 'react' | ||
|
|
||
| // 유형 결과가 처음 나올 때 한 번 터지는 별. 모션 줄이기 설정에서는 숨긴다. | ||
| const COUNT = 28 | ||
| const TONES = ['brand', 'warning', 'info'] as const | ||
|
|
||
| export function StarBurst() { | ||
| // 제출한 뒤 브라우저에서만 그려지므로 Math.random 이 하이드레이션과 어긋나지 않는다 | ||
| const [stars] = useState(() => | ||
| Array.from({ length: COUNT }, (_, i) => { | ||
| const angle = (i / COUNT) * Math.PI * 2 + Math.random() * 0.4 | ||
| const dist = 140 + Math.random() * 220 | ||
| return { | ||
| x: Math.cos(angle) * dist, | ||
| y: Math.sin(angle) * dist * 0.7 - 60, | ||
| r: (Math.random() - 0.5) * 540, | ||
| delay: Math.random() * 150, | ||
| tone: TONES[i % TONES.length], | ||
| size: Math.random() < 0.3 ? ('md' as const) : ('sm' as const), | ||
| } | ||
| }), | ||
| ) | ||
| return ( | ||
| <div | ||
| aria-hidden | ||
| className="star-burst" | ||
| style={{ position: 'fixed', left: '50%', top: '40%', width: 0, height: 0, pointerEvents: 'none', zIndex: 10 }} | ||
| > | ||
| <style>{` | ||
| @keyframes star-burst { | ||
| 0% { transform: translate(-50%, -50%) scale(0.3) rotate(0deg); opacity: 1; } | ||
| 55% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1) rotate(var(--r)); opacity: 1; } | ||
| 100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) + 160px)) scale(0.8) rotate(calc(var(--r) * 1.4)); opacity: 0; } | ||
| } | ||
| @media (prefers-reduced-motion: reduce) { .star-burst { display: none; } } | ||
| `}</style> | ||
| {stars.map((s, i) => ( | ||
| <span | ||
| key={i} | ||
| style={ | ||
| { | ||
| position: 'absolute', | ||
| left: 0, | ||
| top: 0, | ||
| display: 'inline-flex', | ||
| opacity: 0, | ||
| '--x': `${s.x}px`, | ||
| '--y': `${s.y}px`, | ||
| '--r': `${s.r}deg`, | ||
| animation: `star-burst 1400ms cubic-bezier(0.2, 0.7, 0.3, 1) ${s.delay}ms forwards`, | ||
| } as React.CSSProperties | ||
| } | ||
| > | ||
| <Icon name="star" size={s.size} tone={s.tone} fill="currentColor" /> | ||
| </span> | ||
| ))} | ||
| </div> | ||
| ) | ||
| } |
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.