discourse/plugins/poll
Robert d8d3d2184a
FIX: Poll: Show gear button only when there is more than one dropdown item (#27775)
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)

relates to #27204

related meta topic:  https://meta.discourse.org/t/what-is-the-gear-button-under-the-poll-for/315477/2
2024-07-11 11:19:04 +08:00
..
app FEATURE: Add Instant Run-off Voting to Poll Plugin (Part 1: migrate existing plugin to Glimmer only) (#27204) 2024-07-04 13:34:48 +02:00
assets FIX: Poll: Show gear button only when there is more than one dropdown item (#27775) 2024-07-11 11:19:04 +08:00
config FEATURE: Add Instant Run-off Voting to Poll Plugin (Part 1: migrate existing plugin to Glimmer only) (#27204) 2024-07-04 13:34:48 +02:00
db DEV: Update to lastest rubocop-discourse 2024-05-27 18:06:14 +02:00
jobs/regular DEV: Apply syntax_tree formatting to `plugins/*` 2023-01-07 11:11:37 +00:00
lib FEATURE: Add Instant Run-off Voting to Poll Plugin (Part 1: migrate existing plugin to Glimmer only) (#27204) 2024-07-04 13:34:48 +02:00
spec FIX: nested polls 2024-05-03 19:46:13 +02:00
test/javascripts FIX: Poll: Show gear button only when there is more than one dropdown item (#27775) 2024-07-11 11:19:04 +08:00
plugin.rb DEV: Do not attempt to update polls if there are no polls before and after (#26573) 2024-04-12 13:16:10 +08:00