[3.x] Tags: store an order for secondary tags

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
laravel, php
領域
api, backend

調査の方向性

Read the tag ordering implementation for position, POST /api/tags/order, and the admin Tags page, along with the migration that assigns existing tag positions. The issue leaves two product decisions open: where manual ordering applies and how child tags count toward required tag limits. Once those decisions are made, verify secondary tags can be reordered and existing order matches the admin's current name order.

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

説明

needs-discussion type/feature

Secondary tags have no order: the admin lists them by name, and the forum's Tags page and sidebar by number of discussions. This was a deliberate choice in #1549 (so the sidebar can show the three most-used secondary tags). The fix proposed for #5236 disables dragging within the secondary list instead of accepting an order and discarding it.

For 3.0, once extensions identify a tag's kind through isPrimary() / isSecondary() instead of position (#5455), position can mean the order within a tag's own list for every kind.

To do
  • position orders secondary tags too. Secondary tags no longer have a null position, which is a breaking change for anything still checking it.
  • POST /api/tags/order accepts the secondary list as well, and the admin Tags page lets it be reordered again.
  • A migration gives existing secondary tags positions, by name, matching what the admin shows today.
To decide
  • Where the manual order applies: the admin list, the forum Tags page cloud, and the sidebar's "most-used three". Options: always manual; manual with the sidebar keeping its most-used choice; or a setting.
  • Whether the required tag counts should treat child tags as primary, since "primary" now means the whole primary tree. If they do, the primary limits may need separate settings for children.

Related: #3640 and #4065 cover the existing child-tag counting inconsistency.

主要言語
PHP
スター
6.8k
フォーク
891
平均マージ
1日 10時間
マージ済み PR(30日)
209

環境構築

はじめの一歩

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

flarum/framework のほかの issue

flarum/framework の issue をすべて見る

似ている issue

PHP の issue をもっと見る

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

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