Imrovement: Consolidate definition of type-Attribute for JavascriptHeaderItems

Đang mở
#1,881 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
25/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
backend

Hướng nghiên cứu

Read the JavaScript header item classes named in the issue: JavaScriptReferenceType, JavaScriptContentType, JavaScriptBrowserProcessedContentType, and JavascriptHeaderItem. The issue says a pull request was prepared for Wicket 10 at https://github.com/apache/wicket/pull/1882; review that work to understand the proposed consolidation. The work is complete when the type attribute is defined consistently for all JavaScript header item subclasses.

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

Mô tả

There are two implementations for the same task: defining a value for the "type"-Attribute of a script-Tag:

  1. org.apache.wicket.markup.head.JavaScriptReferenceType for AbstractJavaScriptReferenceHeaderItem (and subclasses)
  2. org.apache.wicket.markup.head.JavaScriptContentType and org.apache.wicket.markup.head.JavaScriptBrowserProcessedContentType for JavascriptContentHeaderItem

Observation: all subclasses of JavascriptHeaderItems have (their own) solution to define a value for the "type"-Attribute

Conclusion: define the value for the "type"-Attribute in JavascriptHeaderItem - similar to the "id"-Attribute.

I personally like the style of the 2nd way with interface org.apache.wicket.markup.head.JavaScriptContentType but prefer to implement Constants directly in the Interface-Class.

I prepared a PR for this based on the Wicket 10 - Branch https://github.com/apache/wicket/pull/1882

Ngôn ngữ chính
Java
Star
800
Fork
437
Merge trung bình
21 giờ 36 phút
Pull request đã merge (30 ngày)
167

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 apache/wicket

Tất cả issue của apache/wicket

Issue tương tự

Thêm issue về Java

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.