三鼎用户界面 Sanding UI

原始链接: https://blog.jim-nielsen.com/2024/sanding-ui/

在软件开发过程中,演讲者首选的方法是通过点击各个部分并进行调整来进行广泛的测试。 此过程模拟质量保证,同时也是发现潜在问题的一种方法。 他们将这种方法与木工进行了比较,从大的、粗略的改变开始,然后再转向更精细的细节。 然而,由于软件中存在许多变量,它们会继续点击,直到看起来不需要进一步的更改为止。 最近,他们遇到了无线电选项列表的问题:尽管标签和输入正确链接,但无线电和标签之间存在非功能区域。 经过调查后,他们发现柔性显示屏内的间隙导致了意外的交互问题。 为了解决这个问题,他们只是消除了间隙并在标签上添加了填充。 通过反复试验,他们发现将填充物放在标签上而不是容器上可以使整个部分正常运行。 他们对解决此类问题的建议是彻底检查每个细节,找出小缺陷,反复解决这些问题,最终获得顺利的最终产品。

During software development, the speaker's preferred method involves extensively testing by clicking around various sections and making adjustments. This process simulates quality assurance while also serving as a way to find potential issues. They compare this approach to woodworking, starting with large, rough alterations before moving to finer details. However, due to numerous variables in software, they continue clicking until no further changes seem necessary. Recently, they encountered an issue with a radio option list: although labels and inputs were properly linked, there existed a non-functional area between the radio and label. After investigating, they discovered that the gap within their flex display caused unintended interaction problems. To resolve this issue, they simply eliminated the gap and added padding to the label instead. Through trial and error, they found that placing padding on the label rather than the container allowed the entire section to function correctly. Their advice for solving such problems is to thoroughly examine each detail, identify minor flaws, address these issues repeatedly, and ultimately achieve a smooth end product.


One of the ways I like to do development is to build something, click around a ton, make tweaks, click around more, more tweaks, more clicks, etc., until I finally consider it done.

The clicking around a ton is the important part. If it’s a page transition, that means going back and forth a ton. Click, back button. Click, right-click context menu, “Back”. Click, in-app navigation to go back (if there is one). Click, keyboard shortcut to go back. Over and over and over. You get the idea.

It’s kind of a QA tactic in a sense, just click around and try to break stuff. But I like to think of it as being more akin to woodworking. You have a plank of wood and you run it through the belt sander to get all the big, coarse stuff smoothed down. Then you pull out the hand sander, sand a spot, run your hand over it, feel for splinters, sand it some more, over and over until you’re satisfied with the result.

With software, the fact is that sometimes there are just too many variables to know and test and smooth out. So I click around, using the UI over and over, until I finally cannot give myself any more splinters.

Just the other day, I was working on a list of radio options, pretty standard-fare stuff:

  • Create a <label> with an associated <input type="radio">.
  • Put them on the same row, center align them with a gap between the control and the label.
  • Etc.

As an oldie who used to leverage floats in CSS, I’m still amazed when I can use flexbox to do this stuff — it’s so easy!

<div class="container">
  <label for="control">Foo</label>
  <input id="control" type="radio">
</div>

<style>
    .container {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: .5rem;
    }
</style>

As I was doin’ my thang — clicking around a bunch, trying to get some splinters — I realized there was a dead spot in the UI, a place between the radio and the label where clicking didn’t toggle the control like I expected.

Animated gif of some radio inputs where the space between the control and the label doesn’t select the radio grouping.

“What the?” I thought. “I’ve got my <label> and <input> and associated for attribute, why isn’t this working?” Then I thought, “gap in my flex display must be the culprit!”

Screenshot of Chrome developer tools where an item has a flex layout with a CSS gap in between a label and an input.

Sure enough, it was. While flexbox had made it super easy to add some visual spacing between the control and its label, that spacing had become a dead zone of interaction even though it wasn’t my intention!

There’s probably a million different ways to solve this problem — because CSS is awesome — but I just removed the gap and added some padding to my label, then voilà!

Screenshot Chrome developer tools with a label that has a left padding.

Putting padding on the label, instead of the containing flexbox, made the whole thing clickable without a deadzone.

Screenshot of the Chrome developer tools where an element has a flex layout but no gap.

A bunch more clicking around and things were working as expected.

Animated gif of some radio inputs where the space between the control and the label can be clicked and it selects the entire radio grouping.

It’s a small thing, but lots of small splinters lead to an agonizing experience.

So my recipe is: sand it, feel the grain, get a splinter, sand again, and repeat until smooth.

相关文章
联系我们 contact @ memedata.com