Skip to content

Conversation

choiseona
Copy link
Member

@choiseona choiseona commented Mar 15, 2025

πŸ“‚ μž‘μ—… λ‚΄μš©

closes #46

  • 단좕킀 κΈ°λŠ₯ μΆ”κ°€
  • modal 닫을 λ•Œ 포컀싱 제거

πŸ’‘ μžμ„Έν•œ μ„€λͺ…

단좕킀 κΈ°λŠ₯

LobbyPage

  • μ‹œμž‘ (s), μ΄ˆλŒ€ (d)
  • μ±„νŒ… ν™œμ„±ν™”/λΉ„ν™œμ„±ν™”(Enter)
  • μ„€μ • λ“œλ‘­λ‹€μš΄ μ—΄κ³ /λ‹«κΈ° (q,w,e)

GameRoomPage

  • 색상 선택 (a,s,d,f,g)
  • 펜 선택(w), 페인트 선택(e)
  • 되돌리기(ctrl+z), λ‹€μ‹œκ·Έλ¦¬κΈ°(ctrl+shift+z)

Modal 포컀싱 제거

  • Modal 닫아도 포컀싱 μ œκ±°λ˜μ§€ μ•ŠλŠ” 문제 ν•΄κ²°
  • isModalOpened μƒνƒœκ°€ false이면 blur둜 포컀싱 제거

πŸ“— μ°Έκ³  자료 & κ΅¬ν˜„ κ²°κ³Ό (선택)

λ‘œλΉ„νŽ˜μ΄μ§€

2

κ²Œμž„νŽ˜μ΄μ§€

2

πŸ“’ 리뷰 μš”κ΅¬ 사항 (선택)

🚩 후속 μž‘μ—… (선택)

βœ… μ…€ν”„ 체크리슀트

  • PR 제λͺ©μ„ ν˜•μ‹μ— 맞게 μž‘μ„±ν–ˆλ‚˜μš”?
  • 브랜치 μ „λž΅μ— λ§žλŠ” λΈŒλžœμΉ˜μ— PR을 올리고 μžˆλ‚˜μš”?
  • μ΄μŠˆλŠ” close ν–ˆλ‚˜μš”?
  • Reviewers, Labelsλ₯Ό λ“±λ‘ν–ˆλ‚˜μš”?
  • μž‘μ—… 도쀑 λ¬Έμ„œ μˆ˜μ •μ΄ ν•„μš”ν•œ 경우 잘 μˆ˜μ •ν–ˆλ‚˜μš”?
  • ν…ŒμŠ€νŠΈλŠ” 잘 ν†΅κ³Όν–ˆλ‚˜μš”?
  • λΆˆν•„μš”ν•œ μ½”λ“œλŠ” μ œκ±°ν–ˆλ‚˜μš”?

- Implement shorcutManager module to manage keyboard shortcuts
- Prevent shortcuts from triggering inside input, textarea, and content-editable elements (except for Enter key)
- Provide methods to register shortcuts, handle keydown events, and clear registered shortcuts
- Add createShortcutFromEvent function to generate shortcut keys from KeyboardEvent.
- Implement usePageShortcutKeys custom hook to manage keyboard shortcuts at the page level.
- Utilize useEffect to register and clean up the keydown event listener when the page is mounted/unmounted.
- Call clearShortcuts on unmount to ensure shortcuts are properly removed.
- Update keyboard shortcuts for invite button, start game button, settings dropdowns, and chat activation using the new shortcut system
- Update keyboard shortcuts for redo, undo, color change, tool change, using the new shortcut system
- Each component manages its own shortcuts and cleans them up when unmounted
@choiseona choiseona added πŸ’» FE Frontend Code πŸ”¨ Refactor Code Refactoring πŸ“ˆ Improvement Performance Optimization labels Mar 15, 2025
@choiseona choiseona self-assigned this Mar 15, 2025
@choiseona choiseona linked an issue Mar 15, 2025 that may be closed by this pull request
2 tasks
Copy link

πŸ“š Storybook preview deployed to: Visit Storybook Preview

Copy link

🚦 Lighthouse Audit Results

MainPage

Category Scores

Category Score
performance 🟒 90
accessibility 🟒 100
best-practices 🟒 96
seo 🟒 92

Core Web Vitals & Metrics

Metric Value Score
FCP 1.6 s 🟒 94
LCP 3.6 s 🟑 61
TBT 0 ms 🟒 100
CLS 0 🟒 100
SI 1.6 s 🟒 100
LobbyPage

Category Scores

Category Score
performance 🟑 72
accessibility 🟒 96
best-practices 🟒 96
seo 🟒 92

Core Web Vitals & Metrics

Metric Value Score
FCP 2.1 s 🟑 82
LCP 8.5Β s πŸ”΄ 2
TBT 100 ms 🟒 98
CLS 0 🟒 100
SI 3.3 s 🟒 91

Copy link

πŸ“š Storybook preview deployed to: Visit Storybook Preview

Copy link

🚦 Lighthouse Audit Results

MainPage

Category Scores

Category Score
performance 🟒 91
accessibility 🟒 100
best-practices 🟒 96
seo 🟒 92

Core Web Vitals & Metrics

Metric Value Score
FCP 1.5 s 🟒 95
LCP 3.4 s 🟑 66
TBT 0 ms 🟒 100
CLS 0 🟒 100
SI 1.5 s 🟒 100
LobbyPage

Category Scores

Category Score
performance 🟑 72
accessibility 🟒 96
best-practices 🟒 96
seo 🟒 92

Core Web Vitals & Metrics

Metric Value Score
FCP 2.1 s 🟑 82
LCP 8.4Β s πŸ”΄ 2
TBT 110 ms 🟒 97
CLS 0 🟒 100
SI 3.4 s 🟑 89

e.preventDefault();
action();
for (const config of configs) {
if (config.key.toLowerCase() === shortcutKey) {
Copy link
Collaborator

@dbjoung dbjoung Mar 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

κ³ μƒν•˜μ…¨μŠ΅λ‹ˆλ‹€ μ„ μ•„λ‹˜..! :D
λ‹€λ¦„μ΄μ•„λ‹ˆλΌ configsλ₯Ό 배열이 μ•„λ‹ˆλΌ ν‚€-쌍 ν˜•νƒœμΈ Map λ“±μœΌλ‘œ λ„˜κ²¨λ°›μœΌλ©΄ ν‚€λ‹€μš΄ 이벀트 λ°œμƒν•  λ•Œλ§ˆλ‹€ 루프 λŒμ§€ μ•Šκ³  λ°”λ‘œ μ›ν•˜λŠ” config에 μ ‘κ·Όν•  수 μžˆμ§€ μ•Šλ‚˜ ν•΄μ„œμš”. 혹 λ°°μ—΄λ‘œ ν•˜μ‹  λ‹€λ₯Έ μ΄μœ κ°€ μžˆμ„κΉŒμš”?
(+) μ΄μŠˆλŠ” μ•„λ‹ˆλΌμ„œ μ–΄ν”„λ‘œλΈŒ ν–ˆμŠ΅λ‹ˆλ‹€ :)

@choiseona choiseona changed the title Refactor: Update shortcutkey logic refactor: Update shortcutkey logic Jul 18, 2025
Copy link
Collaborator

@rhino-ty rhino-ty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

κ³ μƒλ§ŽμœΌμ…¨μŠ΅λ‹ˆλ‹€!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

πŸ’» FE Frontend Code πŸ“ˆ Improvement Performance Optimization πŸ”¨ Refactor Code Refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

custom 단좕킀 λ¦¬νŒ©ν† λ§

3 participants