Create abstract admin classes
まだ誰も着手していません。
評価
調査の方向性
まず Memberships と CSV Import/Export にある既存の専用管理画面実装を確認し、その後 WC_Settings_Page と比較します。メニューページ、タブ、セクション、設定ページの連携、および current_tab と current_section を JavaScript に公開するための共通抽象化を定義します。設計について合意が得られ、フレームワークがプラグイン固有のボイラープレートなしでこれらの要件をサポートできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
A lot of our plugins are using dedicated admin pages outside of WC Settings area. Some plugins simply have a dedicated settings page while others have more complex admin areas with settings, list tables, etc (Memberships, CSV Import/Export). To create those admin areas, a lot of boilerplate code is needed, and each plugin implements things a bit different. This makes it harder to maintain.
We should look into creating some sort of abstraction that would allow plugins to easily register dedicated admin areas/pages/settings, with support for tabs & sections out-of-the-box. This could reduce boilerplate code and provide a more consistent experience & architecture in plugins.
For settings pages, we could probably subclass WC_Settings_Page and make it more generic, to support adding settings pages to other plugin admin areas, rather than to WC Settings.
I would imagine some kind of abstract admin class that would already have all the plumbing required for adding the menu/submenu pages, tabs and sections. The subclass would then simply need to provide a list of tabs & sections and callbacks for rendering those.
Perhaps something like
Admin_Area extends SV_WC_Admin_Area {
public __construct() {
$this->tabs = array(
'tab_1' => array(
'label' => __( 'Tab 1' ),
'sections' => array(
'section_1' => __( 'Section 1' ),
'section_2' => __( 'Section 2' ),
),
),
'tab_2' => __( 'Tab 2' ),
);
}
public function render_tab_1( $current_section ) {
// .. render the tab...
}
}
In summary, some of the features that would be nice:
- a common structure for adding dedicated admin areas/pages
- built-in support for tabs and sections
- built-in support for the plumbing required for settings pages
- making
current_tab&¤t_sectionavailable in JS (similar topagenow)
- 主要言語
- PHP
- スター
- 146
- フォーク
- 43
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
godaddy-wordpress/wc-plugin-framework のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
godaddy-wordpress/wc-plugin-framework#806 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 52/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
Google Pay Missing Environment Variable対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンGoogle Pay JavaScript
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
-
i18n Needs Reporter Feedabck
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
godaddy-wordpress/wc-plugin-framework#536 · コメント 1 件 ·
godaddy-wordpress/wc-plugin-framework の issue をすべて見る
似ている issue
-
Bug-Report
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
RSS-Bridge/rss-bridge#5158 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
octobercms/october#6150 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
flarum/framework#5301 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Add TuneIn-DirMon in the bot list対応中かも @liviuconcioiu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
matomo-org/device-detector#8424 ·
メンテナーはふだん 1 日以内に返信