Componente de tema de ubicaciones de salidas de plugins (obsoleto)

:mega: the ability to debug plugin outlets is now included in core. Check out this topic for more details

Original theme component info

Continuing the discussion from Plugin Outlet Locations:

I needed an updated version with all the plugin outlets that have been added recently and then I realised that it would be really easy to create a theme component for this, so there is no need to install a plugin any more.

Repository: GitHub - communiteq/plugin-outlets-theme-component

The repository includes a script (gen/generate.rb) that will auto-generate the outlets based on the Discourse source code.

To toggle the plugin outlets, click the “connector” icon in the top right.

When you click a specific plugin outlet, the display will change and you will be able to see all the arguments to the plugin outlet. Click it again to change it back.

firefox_whjNGBiVSB

Install this theme component

Theme preview: Theme Creator

63 Me gusta

Didn’t @Mittineague write something like this before?

1 me gusta

Yes, see the link at the very top of this topic, that refers to the topic about that. @Mittineague wrote a plugin in 2015. I was using it and then I found out that it needed to be updated (it hadn’t been updated for over 2 years).

The next step was me realizing that this could be done much easier now using a theme component.

7 Me gusta

Yes, I had started to update the plugin to take into account the changes in the number and locations of plugin outlets a few weeks ago, but other priorities moved it down on my ever growing todo list.

If the same information can be provided as a theme component that works in the GUI and doesn’t require editing app.yml and running launcher I think it would be easier for most. I may be wrong, but I have a feeling most prefer GUI over CLI.

6 Me gusta

I use this theme component (and the theme preview) a lot since I develop a few themes but I never thanked @RGJ

I can’t say how much time this theme component helped me save, but it’s a lot. Great job, very very useful.

10 Me gusta

I’m getting a “Bad Gateway” error when trying to install the component. Also when trying to paste the generated content into head_tag.html manually.

Is there a length limit for that file? Because it works fine when I split the content into two separate files.

There is no length limit (at least not one that is close to the current length of the file).

The theme component does take a while to install, your server might be not fast enough and time out because of the large number of plugin outlets / script fragments that are being used.

2 Me gusta

Me encontré agregando/eliminando este tema durante el desarrollo para conocer los puntos de conexión de los complementos. Para facilitar esto en mi entorno de desarrollo, agregué un botón de alternancia para activar/desactivar la visibilidad de los puntos de conexión de los complementos. Quizás otros lo encuentren útil, así que creé una PR para esto.

13 Me gusta

Esto es brillante. ¡Gracias!
PR fusionado.

9 Me gusta

¡Idea brillante! Me encanta el icono del botón del plugin :slight_smile:

Solo un problema, parece que si te mueves a diferentes rutas, el interruptor en la parte superior puede desincronizarse con las salidas de contenido, por lo que nunca puedes tener todo activado o desactivado al mismo tiempo :sweat_smile: (lo cual en mi caso fue útil, pero probablemente no sea deseable en general?).

2 Me gusta

@merefield
Aah sí, tienes razón. :sweat_smile: Cambié a añadir una clase al body para alternar la visibilidad y parece que lo ha resuelto. PR aquí:

6 Me gusta

¿Qué me falta? He instalado el componente. Pero, ¿aún necesito ejecutar el script para que esto funcione? ¿Está el script en mi servidor en algún lugar donde pueda ejecutarlo? ¿O necesito copiar y pegar? Si modifico common/head_tag.html, ¿necesito volver a ponerlo para deshabilitar este componente?
:folded_hands:

El script es solo para el mantenimiento de plugins, no lo necesitas.

Simplemente instala el componente del tema, agrégalo a tu tema principal y presiona el ícono de “conectar”.

firefox_jDikn4jVrC

6 Me gusta

Hay un pequeño error cuando se usa junto con Custom Header Links (icons).
Hacer clic en un icono de encabezado personalizado activa el botón de salida:

1 me gusta

Hay un pequeño error con la nueva tarjeta de usuario como componente temático. No estoy seguro de si ocurriría cuando se envíe en el núcleo (si es así). Aún así… las salidas en la tarjeta de usuario experimental todavía aparecen cuando las salidas están desactivadas:

Por cierto, si no lo he dicho antes, este componente temático es absolutamente increíble.

2 Me gusta

Sí, puedo reproducirlo, ¡gracias por informar de esto! :+1:

Enviaré una nueva versión del componente del tema a principios de la próxima semana, tendrá nuevas salidas para 3.1 y una solución para este error.

3 Me gusta

¿Puedo sugerir una configuración? Elegir el color de fondo. Me alegra que el “rojo brutal” se haya cambiado a un “verde llamativo”, pero personalmente, me gustan los colores apagados. :slight_smile:

(Puedo hacer un PR, sin embargo)

4 Me gusta

¡Nueva versión!

  • Actualizado con todos los PluginOutlets de la 3.2beta
  • Colores configurables
  • Haz clic en un outlet para ver los parámetros reales :fire:

firefox_whjNGBiVSB

13 Me gusta

Parece que tiene un pequeño error, ahora está habilitado por defecto en cada actualización de página en mi PC, y está generando algunas deprecaciones:

[THEME 105 'Plugin Outlet Locations'] Aviso de deprecación: El widget header-icons ha sido obsoleto y decorateWidget ya no es una anulación admitida. [obsoleto desde Discourse v3.3.0.beta1-dev] [id de deprecación: discourse.header-widget-overrides] [info: https://meta.discourse.org/t/296544]
[THEME 105 'Plugin Outlet Locations'] Aviso de deprecación: El widget header-icons ha sido obsoleto y attachWidgetAction ya no es una anulación admitida. [obsoleto desde Discourse v3.3.0.beta1-dev] [id de deprecación: discourse.header-widget-overrides] [info: https://meta.discourse.org/t/296544]
1 me gusta

¡Ah, gracias por informarme @Firepup650 ! :+1:
Solo revisé mis plugins contra esa depreciación y olvidé mis componentes de tema.

He lanzado una actualización para solucionar esta depreciación.

También actualizaré el componente para incluir algunos outlets de plugins más recientes en breve, pero eso lleva más tiempo debido a los nuevos outlets de envoltura.
También he actualizado el componente para incluir los últimos outlets de plugins, excepto los outlets de envoltura, ya que esos necesitan más tiempo / refactorización.

8 Me gusta