Button state more flexible, beyond boolean #345
joaociocca
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem? Please describe.
From what I read and messed around with, button states are only boolean: on and off. Would be nice if we could customize them to allow string states.
Describe the solution you'd like
One example for this is, again another example using Spotify plugin, different buttons for different loop states. There, loop states in the
spotify_playing_loop
variable are: Context (for playlists), Track (for single music repeat) and off.Describe alternatives you've considered
I dug a little around how Cottle works and came up with a bit of a snippet that displays "Playlist", "Track" or "Off" for the Repeat button:
I put that code on the "on" state along with a Repeat icon, and removed everything from off. But allowing strings in states would be a bit more user-friendly.
Beta Was this translation helpful? Give feedback.
All reactions