๐จ Palette: ContextSection ์ ๊ทผ์ฑ ๊ฐ์ (aria-controls ์ฐ๊ฒฐ ๋ฐ ์๊ฐ์ ํฌ์ปค์ค)#111
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
|
๐ 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. |
There was a problem hiding this comment.
Pull request overview
Improves the accessibility of the dashboard ContextSection disclosure by strengthening the relationship between the toggle button and its content, reducing screen-reader noise from decorative icons, and adding keyboard focus styling.
Changes:
- Add
aria-controlswiring via a generated id (useId). - Mark decorative chevron icons as
aria-hidden="true". - Add
focus-visiblestyles to the toggle button for clearer keyboard focus indication.
๐ก Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| {open && ( | ||
| <div className="px-4 pb-4 pt-1"> | ||
| <div id={contentId} className="px-4 pb-4 pt-1"> | ||
| {children} | ||
| </div> | ||
| )} |
| className={cn( | ||
| 'w-full flex items-center justify-between px-4 py-3 text-left', | ||
| 'hover:bg-card-elevated transition-colors', | ||
| 'focus-visible:outline-none focus-visible:bg-card-elevated focus-visible:ring-2 focus-visible:ring-ring' | ||
| )} |
| 'focus-visible:outline-none focus-visible:bg-card-elevated focus-visible:ring-2 focus-visible:ring-ring' | ||
| )} | ||
| aria-expanded={open} | ||
| aria-controls={contentId} |
|
Closing as superseded during org-wide PR triage. Keeping #210 as the canonical PR for the same overlapping topic: ContextSection/accessibility accordion. This PR is stale/conflicted or has review blockers, so retaining one current PR reduces duplicated review and merge conflict work. |
Understood. Acknowledging that this work is now obsolete and superseded by PR #210, and stopping work on this task. |
๐ก What:
ContextSection์ปดํฌ๋ํธ์ ์ ๊ทผ์ฑ์ ํฅ์์์ผฐ์ต๋๋ค.aria-controls๋ฅผ ์ถ๊ฐํ์ต๋๋ค.ChevronUp,ChevronDown)์aria-hidden="true"๋ฅผ ์ถ๊ฐํ์ต๋๋ค.focus-visible์คํ์ผ์ ์ถ๊ฐํ์ต๋๋ค.๐ฏ Why: ํค๋ณด๋๋ง ์ฌ์ฉํ์ฌ ๋์๋ณด๋๋ฅผ ํ์ํ๋ ์ฌ์ฉ์๋ค์๊ฒ ํ์ฌ ํฌ์ปค์ค ์์น๋ฅผ ๋ช ํํ ๋ณด์ฌ์ฃผ๊ณ , ์คํฌ๋ฆฐ ๋ฆฌ๋ ์ฌ์ฉ์๊ฐ ํด๋น ๋ฒํผ์ด ์ด๋ค ์์ญ์ ์ ์ดํ๋์ง ๋ช ํํ๊ฒ ์ดํดํ ์ ์๋๋ก ํ๊ธฐ ์ํจ์ ๋๋ค. ์์ ๋ํ ์ผ์ด์ง๋ง ๊ฒฝํ์ ํฌ๊ฒ ํฅ์์ํต๋๋ค.
๐ธ Before/After: ์ถ๊ฐ๋ Playwright ์๊ฐ ํ ์คํธ๋ฅผ ํตํด ํฌ์ปค์ค ์
ring-2ํ ๋๋ฆฌ๊ฐ ์๊ธฐ๋ ๊ฒ์ ํ์ธํ์ต๋๋ค.โฟ Accessibility:
aria-controlsaria-hiddenon decorative elementsfocus-visiblestates์ฐธ๊ณ : ํด๋น ์ปดํฌ๋ํธ์ ๋ํ ํ ์คํธ ์ฝ๋๋ฅผ ์์ฑํ๋ ค ํ์์ผ๋, ํด๋น ํจํค์ง์ vitest๊ฐ
nodeํ๊ฒฝ์ผ๋ก ์ค์ ๋์ด ์์ด DOM ๋ ๋๋ง ๊ธฐ๋ฐ ํ ์คํธ(React Testing Library ๋ฑ)๊ฐ ๋ถ๊ฐ๋ฅํจ์ ํ์ธํ์์ต๋๋ค.PR created automatically by Jules for task 6098934553673410577 started by @seonghobae