Componente del Tema Quick Quote

:information_source: Sintesi In breve: modifica il comportamento dei pulsanti “Rispondi al post” (non “Rispondi all’argomento”) per citare automaticamente un post con un singolo clic.
:hammer_and_wrench: Collegamento al Repository 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: Guida all’installazione Installing a theme or theme component
:heart: Sponsorizzazione Si prega di considerare la possibilità di diventare un sponsor continuo del mio lavoro open source a un livello adatto alle risorse e alle esigenze tue o della tua organizzazione, per garantire che questo componente riceva la manutenzione che merita e continui a funzionare per il tuo sito in futuro.

Ti piace questo componente del tema? Per favore metti :star: su GitHub

Cosa fa

In breve: modifica il comportamento dei pulsanti “Rispondi al post” (non “Rispondi all’argomento”) per citare automaticamente un post con un singolo clic.

Sono disponibili diverse impostazioni per affinare cosa viene citato e quando. È persino possibile specificare l’annidamento delle citazioni per quel senso “old skool”.

Poiché la citazione automatizzata viene inviata al Compositore, puoi modificarla manualmente da lì se lo desideri (anche se questo in un certo senso vanifica la parte “veloce” :snail:).

Non modifica il comportamento del pulsante “Rispondi all’argomento” in basso, né lo strumento di citazione.

Perché

  • Alcuni hanno ritenuto che l’atto di citare richieda troppi clic nell’installazione base. Questo è un problema maggiore sui dispositivi touch.

  • La “citazione automatica” è particolarmente utile quando la risposta è a un post risalente a molto tempo fa. Questo plugin conta quanto lontano nel passato si trovi il post di riferimento e inserirà automaticamente una citazione se è sufficientemente lontano. Questo aiuta le persone a comprendere il contesto un po’ più velocemente.

  • Ripristina le “Citazioni Annidate”! (disattivate per impostazione predefinita) Il componente potrebbe essere particolarmente attraente per coloro che sono abituati ad alcune delle vecchie piattaforme forum “old skool” :space_invader: ed è una questione di gusto: se ti piace vedere citazioni annidate, ora puoi farlo, ma tieni presente le conseguenze sullo spazio!

Non ti serve se

Sei completamente soddisfatto del comportamento predefinito di “Rispondi al post dell’argomento”. Lo sono anch’io, ma è fantastico avere delle opzioni, vero?

Impostazioni

quick_quote_post_location_threshold: “Numero di post indietro prima che la citazione rapida sia abilitata.”

Controlla quanto indietro deve essere un post prima che venga attivata la citazione automatica. Evita citazioni non necessarie di post recenti.

quick_quote_remove_links: “Rimuovi tutti i collegamenti (incluse le immagini) dalle citazioni”

Pulisce le cose e migliora l’utilizzo dello spazio.

quick_quote_remove_prior_quotes: “Rimuovi tutte le citazioni precedenti (annidate)”

Abilitato per impostazione predefinita. Disattiva questa impostazione per l’esperienza definitiva di citazioni annidate “old skool”. (Scusa Jeff! :wink: )

quick_quote_remove_contiguous_new_lines: “Rimuovi le nuove righe non necessarie”

Le nuove righe sono sopravvalutate.

quick_quote_character_limit: “Limite di caratteri per la citazione (usa gli ultimi x caratteri se la lunghezza totale è maggiore)”

Gli estratti sono piuttosto basilari :slight_smile: Torna allo strumento di citazione se hai bisogno di una citazione più mirata (che non viene sovrascritta dal plugin).

Limitazioni note

Non supporta la nuova modalità di testo ricco del Compositore. Gli aggiornamenti al core sembrano aver risolto il problema?

Il componente del tema è abbastanza semplice nel modo in cui gestisce la preparazione di una citazione. Alcune impostazioni funzionano meglio insieme rispetto ad altre ed è compito dell’amministratore determinare cosa funziona per loro. Viene evitata una certa complessità, ad esempio esiste un limite di caratteri per gli estratti che può spezzare le parole a metà. La formattazione è semplificata poiché i tag vengono rimossi per evitare il rischio di troncare un tag e causare corruzione: anche questo è fatto per raggiungere la semplicità. L’elaborazione delle citazioni si basa pesantemente sulle espressioni regolari, non tutte completamente infallibili, ma funzionano “abbastanza bene”. Queste potrebbero essere affinate durante la vita del componente del tema.

Questo è stato recentemente portato dal mio Plugin identico, ma potrebbe aver acquisito bug in quel processo. Fammi sapere se ne incontri.

Il mio sponsor e l’ispirazione per questo componente

Si prega di ringraziare @Merlls_Rizzini per aver sponsorizzato questo lavoro. La funzionalità è un riassunto delle idee di entrambi ed è parzialmente ispirata da questo post di @eesty.

NB Questo si basava sul mio Plugin Fast Quote, ma è stato spostato in un formato di componente del tema per dare accesso a più amministratori di siti se ospitati da terze parti. @sam ha suggerito di convertirlo in un componente del tema poiché non c’era alcun componente back-end e @sully mi ha dato l’ultima spinta per spostarlo, avendo creato la sua versione del tema.

Tutti i feedback sono benvenuti.

37 Mi Piace

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 Mi Piace

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 Mi Piace

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 Mi Piace

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 Mi Piace

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

1 Mi Piace

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 Mi Piace

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 Mi Piace

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 Mi Piace

in a random thread

this site doesn’t show version like my self hosted

1 Mi Piace

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 Mi Piace

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 Mi Piace

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 Mi Piace

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

1 Mi Piace

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 Mi Piace