Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two changes to Polls.
Control limits.
managePollshides the Create Poll section and each poll's Edit and Delete, read fromhideat 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
localStoragepollWidget_currentUser, so each browser voted as someone else and site data wiped it. It is now a device-scoped manifest setting,voter, written throughHomeGlow.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 rendersvoteras a text field under the plugin; its label says the widget sets it.Verified on our production display.