feat(PBI-49): add BEM sub-element data-debug-id to components/notifications/*

- answer-modal: __content (scroll area), __submit (footer)
- notifications-bridge: skip comment (bridge, non-rendering wrapper)
- notifications-realtime-mount: skip comment (returns null)
- notifications-sheet: __header, __items (questions list)
- push-toggle: __switch (button), __label (button text) on subscribed/unsubscribed states
This commit is contained in:
Scrum4Me Agent 2026-05-09 22:27:23 +02:00
parent d34793d7a9
commit 924a31b89a
5 changed files with 16 additions and 10 deletions

View file

@ -98,7 +98,7 @@ export function AnswerModal({ question, isDemo, onClose }: AnswerModalProps) {
</div>
</div>
<div className="flex-1 overflow-y-auto px-6 py-6 space-y-6">
<div className="flex-1 overflow-y-auto px-6 py-6 space-y-6" data-debug-id="answer-modal__content">
<Link
href={
question.kind === 'idea'
@ -158,7 +158,7 @@ export function AnswerModal({ question, isDemo, onClose }: AnswerModalProps) {
)}
</div>
<div className={entityDialogFooterClasses}>
<div className={entityDialogFooterClasses} data-debug-id="answer-modal__submit">
<div className="flex justify-end gap-2">
<Button variant="ghost" onClick={closeGuard.attemptClose} disabled={pending}>
Annuleren

View file

@ -106,5 +106,6 @@ export async function NotificationsBridge({ userId }: NotificationsBridgeProps)
const initial: NotificationQuestion[] = [...storyQuestions, ...ideaQuestions]
.sort((a, b) => (a.created_at < b.created_at ? 1 : -1))
// debug-id: skip — bridge component (niet-renderende wrapper, zie docs/patterns/debug-id.md)
return <NotificationsRealtimeMount initial={initial} />
}

View file

@ -19,5 +19,6 @@ export function NotificationsRealtimeMount({ initial }: Props) {
}, [initial])
useNotificationsRealtime()
// debug-id: skip — render-loos mount (returns null, zie docs/patterns/debug-id.md)
return null
}

View file

@ -42,7 +42,7 @@ export function NotificationsSheet({
<Sheet open={open} onOpenChange={setOpen}>
<SheetTrigger render={trigger as React.ReactElement} />
<SheetContent side="right" className="w-full sm:max-w-md" {...debugProps('notifications-sheet', 'NotificationsSheet', 'components/notifications/notifications-sheet.tsx')}>
<SheetHeader>
<SheetHeader data-debug-id="notifications-sheet__header">
<SheetTitle>Vragen van Claude ({questions.length})</SheetTitle>
<SheetDescription>
Beantwoord open vragen om Claude verder te laten werken.
@ -54,7 +54,7 @@ export function NotificationsSheet({
Geen openstaande vragen. Lekker bezig!
</div>
) : (
<ul className="mt-4 flex flex-col gap-2 px-4 pb-4">
<ul className="mt-4 flex flex-col gap-2 px-4 pb-4" data-debug-id="notifications-sheet__items">
{questions.map((q) => {
// story-questions: forYou wanneer assignee = ingelogd; idee-vragen
// zijn altijd "voor jou" (idee is strikt user_id-only).

View file

@ -103,15 +103,19 @@ export function PushToggle({ vapidPublicKey }: PushToggleProps) {
if (status === 'unsubscribed') {
return (
<Button variant="default" size="sm" onClick={handleSubscribe} {...debugProps('push-toggle', 'PushToggle', 'components/notifications/push-toggle.tsx')}>
Activeer push
</Button>
<div {...debugProps('push-toggle', 'PushToggle', 'components/notifications/push-toggle.tsx')}>
<Button variant="default" size="sm" onClick={handleSubscribe} data-debug-id="push-toggle__switch">
<span data-debug-id="push-toggle__label">Activeer push</span>
</Button>
</div>
)
}
return (
<Button variant="outline" size="sm" onClick={handleUnsubscribe} {...debugProps('push-toggle', 'PushToggle', 'components/notifications/push-toggle.tsx')}>
Push uitzetten
</Button>
<div {...debugProps('push-toggle', 'PushToggle', 'components/notifications/push-toggle.tsx')}>
<Button variant="outline" size="sm" onClick={handleUnsubscribe} data-debug-id="push-toggle__switch">
<span data-debug-id="push-toggle__label">Push uitzetten</span>
</Button>
</div>
)
}