Componente de Tema para Cotización Rápida

:information_source: Resumen Simplemente: cambia el comportamiento de los botones de Responder a la Publicación (no a la Respuesta del Tema) para citar una publicación automáticamente con un solo clic.
:hammer_and_wrench: Enlace al Repositorio GitHub - merefield/discourse-quick-quote: A Theme component to change the behaviour of the Post Reply buttons to quote a Post automatically in a single click. · GitHub
:open_book: Guía de Instalación Installing a theme or theme component
:heart: Patrocinio Por favor, considera convertirte en un patrocinador continuo de mi trabajo de código abierto en un nivel que se ajuste a los recursos y necesidades tuyos o de tu organización para asegurar que este componente reciba el mantenimiento que merece y siga funcionando en tu sitio en el futuro.

¿Te gusta este Componente de Tema? Por favor, dale una :star: en GitHub

Qué hace

Simplemente: cambia el comportamiento de los botones de Responder a la Publicación (no a la Respuesta del Tema) para citar una publicación automáticamente con un solo clic.

Hay varias configuraciones para refinar qué se cita y cuándo. Incluso puedes especificar la anidación de citas para ese toque “old skool”.

Dado que la cita automatizada se envía al Compositor, puedes refinarla manualmente desde allí si lo deseas (aunque eso derrota un poco la parte de “rápido” :snail:).

No cambia el comportamiento del botón de Respuesta del Tema inferior, ni de la herramienta de Citas.

Por qué

  • Algunos han sentido que el acto de citar requiere demasiados clics en la instalación base. Esto es más problemático en dispositivos táctiles.

  • La “cita automática” es particularmente útil cuando la respuesta es a una publicación bastante antigua. Este plugin cuenta cuántas publicaciones atrás se encuentra la publicación referenciada e introducirá automáticamente una cita si está lo suficientemente atrás. Esto ayuda a las personas a entender el contexto un poco más rápido.

  • ¡Trae de vuelta las “Citas Anidadas”! (desactivado por defecto) El Componente puede ser particularmente atractivo para aquellos acostumbrados a algunas de las plataformas de foros “old skool” :space_invader: y es una cuestión de gusto: si te gusta ver citas anidadas, ahora puedes hacerlo, pero ten en cuenta las consecuencias para el espacio.

No lo necesitas si

Estás 100% satisfecho con el comportamiento de Respuesta a Publicaciones del Tema fuera de la caja. Yo lo estoy, pero es genial tener opciones, ¿verdad?

Configuraciones

quick_quote_post_location_threshold: “Número de publicaciones atrás antes de habilitar la cita rápida.”

Controla cuán atrás debe estar una publicación antes de que se active la cita automática. Evita citas innecesarias de publicaciones recientes.

quick_quote_remove_links: “Eliminar todos los enlaces (incluidas imágenes) de las citas”

Limpia las cosas y mejora el uso del espacio.

quick_quote_remove_prior_quotes: “Eliminar todas las citas anteriores (anidadas)”

Activado por defecto. Desactiva esta configuración para la experiencia definitiva de citas anidadas old-skool. (¡Lo siento Jeff! :wink: )

quick_quote_remove_contiguous_new_lines: “Eliminar saltos de línea innecesarios”

Los saltos de línea están sobrevalorados.

quick_quote_character_limit: “Límite de caracteres de la cita (usa los últimos x caracteres si la longitud total es mayor)”

Los extractos son bastante básicos :slight_smile: Vuelve a la herramienta de Citas si necesitas una cita más específica (que no es anulada por el plugin).

Limitaciones conocidas

No soporta el nuevo modo de Texto Rico del Compositor. Las actualizaciones del núcleo parecen haber resuelto el problema?

El Componente de Tema es bastante simple en la forma en que maneja la preparación de una cita. Algunas configuraciones funcionan mejor juntas que otras y depende del administrador determinar qué funciona para ellos. Se evita cierta complejidad, por ejemplo, hay un límite de caracteres del extracto que puede dividir palabras a la mitad. El formato se simplifica ya que se eliminan las etiquetas para evitar el riesgo de truncar una etiqueta y causar corrupción; nuevamente, esto es para lograr simplicidad. El procesamiento de citas depende en gran medida de expresiones regulares, no todas las cuales son completamente a prueba de fallos, pero funcionan “suficientemente bien”. Estas pueden refinarse a lo largo de la vida del Componente de Tema.

Esto fue portado recientemente desde mi Plugin idéntico, pero puede haber recogido errores en ese proceso. Avísame si encuentras alguno.

Mi patrocinador y la inspiración para este Componente

Por favor, agradece a @Merlls_Rizzini por patrocinar este trabajo. La funcionalidad es un vertido de ideas de ambos y está parcialmente inspirada en esta publicación de @eesty.

NB Esto se basó en mi Plugin Fast Quote, pero se movió a un formato de Componente de Tema para dar acceso a más administradores de sitios si están alojados por un tercero. @sam sugirió que esto se convirtiera en un Componente de Tema ya que no había ningún componente de back-end y @sully me dio el empujón final para mover esto después de crear su propia versión del Tema.

Todas las opiniones son bienvenidas.

37 Me gusta

If I’d of not skip read that I’d of spent less time trying to figure out the value,

I like it :+1:

3 Me gusta

Would be cool if you could use this by category, would love to have it in our AMA category, but otherwise it would be kinda messy.

3 Me gusta

A recent Git commit to topic.js seems to have broken this theme component:

Quote.build() no longer exists; they seem to be importing and using the buildQuote() function instead. A quick substitution didn’t do the trick; will have to ponder this a bit more.

2 Me gusta

My bad! The quick quote plugin wasn’t on the all-the-plugins list so I missed it when looking for regressions. I’ll add it and I’ve opened a PR with a fix to the plugin:

(plus a small fix to settings: FIX: Setting descriptions were swapped by cvx · Pull Request #2 · merefield/discourse-quick-quote · GitHub)

5 Me gusta

Awesome, thanks Jarek (and thanks for reporting @sully!) , merged! (and thanks for the bug fix!)

1 me gusta

I am running this theme, did the update yesterday and getting complaints today

upon creating a post to reply and explain I found if I’m replying to a post and I go up to another and
want to reply in whole I can not, the reply remains on the post I started with,

previously it would toggle, the quick quote still works though

For my full comprehension, would you mind breaking that down a bit more … can you explain it in finer steps and where you believe it goes wrong?

1 me gusta

Yeah its being discussed now and the inability to hit reply any further up than 3 posts is likely going to be one of those haunting, need to explain over and over problems

Quick quote is great, but can the reply function be restored?

I’m still not following you. Can you please go into greater detail and more steps?

I’ve retested the Component locally and it seems to be behaving fine?

1 me gusta

No problem, and maybe I’m misinterpreting function or some other oversight

but right now as it stands if I go up in a thread 4 posts in a thread the reply button is disabled,

this was only mentioned today and yesterday I did the update

So I believe its related, maybe there’s a setting involved?

Can you show me your Theme settings?

Can you also confirm you are on the latest discourse version and latest version of the Theme Component?

Also, can you please let me know if you see any Javascript errors on the console?

1 me gusta

in a random thread

this site doesn’t show version like my self hosted

1 me gusta

Thanks.

OK so I’ve set my settings the same and cannot replicate. The Reply button 4 posts back is working fine.

That’s highly suspicious though given your settings. (The ‘3’ jumps out!)

I’m on the latest version of Discourse and the TC. Make sure you are fully updated on both.

1 me gusta

view source says Discourse 2.5.0.beta2

and TC is theme component?

image

changing 3 to 5 allows me to reply up to the 5th post

so do I do a 9999 and does that short any other function?

OK so I’ve replicated your issue on a Production site …

v2.5.0.beta2 +459

Those changes that Jarek submitted were very specfically targetting the latest version of Discourse.

Is it possible you are on a Discourse commit prior to his changes? If so, it will not work with the latest TC. You need to upgrade both or neither.

Moreover, I’ve just upgraded that site (to latest-release +495) and all is well again.

So yeah, you need to upgrade your Discourse past his commit.

1 me gusta

Can you provide any css I can use to roll back?

then I’ll remove it after my site is updated?

Thank you :slightly_smiling_face:

or

@team is my site do for an update soon?

Ah, good idea, except I don’t think you can access the javascript folder contents from the UI (someone please correct me if I’m wrong!).

Unfortunately I don’t believe you can install a specific commit of a Theme Component either (ditto!).

So my suggestion is, yeah, change that 3 to 9999 and wait until your Discourse is more up-to-date.

1 me gusta

Can do, no worries and thanks for the cooperation, its greatly appreciated :+1:

1 me gusta

Hey all you Quick Quoting hip-shooting Discoursers … I’ve released a fix to make Quick Quote work again with latest Discourse.

I’m tracking tests-passed so do not update if you are not on that branch.

3 Me gusta