数据库中的自定义排序顺序
我的数据库中有一个“产品”表。它用于填充网站上的下拉列表。
目前该列表是按字母顺序输出的,但我的客户建议,如果他签署可口可乐作为客户,他们可能希望将“香草可乐”作为产品放在列表顶部,然后是“可口可乐”,然后有其余的按字母顺序排序。
对我来说,这似乎是一个糟糕的可用性决定......还有其他意见吗?
I have a "products" table in a database. It is used to populate a dropdown list on a website.
Currently the list is being output alphabetically, but my client has suggested that if he signs Coca Cola as a customer, they might want to put "Vanilla Coke" as the product on the top of the list, followed by "Coke", then have the rest sort alphabetically.
This seems like a poor usability decision to me... any second opinions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
取决于他们如何使用表格。如果他们要大量使用香草可乐,那么将其放在顶部附近是有意义的。
在网站的国家/地区下拉列表中,您经常会看到同样的想法。主要在美国使用的网站可能会将“美国”作为第一项。
请注意,问题可能是下拉列表中有太多项目,需要查看其他替代方案(AJAX 自动建议是一种方法)?
Depends how they are using the form. If they are going to use Vanilla coke a lot it makes sense to have it near the top.
You see the same idea quite a lot in country dropdowns on sites. A site mostly used in the USA might have USA as the first item.
Mind you perhaps the issue is that you have too many items in a dropdown and need to look at other alternatives (AJAX autosuggest being one approach)?
你能问问你的用户吗?他们的意见很重要。我们极客跟他们聊得还不够!
Can you ask your users? It's their opinion that matters. Us geeks don't talk to them enough!
喝两次可乐怎么样?一旦到达顶部,用户可以快速找到它,然后按字母顺序与其他产品一起找到?
这避免了向下滚动和搜索而无法找到所需内容的痛苦。
What about having Coke in there twice? Once at the top where the user may find it quick, and once alphabetically with the rest of the products?
This avoids the pain of scrolling down and hunting, only to be unable to find what you were looking for.
这取决于您网站的性质。如果可口可乐人大多选择自己的产品,那是一个非常好的决定。我什至会更进一步,用空格/水平线将可口可乐的产品与其他产品分开:
It depends on the nature of your web site. If Coca Cola people mostly pick their own products, that's a perfectly fine decision. I'd even go further and separate Coca Cola's product from the rest with a whitespace/horizontal line:
这对我来说很有意义。我碰巧处理了几个查找列表,这些列表首先按 SequenceID 排序,然后按字母顺序排序。它的实现很简单:简单地将 SequenceID 添加到记录中,然后首先按 SequenceID 排序,然后按名称排序。您甚至可以按 SequenceID 将项目分组在一起。
实际上,您的客户想要的是根据项目的重要性将其分为自定义组。这很有意义,尤其是在处理热门项目位于列表下方的长列表时。非常有用!
It makes a lot of sense to me. I happen to deal with several lookup lists which are ordered first by an SequenceID, then alphabetically. It's implementation is easy: simple add an SequenceID to the record and sort first on SequenceID, then by name. You could even group items together by SequenceID.
Actually, what your customer wants is having items in custom groups, based upon their importance. That makes a lot of sense, especially when dealing with long lists where the popular items are located down the list. It is extremely useful!
如果它对用户有意义并且他们想要它。这至少值得尝试。
他们可能会要求最常用的东西始终位于顶部。在这种情况下,这将是一个非常好的可用性决策。
另一种选择可能是不更改顺序,但更改默认选择(更改为列表中间的一个)。
If it makes sense to the user and they want it. It would at least be worth trying.
They may be asking for something that is most commonly used to be always at the top. In this scenario it would be a very good usability decision.
Another alternative may be to not change the order but change the default selection (to one in the middle of the list).
我认为这取决于。如果一个项目被选择的次数多于另一个(比如 80% 的时间),并且它被埋藏在列表中距顶部 5 或 6 个项目中,用户很快就会厌倦滚动列表来查找该项目。将其放在列表的顶部可能会更“用户友好”。
您需要权衡直觉的下降与实际使用的情况。
I think this depends. If an item is chosen more than another (say 80% of the time), and it is burried in a list 5 or 6 items from the top, users very quickly will get tired of scrolling through a list to find this item. Putting it at the top of a list may be more 'user friendly'.
You need to weigh up the decrease in intuition, against the actual use.