Imrovement: Consolidate definition of type-Attribute for JavascriptHeaderItems

オープン
#1,881 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
25/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
java
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Java
スター
800
フォーク
437
平均マージ
21時間 36分
マージ済み PR(30日)
167

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/wicket のほかの issue

apache/wicket の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。