-
Notifications
You must be signed in to change notification settings - Fork 0
[feat] 채팅 목차 알림 상태 추가 #113
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
The head ref may contain hidden characters: "112-feat-\uCC44\uD305-\uBAA9\uCC28-\uC54C\uB9BC-\uC0C1\uD0DC-\uCD94\uAC00"
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -39,45 +39,53 @@ function ChatHeader() { | |||||
| </button> | ||||||
| </header> | ||||||
|
|
||||||
| {open && ( | ||||||
| <div className="fixed inset-0 z-50 bg-black/30" onClick={() => setOpen(false)}> | ||||||
| <div className="absolute top-0 right-0 h-full w-72 bg-white p-4" onClick={(e) => e.stopPropagation()}> | ||||||
| <div className="mb-6 flex items-center justify-between border-b pb-4"> | ||||||
| <span className="text-sm font-medium">알림</span> | ||||||
| <div | ||||||
| className={`fixed inset-0 z-50 transition-colors duration-300 ${ | ||||||
| open ? 'pointer-events-auto bg-black/30' : 'pointer-events-none bg-black/0' | ||||||
| }`} | ||||||
| onClick={() => setOpen(false)} | ||||||
| > | ||||||
| <div | ||||||
| className={`absolute top-0 right-0 h-full w-72 transform bg-white p-4 transition-transform duration-300 ease-in-out ${ | ||||||
| open ? 'translate-x-0' : 'translate-x-full' | ||||||
| }`} | ||||||
| onClick={(e) => e.stopPropagation()} | ||||||
| > | ||||||
| <div className="mb-6 flex items-center justify-between border-b pb-4"> | ||||||
| <span className="text-sm font-medium">알림</span> | ||||||
|
|
||||||
| <button | ||||||
| onClick={() => toggleMute()} | ||||||
| className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${ | ||||||
| isMuted ? 'bg-gray-300' : 'bg-primary' | ||||||
| <button | ||||||
| onClick={() => toggleMute()} | ||||||
| className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${ | ||||||
| isMuted ? 'bg-gray-300' : 'bg-primary' | ||||||
| }`} | ||||||
| > | ||||||
| <span | ||||||
| className={`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${ | ||||||
| isMuted ? 'translate-x-1' : 'translate-x-6' | ||||||
| }`} | ||||||
| > | ||||||
| <span | ||||||
| className={`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${ | ||||||
| isMuted ? 'translate-x-1' : 'translate-x-6' | ||||||
| }`} | ||||||
| /> | ||||||
| </button> | ||||||
| </div> | ||||||
| /> | ||||||
| </button> | ||||||
| </div> | ||||||
|
|
||||||
| {isGroup && ( | ||||||
| <> | ||||||
| <div className="mb-4 text-sm font-bold">참여자 {clubMembers.length}명</div> | ||||||
| <div className="flex flex-col gap-3"> | ||||||
| {clubMembers.map((member) => ( | ||||||
| <div key={member.userId} className="flex items-center gap-3"> | ||||||
| <img src={member.imageUrl} className="h-8 w-8 rounded-full" /> | ||||||
| <div className="flex flex-col"> | ||||||
| <span className="text-sm font-medium">{member.name}</span> | ||||||
| <span className="text-xs text-gray-400">{member.studentNumber}</span> | ||||||
| </div> | ||||||
| {isGroup && ( | ||||||
| <> | ||||||
| <div className="mb-4 text-sm font-bold">참여자 {clubMembers.length}명</div> | ||||||
| <div className="flex flex-col gap-3"> | ||||||
| {clubMembers.map((member) => ( | ||||||
| <div key={member.userId} className="flex items-center gap-3"> | ||||||
| <img src={member.imageUrl} className="h-8 w-8 rounded-full" /> | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add The ♿ Proposed fix- <img src={member.imageUrl} className="h-8 w-8 rounded-full" />
+ <img src={member.imageUrl} alt={member.name} className="h-8 w-8 rounded-full" />📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| <div className="flex flex-col"> | ||||||
| <span className="text-sm font-medium">{member.name}</span> | ||||||
| <span className="text-xs text-gray-400">{member.studentNumber}</span> | ||||||
| </div> | ||||||
| ))} | ||||||
| </div> | ||||||
| </> | ||||||
| )} | ||||||
| </div> | ||||||
| </div> | ||||||
| ))} | ||||||
| </div> | ||||||
| </> | ||||||
| )} | ||||||
| </div> | ||||||
| )} | ||||||
| </div> | ||||||
| </> | ||||||
| ); | ||||||
| } | ||||||
|
|
||||||
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.
Add accessibility attributes to the toggle button.
The toggle switch should have an accessible label and appropriate ARIA attributes to indicate its purpose and current state to screen reader users.
♿ Proposed accessibility fix
<button onClick={() => toggleMute()} + aria-label="알림" + aria-pressed={!isMuted} + role="switch" className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${ isMuted ? 'bg-gray-300' : 'bg-primary' }`} >📝 Committable suggestion
🤖 Prompt for AI Agents