Simple websites are better than beautiful ones. I'll repeat that for the folks in the back. Simple websites are better than beautiful ones. Let me be clear what I mean by a simple website. I don't mean a Wordpress site with a minimalist theme. I also don't mean a Substack …
jadero
link
fedilink
197M

There was a thread elsewhere asking whether a toggle should show current state or the state desired. There was enough disagreement that it quickly became apparent that, whatever else the toggle does, there should be something external to the toggle showing the possible states, indicating which way to move the toggle regardless of toggle appearance.

@starman@programming.dev
link
fedilink
English
4
edit-2
7M

There was a thread elsewhere asking whether a toggle should show current state or the state desired.

there it is

snowe
mod
link
fedilink
47M

that post is about toggle buttons, not switches. e.g. a play pause button, when pressed, does it show play, or does it show pause?

jadero
link
fedilink
27M

Oops! I guess I wasn’t paying close enough attention.

snowe
mod
link
fedilink
27M

still, people are clearly confused by the button. I’m just gonna make it an animation and prefers-color-scheme since that’s so widely supported now.

The disagreement was actually all over whether the question was about a switch or a button, and so some people were answering as though it was a switch, and some people were answering as though it was a button - switches and buttons do indeed have opposite approaches usually (a switch usually shows the current state - such as “on” - but a button shows what action will be triggered by pressing it, such as “play”).

jadero
link
fedilink
27M

Oops! I guess I wasn’t paying close enough attention.

That’s ok - a lot of people weren’t.

It really depends on the type of control and what it’s controlling. As this is a switch, you’d expect the current state to be what’s shown on the same side as the slider-- in this case, the slider is a sun in dark mode and a moon in light mode, which is the opposite way.

The designer team once did a toggle button with the inverse logic and I was so confused when I had to implement that. It must be my antithesis.

Create a post

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 !webdev@programming.dev



  • 1 user online
  • 1 user / day
  • 1 user / week
  • 1 user / month
  • 1.11K users / 6 months
  • 1 subscriber
  • 1.21K Posts
  • 17.8K Comments
  • Modlog