O botão de engrenagem deve aparecer para aqueles com privilégios suficientes e destina-se a mostrar a um administrador de enquete uma lista de ações possíveis, por exemplo, para fechar a enquete.
Não deve aparecer para aqueles que não têm ações possíveis.
Praticamente todo o plugin de enquete foi migrado para Glimmer na semana passada.
Isso parece uma regressão menor.
Levantei um PR e pretendo concluí-lo amanhã. (funciona, mas faltam testes unitários)
main ← merefield:poll_cog_button_fix
opened 09:36PM - 08 Jul 24 UTC
relates to #27204
see: https://meta.discourse.org/t/what-is-the-gear-button-… under-the-poll-for/315477/2
During migration of Poll plugin from widget basis to glimmer, some functionality was inadvertently dropped:
* A single button should appear instead of the dropdown menu when there is only one valid "poll admin" action
* No button should appear when there are no valid "poll admin" actions for current user
This PR restores the original behaviour and adds test coverage (that didn't exist prior to migration, partly why it wasn't caught earlier)
8 curtidas