仪表板天气小组件中的位置验证

以我的非正式身份领导粉丝of Apple’s Weather widget, I’ve received email from a slew of readers who say they’d like to use the Weather widget, but can’t, because it shows them the weather for some other city with the same name as theirs.

对于美国以外的读者来说,这个问题尤其严重— we Americans can simply enter a postal Zip code rather than a city name. In fact, the problem has led many residents of cities like London to the mistaken conclusion that the Weather widget only works for U.S. locations不是这样。

不过,我很确定我知道如何提供帮助The trick is that after you enter the name of your city in the Weather widget city name field,你必须按回车键1Everyone who feels like they’re stuck with the weather for the wrong city, I suspect, has simply typed the name of their city, then clicked the Done button with the mouse.

比方说,你住在不列颠哥伦比亚省的温哥华。

键入'Vancouver'后,Weather小部件的屏幕截图。

If you just type “Vancouver” and then click Done, you’ll wind up getting the weather for Vancouver, WashingtonA lovely city, I’m sure, but not the right weather for our Canadian friends.

But if you type Return after typing “Vancouver”, the widget will validate your entry, and if it finds multiple cities matching that name, it will prompt you to clarify your choice:

选择'温哥华,华盛顿'和'温哥华,加拿大(BC)'。

If you don’t use Return to invoke the widget’s input validation, it seems to use whichever same-named city comes first in the list — never giving you a hint that there might be other locations that match the city name you’ve entered.

Needless to say, the confusion here is caused by a decidedly poor UI designThe Weather widget provides absolutely no indication that you need to hit return after typing your city nameAnd considering how mouse-oriented the entire Dashboard UI is, it’s no surprise that many people assume they just need to click the Done button after typing their city name和完成按钮具有to be clicked — which means input validation has to be invoked by the keyboard, but dismissing the configuration panel with the Done button has to be done with the mouseThe right way to do something should be the obvious way.

One of the core principles of UI design is that you should never allow for invalid or ambiguous inputIn the case of the Weather widget, validation should happen as-you-type (一个人 Google Suggest), and the Done button should only be enabled after the input field has been validated.


  1. 从技术上讲,您可以使用Return,Enter或Tab来调用验证。↩︎

以前: 关于脚注
下一个: 关于笔记的说明