List page delete-failure markup is duplicated between own and earlier failure blocks

Đang mở Phù hợp với người mới
#95 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
67/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
angular, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Đọc các template ResourceListPage trong apps/demo-material và apps/demo-tailwind, sau đó so sánh chúng với tệp được tạo src/app/pages/resource-list-page.ts. Tìm phần markup báo lỗi theo từng danh mục bị lặp trong các khối deleteFailure() và earlierDelete.failure(). Tách phần đó thành một ng-template dùng chung và render từ cả hai khối; hoàn tất khi các thông báo giống nhau vẫn xuất hiện trong từng trường hợp lỗi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

layer: demo pkg: cli refactor

Noticed in review of #93.

ResourceListPage's template (both apps/demo-material and apps/demo-tailwind, plus the generated src/app/pages/resource-list-page.ts) now has two separate blocks that render the same unauthenticated/forbidden explanation: one for deleteFailure() (the page's own failed delete) and one for earlierDelete.failure() (an earlier delete that settled after a round trip). The category-specific markup (sign-in link or "not allowed" text) is copied verbatim between the two.

The own-failure block already had this shape before #93; #93 just adds a second copy for the earlier-failure case.

Suggestion: factor the category message into a shared <ng-template #failureDetail let-failure> and render it via ngTemplateOutlet from both blocks, so a wording change only needs to happen once. Same shape would apply to create/edit's own SaveFailure rendering if the two end up converging later.

Not urgent, purely a maintainability nit - no behavior is affected.

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.