Timer de Tópico Ao Vivo

This theme component changes the default timed topic timer to a live countdown timer.

29%20PM


Repository Link

https://github.com/paviliondev/live-topic-timer


  • The rerender time can be changed in the component settings according to your use case.

  • The time displayed by the timer can be format in multiple ways from the theme component setting whose documentation can be found here.

To do

  • Display the timer on the header next to the topic title.
    I’m looking for specific UI/UX suggestions for how to implement a header timer, in the context of Discourse, with a view to crowd-funding the development costs if there’s enough interest (@darhazer @tobiaseigen)

Installation

27 curtidas

This doesn’t work since a few days. Can you look at it?

1 curtida

Yes, I’m aware of the fact that some of the code I overrode is changed in core discourse. I’ll take a look at this around mid next week.

cc @angus, @Ellibereth, @darhazer

4 curtidas

Just pushed an update to the component to fix compatibility with latest discourse.

7 curtidas

can this be set on specific categories? i could see this being very useful in combination with the voting plugin.

1 curtida

Currently, it works for all timed topics. @ninjapenguin if you’re are willing to fund the development of this feature, I’ll be happy to add the category specific feature for the component.

In any case, you can join the discussion related to the component here.

1 curtida

i don’t think we need it enough. more a ‘nice to have’ in our use case than a core feature we’d use often. it looks great though, well done.

1 curtida

This theme component is breaking the topic timers interface, unfortunately. Number of days seems to turn into number of seconds, and the blue bar containing the “Replies on this topic are automatically deleted after …” has no next. It then becomes impossible to remove timer. Deleting this theme component made it work again.

Screen Shot 2020-05-07 at 11.12.32 AM

2 curtidas

It needs to be dusted again. I’ll come to this one in the next week. Thanks for reporting. Makes a strong case for bookmark reminders for me.

2 curtidas

Bug com este tema.

1 curtida

Tenho tido a intenção de vir a isso há algum tempo. Vou dar uma olhada na sexta-feira.

1 curtida

Consegui reproduzir isso. Desculpe por não ter chegado a isso antes.

O componente do tema nunca foi testado com temporizadores diferentes do close topic timer, pois foi construído especificamente para esse temporizador, mas o nome sugere que deveria funcionar para todos os tipos de temporizadores de tópicos.

Além disso, não deveria ter afetado nenhuma outra funcionalidade padrão, pelo menos. Estou trabalhando para corrigir isso e retornarei com uma solução em breve.

Este foi meu primeiro trabalho como cliente no Discourse. Traz de volta memórias antigas.

p.s.

Fiz um PR no Topic Timer principal para torná-lo extensível para desenvolvedores de plugins e temas. Sobrescrever o método monolítico pode ser bastante propenso a causar quebras.

cc @martin

4 curtidas

Obrigado pela correção, já a integrei ao núcleo agora :+1:

2 curtidas

Um pouco fora do tópico, mas vale a pena anotar para o futuro:

O prefixo DEV: significa que se trata de uma refatoração relacionada ao desenvolvimento; não precisamos de nada nas notas de lançamento.

FIX: significa correção de bug, que podemos querer destacar nas notas de lançamento.

FEATURE: significa nova funcionalidade (ou remoção de funcionalidade), que podemos querer destacar nas notas de lançamento.

IMPR: é um pouco estranho; não usamos esse prefixo em nenhum lugar.

4 curtidas

É uma memória ruim da minha parte. Eu me lembrei erroneamente de um post do Jeff que explicava esses termos, mas posso imaginar que IMPR não seja um deles. Vou manter isso em mente.

2 curtidas

A boa notícia é que, após o merge, o código está agora mais extensível e sustentável do ponto de vista de desenvolvimento. Vou tentar corrigir o componente na próxima semana.

Obrigado @sam pela dica e @martin pelo merge.

2 curtidas

Isso deve ser resolvido se você atualizar o componente do tema e o Discourse para as versões mais recentes com testes aprovados.

Além disso, agora deve suportar todos os outros temporizadores também. Fico à disposição para corrigir qualquer problema que surgir.