๐จ Palette: [UX improvement] ์์ฝ๋์ธ ์ ๊ทผ์ฑ ๋ฐ ํค๋ณด๋ ํฌ์ปค์ค ๊ฐ์ #210
๐จ Palette: [UX improvement] ์์ฝ๋์ธ ์ ๊ทผ์ฑ ๋ฐ ํค๋ณด๋ ํฌ์ปค์ค ๊ฐ์ #210seonghobae wants to merge 11 commits into
Conversation
โฆlicate calculation `buildTimelineGroups` was calculated redundantly inside both `EventList` and `SessionActivityRibbon` inside `useMemo` hooks. This commit moves the `useMemo` computation into the parent `page.tsx` component and passes down `groups` as a prop to its children, preventing duplicate O(n) array iterations per `events` change.
Replace chained `.reduce()` and `Object.values()` with a single `for...of` loop over `Object.keys()` to avoid unnecessary intermediate array allocations and improve iteration performance during report aggregation.
overview-stats ์ปดํฌ๋ํธ์ ์ค๋ช ํ ์คํธ๋ฅผ ํผ์น๊ฑฐ๋ ์ ๋ ๋ฒํผ์ ํค๋ณด๋ ํฌ์ปค์ค ์คํ์ผ์ด ๋๋ฝ๋์ด ์์ด, ํค๋ณด๋ ๋ด๋น๊ฒ์ด์ ์ฌ์ฉ์์๊ฒ ํ์ฌ ํฌ์ปค์ค ์์น๋ฅผ ๋ช ํํ ๋ณด์ฌ์ฃผ์ง ๋ชปํ๋ ๋ฌธ์ ๋ฅผ ์์ ํ์ต๋๋ค. Tailwind CSS์ `focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm` ํด๋์ค๋ฅผ ์ถ๊ฐํ์ฌ ํญ(Tab) ํค ์ด๋ ์ ํฌ์ปค์ค ๋ง์ด ๋ณด์ด๋๋ก ์ ๊ทผ์ฑ์ ๊ฐ์ ํ์ต๋๋ค.
- `TokenUsageChart`์ `WeeklyFlowChart`์ ๋ฐ์ดํฐ ๋ณํ ๋ก์ง์ `useMemo`๋ฅผ ์ ์ฉํ์ฌ ๋ถํ์ํ ๋ฆฌ๋ ๋๋ง ์ต์ ํ.
โฆy-improvements-7782421783208925042
โฆdata-8534904799192449677
โฆtats-focus-1138085163110647654
โฆ-loops-in-reports-11490543380196529130
โฆline-groups-memo-10280015208843955185
- `ContextSection` ๋ด ์ปค์คํ ์์ฝ๋์ธ ํ ๊ธ๊ณผ ์ฝํ ์ธ ์์ญ ๊ฐ `aria-controls`, `role="region"`, `aria-labelledby` ๋ฑ ํ์ ARIA ์ฐ๊ฒฐ ์์ฑ ๋๋ฝ ๋ฌธ์ ๋ฅผ `useId()`๋ฅผ ํ์ฉํ์ฌ ๋์ ์ผ๋ก ๋ถ์ฌํจ์ผ๋ก์จ ํด๊ฒฐํ์ต๋๋ค. - ๊ธฐ๋ณธ UI primitive๋ฅผ ์ฌ์ฉํ์ง ์๋ ์ปค์คํ `<button>` ์์์ ๋ํด `focus-visible` ๋ฑ ๋ช ํํ ํค๋ณด๋ ํฌ์ปค์ค ์คํ์ผ์ ์ถ๊ฐํด ํค๋ณด๋ ์กฐ์ ๊ฐ์์ฑ์ ๋์์ต๋๋ค. - ๋ถํ์ํ ์คํฌ๋ฆฐ ๋ฆฌ๋ ์์ฑ ์ถ๋ ฅ์ ๋ง๊ธฐ ์ํด chevron ์์ด์ฝ์ `aria-hidden="true"`๋ฅผ ๋ถ์ฌํ์ต๋๋ค. - ๊ด๋ จ ํ ์คํธ ์ฝ๋(`context-section.test.tsx`)๋ฅผ ์์ฑํ์ฌ ํ ์คํธ ์ปค๋ฒ๋ฆฌ์ง๋ฅผ 100% ํ๋ณดํ๊ณ ์๋๋ ๊ธฐ๋ฅ๊ณผ ์ ๊ทผ์ฑ ์์ฑ์ด ์ ์ ์ฉ๋๋์ง ๊ฒ์ฆํ์ต๋๋ค.
|
๐ Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a ๐ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
๐ก What
ContextSection์ปดํฌ๋ํธ์<button>๊ณผ ์ฝํ ์ธ ์์ญ์ด ARIA ์์ฑ์ผ๋ก ์ฐ๊ฒฐ๋์ง ์์ ์ ๊ทผ์ฑ์ด ๋จ์ด์ง๋ ๋ถ๋ถ์ ๊ฐ์ ํ์ต๋๋ค (aria-controls,role="region",aria-labelledby๋์ ).<button>์ ํตํ ํค๋ณด๋ ํ์ ์(Tab ์ด๋ ์) ํฌ์ปค์ค ๋ง์ด ๋ช ํํ๊ฒ ํ์๋๋๋กfocus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset์ ํธ๋ฆฌํฐ ํด๋์ค๋ฅผ ์ถ๊ฐํ์ต๋๋ค.vitest๋ฅผ ํตํด ํด๋น ๋ณ๊ฒฝ์ฌํญ์ ๋ํ ์ ๊ทผ์ฑ ๋ฐ ์ํ ๋ณ๊ฒฝ ํ ์คํธ ์ปค๋ฒ๋ฆฌ์ง๋ฅผ 100%๋ก ํ๋ณดํ์ต๋๋ค.๐ฏ Why
๐ธ Before/After
ContextSection์ ํ ๊ธ ๋ฒํผ์ ์๊ฐ์ ํฌ์ปค์ค ๋ง์ด ๋ํ๋์ง ์์ ํผ๋์ ์ค ์ ์์์ต๋๋ค.โฟ Accessibility
useId()๋ฅผ ํตํด ๋ฒํผ(aria-controls)๊ณผ ํจ๋(id,aria-labelledby)์ ์๋งจํฑํ๊ฒ ์ฐ๊ฒฐ.focus-visible:ring-2).aria-hidden="true"๋ฅผ ์์ด์ฝ์ ์ ์ฉ).PR created automatically by Jules for task 2033724048262015987 started by @seonghobae