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

Abierto
#5,456 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
laravel, php
Área
api, backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
PHP
Estrellas
6.8k
Forks
891
Merge medio
1 d 10 h
PR fusionados (30 d)
209

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de flarum/framework

Todos los issues de flarum/framework

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.