Tag-union implementation?

Continuing the discussion from Tags: category restrictions, tag groups, relationships:

I’m interested in building a tag union capability that would mimic how tag intersections are currently implemented (Tag intersections page): essentially the same result as intersections (the default category/Latest view), but doing an OR on multiple tags rather than an AND. I would appreciate any suggestions as a new Discourse developer.

My thoughts (so far) are as follows:

  • Searching on multiple tags via the search page essentially provides tag-union functionality (Does multiple tag search support AND vs OR?). The problem is that I don’t want the search results view – I want the default category page. Could search results be redirected to accomplish this?

  • If search results can’t be redirected, I’m open to attempting a /tags/union/ route (and have been looking into how intersection works). I would prefer to do this via plugin, but I am concerned that that is not something that could currently be accomplished via a plugin. Any suggestions here would be appreciated.

If there is sufficient user interest to add a tag-union capability into the Discourse core, I’d be willing to do it and submit a PR, but I’m hoping to find an alternative. Thanks in advance.

4 Me gusta

Not sure this counts as sufficient user interest, but intending to revive this discussion to see if users/team are interested.

Thoughts? @daniel

1 me gusta

¿Ha habido alguna actualización sobre esto? Sería muy útil tener una ruta /tags/union.

1 me gusta

Ya lo tenemos, al menos en forma de ruta:

https://meta.discourse.org/?tags[]=screen-reader&tags[]=accessibility

A largo plazo, estamos pensando en crear una interfaz de usuario para filtrar y ordenar de forma más limpia las listas de temas.

4 Me gusta

Recibo una lista de temas vacía al hacer clic en la URL proporcionada:

¿Podría haber algún problema?

Sí, nuestro router Ember necesita conocer esta ruta (cc @david)

Funcionará si navegas directamente a la URL.

2 Me gusta

¿Necesito ejecutar ./launcher rebuild app para tener esta actualización en mi instancia autoalojada?

Esperaría hasta que arreglemos el enrutamiento del lado del cliente.

1 me gusta

La creación de matrices de parámetros de consulta utilizando la sintaxis paramName[] es algo específico del framework backend, y no creo que Ember lo admita de forma nativa. Podríamos hacer que funcione, pero solo eché un vistazo rápido a la implementación del lado del servidor del filtro tags y parece que también admitimos una lista separada por espacios.

Por lo tanto, este enlace ya debería funcionar sin una recarga completa de la página: https://meta.discourse.org/?tags=screen-reader+accessibility

2 Me gusta

Esto es muy bueno. Sin embargo, la página no mantiene las restricciones cuando se selecciona una categoría desde la esquina superior izquierda. Para las páginas con etiquetas únicas, esto funciona como se esperaba.

Por ejemplo, si estoy en /tag/tag1 y elijo site-feedback desde la esquina superior izquierda. Muestra /tags/c/site-feedback/2/tag1.

Con /?tags=tag1+tag2, simplemente me redirige a /c/site-feedback/2.

¿Es posible tener esta funcionalidad?

Supongo que esto también se solicitó en estos dos temas:

1 me gusta

Ese tipo de cosas no está soportado en este momento, pero es algo que estamos pensando en mejorar a largo plazo

3 Me gusta