-
Notifications
You must be signed in to change notification settings - Fork 0
feet: チャッピー風デザインにする #5
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,58 @@ | ||||||
| import { useState, useEffect, useCallback } from 'react' | ||||||
| import { Outlet } from 'react-router-dom' | ||||||
| import { listJobs, type Job } from '../services/api' | ||||||
| import Sidebar from './Sidebar' | ||||||
|
|
||||||
| type LayoutContext = { | ||||||
| refreshJobs: () => void | ||||||
| } | ||||||
|
|
||||||
| export default function Layout() { | ||||||
| const [sidebarOpen, setSidebarOpen] = useState(true) | ||||||
| const [jobs, setJobs] = useState<Job[]>([]) | ||||||
|
|
||||||
| const refreshJobs = useCallback(() => { | ||||||
| listJobs() | ||||||
| .then(setJobs) | ||||||
| .catch(() => {}) | ||||||
| }, []) | ||||||
|
|
||||||
| useEffect(() => { | ||||||
| refreshJobs() | ||||||
| }, [refreshJobs]) | ||||||
|
|
||||||
| return ( | ||||||
| <div style={{ display: 'flex', minHeight: '100vh' }}> | ||||||
| <Sidebar jobs={jobs} isOpen={sidebarOpen} onToggle={() => setSidebarOpen(false)} /> | ||||||
|
||||||
| <Sidebar jobs={jobs} isOpen={sidebarOpen} onToggle={() => setSidebarOpen(false)} /> | |
| <Sidebar jobs={jobs} isOpen={sidebarOpen} onToggle={() => setSidebarOpen((prev) => !prev)} /> |
Copilot
AI
Feb 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The toggle button should have an aria-label to describe its purpose for screen reader users. Add aria-label="Open sidebar" or similar to improve accessibility.
Copilot
AI
Feb 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using emoji characters (☰) for interactive UI elements can cause accessibility issues. Screen readers may not announce them meaningfully. Consider using an SVG icon with proper aria-label or replace with actual text for better accessibility.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,182 @@ | ||||||
| import { useNavigate, useLocation } from 'react-router-dom' | ||||||
| import { type Job } from '../services/api' | ||||||
| import StatusBadge from './StatusBadge' | ||||||
| import logoIcon from '../assets/claude_desgin.png' | ||||||
|
||||||
| import logoIcon from '../assets/claude_desgin.png' | |
| import logoIcon from '../assets/claude_design.png' |
Copilot
AI
Feb 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The toggle button should have an aria-label to describe its purpose for screen reader users. Add aria-label="Close sidebar" or similar to improve accessibility.
Copilot
AI
Feb 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The job list items are clickable divs without proper semantic HTML or keyboard navigation. Consider using button elements or adding tabIndex and onKeyDown handlers to support keyboard navigation (Enter/Space keys) for better accessibility.
Copilot
AI
Feb 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The string replace operation assumes the URL starts with 'https://github.com/'. If the URL doesn't match this pattern (e.g., 'http://github.com/', 'https://gitlab.com/'), it won't be replaced and will display the full URL. Consider using a more robust URL parsing approach or handle non-GitHub URLs more gracefully.
Copilot
AI
Feb 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The settings item is a clickable div without proper semantic HTML or keyboard navigation. Consider using a button element or adding tabIndex and onKeyDown handlers to support keyboard navigation (Enter/Space keys) for better accessibility.
Copilot
AI
Feb 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using emoji characters (⚙) for interactive UI elements can cause accessibility issues. Screen readers may not announce them meaningfully. Consider using an SVG icon with proper aria-label or replace with actual text for better accessibility.
| <span style={{ fontSize: '30px' }}>⚙</span> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { useOutletContext } from 'react-router-dom' | ||
|
|
||
| type LayoutContext = { | ||
| refreshJobs: () => void | ||
| } | ||
|
|
||
| export function useLayoutContext() { | ||
| return useOutletContext<LayoutContext>() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error is silently caught and ignored without any logging or user feedback. Consider logging the error to the console for debugging purposes, as this could mask issues with the jobs API.