Skip to content

feat(polls): hideable management gates as a device-scoped setting - #15

Open
mrramam wants to merge 2 commits into
jherforth:mainfrom
mrramam:feat/polls-control-limits-and-voter-setting
Open

mrramam wants to merge 2 commits into
jherforth:mainfrom
mrramam:feat/polls-control-limits-and-voter-setting

Conversation

@mrramam

@mrramam mrramam commented Sep 16, 2026

Copy link
Copy Markdown

Two changes to Polls.

Control limits. managePolls hides the Create Poll section and each poll's Edit and Delete, read from hide at parse time, TastyTiles shape. Switch User is deliberately not hideable: on a shared display, switching voters is how a poll works, and Wall display would have hidden it for good (c4f7817).

Voter identity. The current voter was localStorage pollWidget_currentUser, so each browser voted as someone else and site data wiped it. It is now a device-scoped manifest setting, voter, written through HomeGlow.settings. On first load with an empty setting, the browser value is imported once and the browser key kept as a fallback copy, the same convention as the Countdown migration. Without the SDK the old path is unchanged. Side effect: the Admin Panel renders voter as a text field under the plugin; its label says the widget sets it.

Verified on our production display.

…ped setting

Two controls a display can hide: managePolls removes the Create Poll
section at parse time and leaves Edit and Delete out of each poll, with
the handlers behind them inert; switchUser removes the Switch User
button while the first profile pick still happens through the grid, so
a display can vote without being able to change who is voting.

The voter used to live only in localStorage, per browser and gone with
cleared site data. It is now a device-scoped setting on the platform,
imported once from the browser key, which stays as a fallback copy and
as the whole path when there is no plugin identity or the settings call
is rejected.
On a shared display, switching voters is how a poll works. Declaring it
as a hideable control meant a Wall display would hide it for good and
leave the first person to touch the screen as the only voter. Only
managePolls stays declared.
@mrramam mrramam changed the title feat(polls): hideable management gates, and the voter as a device-scoped setting feat(polls): hideable management gates as a device-scoped setting Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants