feat(ui): Add optional layout and feedback primitives

Đang mở
#63 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@fetrarij đang làm issue này rồi.

Từ ngày 25/9/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

enhancement layer: library pkg: material pkg: tailwind

Context

libs/material/src/lib/resource-form/resource-form.html:17 and Tailwind form :30 hardcode Save; apps/demo-material/src/app/pages/home-page.ts:28 implements app navigation itself. Existing adapters are deliberately small and no common layout/feedback contract exists.

Scope

  • Add optional adapter-level layout slots for resource navigation/header/content plus accessible notification/confirmation presentation contracts driven by caller state.
  • Expose text/label overrides for built-in controls, including loading/empty/error/Save, keeping English defaults and no i18n framework dependency.
  • Keep layout unaware of Supabase and let apps own auth/router policy; demonstrate equivalent Material/Tailwind integration.

Out of scope

Replacing the headless core, mandatory layout, full translation catalog/RBAC, recreating #42 delete behavior.

Acceptance criteria

  • Both adapters demonstrate configurable labels and accessible keyboard/focus behavior.
  • Layout works with a fake DataProvider and no Supabase import.
  • Existing users can continue using forms/tables without layout.
  • Browser tests verify focus after confirmation, live feedback and responsive navigation.

Notes for the dev

Touch adapter components/docs and demo composition. Evaluate actual adopter feedback before starting; keep this later rather than inflating 0.1.0.

Rules: no code comments, no any/$any; standalone components, signals and inject(). Core production imports only @angular/core and local core modules, never router/common/forms/UI. Other Pidrang libraries depend only on core, except @pidrang/cli-supabase which depends on @pidrang/cli as per the package graph in CLAUDE.md; apps compose adapters. Use conventional commits. For UI changes, validate with Playwright against pnpm exec nx serve demo-material and pnpm exec nx serve demo-tailwind; record tested paths and failures. Also validate generated UI in an external consumer fixture when affected.

Depends on

  • #43
  • #61
Ngôn ngữ chính
TypeScript
Star
2
Fork
2
Merge trung bình
9 giờ 17 phút
Pull request đã merge (30 ngày)
48

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pidrang/pidrang

Tất cả issue của pidrang/pidrang

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.