feat(ui): add AppButton/AppLinkButton primitives and migrate app action controls - #273
Conversation
…on controls (stolla-labs#272) - Add AppButton and AppLinkButton with primary/secondary/danger/success tones and sm/md sizes; visual state classes live in the primitive, layout classes stay at the call site - Preserve native button attributes, handlers, disabled semantics, and refs; AppLinkButton keeps Next.js navigation and anchor attributes - Migrate representative action controls in community detail/not-found views and the community route page - Add primitive tests covering every tone, both sizes, class merging, ref forwarding, disabled behavior, and link attributes
|
@karagozemin is attempting to deploy a commit to the caneryy's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks for the initial primitive implementation. The primitive direction is sound, but this PR does not yet satisfy #272: the issue requires migration across the app route group and the dashboard/community components, not a representative sample. Please complete the eligible production migration below before requesting another review:
Keep the issue exclusions intact: do not modify landing components, Two primitive-level fixes are also needed:
Update the affected consumer tests by accessible role/name where their rendered element changes. Please complete the checklist as one coherent migration and avoid unrelated formatting or generated churn. |
…edback (stolla-labs#272) - Default AppButton to type=button; preserve explicit type=submit - Assert per-tone classes in the primitive test; add default-type regression test - Migrate remaining action controls across the app route group: communities (listing/detail/proposals/create), community, and proposals pages - Migrate CommunityCard and CommunityDeploymentPanel actions (primary/secondary/ danger/success)
|
Thanks for the detailed review — addressed both primitive-level fixes and completed the eligible migration. Primitive fixes
Migration completed
Left intentionally unchanged (per the issue's exclusions / no matching tone): landing components and |
|
The latest update is still incomplete for #272. Several eligible production action controls were excluded as “compact” even though the new primitives already provide a Please complete the remaining in-scope migrations below:
These are direct consumers of the action styles this issue is consolidating, so leaving them on bespoke button/link styling would preserve the inconsistency the shared primitives are intended to remove. Update existing behavioral tests only where the rendered element change requires it. Preserve labels, handlers, navigation destinations, responsive layout, menu behavior, external-link attributes, and the landing/ Please complete the checklist and reply with the migrated paths before requesting re-review. |
Co-authored-by: Cursor <cursoragent@cursor.com>
Closes #272
Summary
Adds app-specific
AppButtonandAppLinkButtonprimitives and migrates representative app action controls to them, removing duplicated Tailwind action class lists.What changed
components/ui/AppButton.tsx,AppLinkButton.tsx) —tone="primary | secondary | danger | success"andsize="sm | md", plusclassNamefor layout-only additions. Visual state (color, border, typography, hover, focus, disabled) lives in the primitive.type,disabled,aria-*,data-*, handlers, and forwarded refs pass through;AppLinkButtonpreserves Next.js navigation + anchor attributes.CommunityDetailView,CommunityNotFound, and the community route page.AppButton.test.tsx) — every tone, both sizes, class merging, ref forwarding, disabled semantics, and link attributes.Verification
npm run lint && npm run typecheck && npm test