Defina um temporizador de tópico para fechar um tópico em x dias
Feche o tópico manualmente
Você pode ver uma linha ainda mostrando que o tópico será fechado em x dias
Clique no ícone de lixeira nisso e você receberá uma mensagem de erro:
Obviamente, é um problema muito pequeno, adoro o Discourse e tudo o que vocês estão fazendo, mas achei que valia a pena mencionar Obrigado
5 curtidas
sam
(Sam Saffron)
Dezembro 22, 2023, 2:24am
2
Obrigado por levantar a questão, coloquei pr-welcome nisso caso um membro da comunidade queira explorar uma correção.
2 curtidas
TurtleStack
(Shane Scanlon)
Fevereiro 7, 2024, 5:29pm
3
Tenho interesse em implementar uma correção para isso. Sou novo aqui, existe um processo de atribuição para tópicos pr-welcome ?
3 curtidas
Olá e bem-vindo! Seu comentário dizendo “trabalhando nisso” é suficiente para o processo de atribuição - Envie seu PR para o GitHub quando estiver pronto, e poderemos dar uma olhada
3 curtidas
TurtleStack
(Shane Scanlon)
Fevereiro 7, 2024, 9:47pm
6
O PR foi enviado. Obrigado!
main ← turtlestackdev:fix/topic_timer_visible_after_status_toggle
opened 09:46PM - 07 Feb 24 UTC
Fix for https://meta.discourse.org/t/minor-ui-bug-with-manually-closing-a-topic-… that-has-a-topic-timer-set-for-auto-close-in-the-future/289482
When an auto close/open timer is set and the user manually opens/closes the topic, the timer info remains displayed until the page is refreshed.
The changes here fix that by adding a `@statusUpdate` property to the timer info within the topic template.
The `@statusUpdate` property is read in the `topic-timer-info` component. When this value is defined, and the timer `statusType` matches the the topic status, the timer info `showTopicTimer` and `executedAt` values are set to null. The latter is modified to prevent the info from being incorrectly displayed if the user toggles the status back to open.
The `@statusUpdate` property is set to the value of the topic `topic_status_update` which is undefined by default. After the topic controller `toggleClosed` function finishes, this value is updated with the return value from the API. This in turn triggers another render of the `topic-timer-info` component which now has the information it needs to hide itself.
This does trigger an additional render of the timer info after the hooks are fired, but I felt it was acceptable.
Three acceptance tests have been added to topic-edit-timer-test.js.
- auto-close timer is hidden after manually closing the topic
- auto-open timer is hidden after manually opening the topic
- auto-close timer is hidden after manually closing and then re-opening the topic
The topic test fixture needed a minor adjustment to enable toggling the topic status.
5 curtidas