Add the Shipping Cutoff e-commerce template (`ecommerce-shipping-cutoff`)

Đang mở
#451 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 2 ngày

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
78/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
design

Hướng nghiên cứu

Start with src/templates/event/countdown.ts for the date block and src/templates/ecommerce/coupon-code.ts for optional promotional content. Create src/templates/ecommerce/shipping-cutoff.ts, then re-export it from src/templates/ecommerce/index.ts and register it in src/templates/registry.ts. Done means the template handles blank options, centering, font shrinking and truncation, and readable light backgrounds as listed in the acceptance criteria.

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

Mô tả

good first issue templates

Part of #5. For stores posting the last day to order before a holiday or a launch date, which is most of December for anyone who ships physical things.

Idea
A calendar-style date block on the left, the month on top ("DEC") and the day large under it ("18"). On the right, the heading ("Last day to order for holiday delivery") and up to three shipping options, each a method and its own cutoff on one line: "Standard / Order by Dec 15", "Express / Order by Dec 19", "Next day / Order by Dec 21". An optional note under the options ("Free gift wrap on every order") and the store name at the bottom.

The dates are plain text the user types. The template shouldn't work out "3 days left" or anything else from today's date, since a render has to give the same image every time.

Template details

  • File: src/templates/ecommerce/shipping-cutoff.ts, id ecommerce-shipping-cutoff
  • Fields: commonFields.title, month (text, "DEC"), day (text, "18"), method1 to method3 and cutoff1 to cutoff3 (text, optional, defaults above), note (text, optional), commonFields.siteName, commonFields.bgColor, commonFields.accentColor, commonFields.textColor

Where to look

  • Closest references: src/templates/event/countdown.ts (the month and day block), src/templates/ecommerce/coupon-code.ts (a store promo with an optional expiry line)

Acceptance criteria

  • An option with a blank cutoff is skipped with no gap, an option with a cutoff but no method shows the cutoff on its own, and with no options at all the heading and note sit centered next to the date block
  • A long heading shrinks with autoFontSize() and then truncates, a long method or cutoff truncates on its line, and a three-letter month and a two-digit day always fit inside the date block
  • The date block, options and note read fine on a light background
  • Re-exported in src/templates/ecommerce/index.ts and registered in the E-commerce block of src/templates/registry.ts
  • Meets the shared template checklist in #5

One template per contributor at a time, so more people get a chance.


Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #451 in the description.

Ngôn ngữ chính
TypeScript
Star
8
Fork
4
Merge trung bình
1 ngày 21 giờ
Pull request đã merge (30 ngày)
34

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 codercops/ogcops

Tất cả issue của codercops/ogcops

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.