Repository navigation
Conversation
Added disabled prop and ARIA attributes to TokenField, TokenFieldItem, and TokenFieldAction components: - TokenField: disabled prop, aria-disabled, aria-busy attributes - TokenFieldItem: aria-disabled attribute - TokenFieldAction: disabled prop passed to Button Improves UX by allowing disabled states and enhances accessibility for screen readers. Fixes trycompai#220
|
@mdiniz97 is attempting to deploy a commit to the Comp AI - PoC Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/ui/src/components/token-field.tsx">
<violation number="1" location="packages/ui/src/components/token-field.tsx:20">
P2: When a consumer uses the new `TokenField disabled` prop, the field remains interactive because `aria-disabled` does not disable editing or descendant buttons. Propagate the disabled state to editable descendants and actions, or provide a shared state mechanism that those children consume.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| <div | ||
| data-slot="token-field" | ||
| role="group" | ||
| aria-disabled={ariaDisabled ?? disabled} |
There was a problem hiding this comment.
P2: When a consumer uses the new TokenField disabled prop, the field remains interactive because aria-disabled does not disable editing or descendant buttons. Propagate the disabled state to editable descendants and actions, or provide a shared state mechanism that those children consume.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/ui/src/components/token-field.tsx, line 20:
<comment>When a consumer uses the new `TokenField disabled` prop, the field remains interactive because `aria-disabled` does not disable editing or descendant buttons. Propagate the disabled state to editable descendants and actions, or provide a shared state mechanism that those children consume.</comment>
<file context>
@@ -2,13 +2,25 @@ import { Button } from "@crm/ui/components/button";
<div
data-slot="token-field"
role="group"
+ aria-disabled={ariaDisabled ?? disabled}
+ aria-busy={ariaBusy}
className={cn(
</file context>
There was a problem hiding this comment.
Review result: rewrite from current main.
aria-disableddoes not disable content editing.- Parent state does not disable descendant actions.
- The branch removes the current placeholder focus fix.
- The change adds no loading indicator.
- The change adds no behavioral tests.
Use shared compound-component state for disabled and loading behavior.
|
This branch is stale and conflicts with the current TokenField placeholder fix. The state API needs a current-main compound-component rewrite. |
Takes upstream as the base for every file the fork only carried as an early copy of an upstream PR (trycompai#142, trycompai#194, trycompai#212, trycompai#213, trycompai#216, trycompai#219, trycompai#221), then re-applies the fork's own changes on top: - obligations: completing a RECHECK_DUE task spawns the next re-check inside the same transaction (new spec covers spawn, re-open, deliverable) - deals: winning a deal asks for the engagement type - auth: forced Google consent kept; hd hint withheld when several sign-in domains are allowed (spec added); primaryWorkspaceDomain back to upstream - nav: Calendar and Crons & Syncs re-homed into the Neo workspace nav - brand: WebAbility strings re-applied to upstream copies - agent: document agent ported to eve 0.69 (sandbox + dynamic model) - docker: bun 1.4.0 to match the pinned packageManager and new lockfile Removes leftover take files the upstream versions replaced (csv-parse, task-window, viewer-day, task-edit.spec). check-types 15/15, lint 11/11, lint:slop clean, app build ok, tests: api 447, agent 416, app 260, auth 69, db 115, telemetry 61, mcp 12, env 17, validation 8 (0 fail, 0 skip).
Added disabled prop and ARIA attributes to TokenField, TokenFieldItem, and TokenFieldAction components:
Improves UX by allowing disabled states and enhances accessibility for screen readers.
Fixes #220
Summary by cubic
Adds disabled and loading states to the TokenField component so forms can indicate when token editing is unavailable or pending.
TokenFieldnow accepts adisabledprop and forwardsaria-disabledandaria-busyto the root element.TokenFieldItemandTokenFieldActionalso support the disabled state, giving users and screen readers clear feedback. Fixes #220.Written for commit 0deb4da. Summary will update on new commits.