this post was submitted on 12 Feb 2024
97 points (98.0% liked)

Programming

17326 readers
202 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 4 points 8 months ago (1 children)

Light switches are a bad example. Up doesn't mean on and down doesn't mean off when you have multiple switches for the same thing.

These switches visibly have 2 states and switching it means you want the other one. In tech it's less obvious that there are only two states and that toggling the button will do something in particular. Recall the play and pause button on your media app. That button could change the state in any number of ways but in order to convey to the user what will happen BEFORE the button is pressed, the player shows what action will take place.

You're already in the current state, that rarely adds info. Toggles should indicate what they will do.

[โ€“] [email protected] 1 points 8 months ago

When I think "toggle" switch, I think in terms of binary states: on or off. Which is why I used a light switch as an example rather than a media play/pause button which can have multiple states. In that scenario, yes, it would be more intuitive for the button to display the action it will perform.

Up doesn't mean on and down doesn't mean off when you have multiple switches for the same thing.

A close-up of a light switch showing the label for off