Github Redesign (2019)
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
Github Redesign (2019)
Redesigning Github repository page Illustration by Julia Litvin Github design is pretty good: it gets the job done, it’s clean, has consistent visual language, its design is calm and suitable for everyday use. Given all that, there are still many areas that could be improved. Today we’ll take one interface—repository page—and look what UI problems it has and if we can fix them.
重新设计 Github 仓库页面(插图:Julia Litvin)。Github 的设计相当不错:它能完成任务,界面整洁,拥有统一的视觉语言,设计风格沉稳且适合日常使用。尽管如此,仍有许多地方可以改进。今天,我们将以仓库页面这一界面为例,看看它存在哪些 UI 问题,以及我们是否能修复它们。
First problem: nested tabs Let’s start with the biggest issue right away: information architecture. Take tabs. Currently there’re two levels of tabs, one nested under the other: If you are a programmer, you might be surprised but other people normally don’t like hierarchies. Nested structures are hard to grasp, remember, navigate, and grouping is very often non-intuitive. Nested tabs are one of the worst UI patterns out there.
第一个问题:嵌套标签页。让我们直接从最大的问题入手:信息架构。以标签页为例,目前存在两层标签页,一层嵌套在另一层之下:如果你是一名程序员,你可能会感到惊讶,但普通人通常不喜欢层级结构。嵌套结构难以理解、记忆和导航,且分组往往不直观。嵌套标签页是目前最糟糕的 UI 模式之一。
Then there’s a plain usability issue: let’s say I’m in Wiki and need to see Releases. What should I do? There’s no Releases tab visible, so I must figure out somehow that Releases are part of the Code (?). That makes almost no sense. Releases are as much part of the Code as Issues or Wiki are. Solution here is to flatten all tabs into a single navigational control: Organized that way, tabs are immediately accessible from anywhere in the repo. This is a big deal. As a bonus, we also won quite a bit of vertical space without sacrificing anything! Vertical space is very important, it lets you see more content and get to it faster—all good things.
此外还有一个简单的可用性问题:假设我在 Wiki 页面,需要查看 Releases(发布)。我该怎么做?界面上没有可见的 Releases 标签,所以我必须设法弄清楚 Releases 是 Code(代码)的一部分(?)。这几乎毫无道理。Releases 和 Issues 或 Wiki 一样,都是代码库的重要组成部分。这里的解决方案是将所有标签页扁平化为一个单一的导航控件:这样组织后,从仓库的任何位置都可以立即访问这些标签页。这非常重要。额外的好处是,我们在不牺牲任何东西的情况下,还节省了相当多的垂直空间!垂直空间非常重要,它能让你看到更多内容并更快地获取信息——这些都是好事。
We still have one problem though: tabs don’t fit. We’re going to solve it by removing icons, but let me build up a case for that first. Problem 2: Redundant icons Icons are visual cues that help you scan the UI quickly. “Quickly” here means faster than reading text labels. If for some reason reading labels is still faster then icons aren’t working. One example of icons misuse: if you put too many icons in a row and they are all different, they won’t work. Prioritizing, or highlighting, something means deprioritizing everything else. You can’t highlight everything.
不过我们还有一个问题:标签页放不下了。我们将通过移除图标来解决这个问题,但请允许我先说明理由。问题 2:冗余的图标。图标是帮助你快速扫描 UI 的视觉线索。“快速”在这里意味着比阅读文本标签更快。如果由于某种原因阅读标签反而更快,那么图标就失效了。图标滥用的一个例子是:如果你在一行中放置了太多不同的图标,它们将无法发挥作用。优先处理或突出显示某样东西,意味着降低其他所有东西的优先级。你不可能突出显示所有东西。
Another way to fail at icons: if you use obscure graphics, people will have to read labels anyways, so, again, not working. Now let’s be honest: the domain of repository and project management is pretty abstract. No matter how good you are at design and how hard you try, you won’t come up with a great icon for a commit. Or a release. Or an issue. Or a license. A great icon is something other people know and understand. And for repositories, there’s simply none. I mean, So Github tab icons are purely decorative.
图标设计的另一种失败方式是:如果你使用晦涩难懂的图形,人们最终还是得去读标签,所以这同样行不通。老实说,仓库和项目管理领域是非常抽象的。无论你的设计水平有多高,无论你多么努力,你都无法为“提交”(commit)设计出一个完美的图标。或者“发布”、“议题”、“许可证”也一样。一个好的图标应该是别人一看就懂的。而对于仓库来说,根本不存在这样的图标。我的意思是,Github 的标签图标纯粹是装饰性的。
If you don’t believe me, look at what Github itself is doing. They dim icons: That’s a sure sign that they, too, think it’s near impossible to figure out why backward clock means “Commit”. Github knows people will be looking at the labels anyways. But even being decorative, they’re bad at it. I mean, Icon + Label + Counter make for a symmetric and weak composition: By removing icons we: free up a lot of horizontal space, make design stronger, and get rid of visual noize. Win-win-win! Here’s the result, tabs without icons:
如果你不相信我,看看 Github 自己在做什么。他们调暗了图标:这清楚地表明,他们也认为几乎不可能让人理解为什么“倒转的时钟”代表“提交”。Github 知道人们无论如何都会去看标签。但即使作为装饰,它们也做得不好。我的意思是,图标 + 标签 + 计数器构成了一种对称但薄弱的组合:通过移除图标,我们:释放了大量的水平空间,增强了设计感,并消除了视觉噪音。一举三得!这是结果,没有图标的标签页:
Test yourself, see if you can find Releases tab without an icon and if it was harder than before? It wasn’t, was it? A note on this design: I am using the same limitations Github already uses: English language only, locked page width of 1020px. For different conditions, say, for the adaptive design we might want a different solution. Another note: I had to remove Contributors tab (which was actually not a tab, but a sub-tab from Insights that was duplicated in Code for some reason) to accommodate for Settings tab. Don’t worry, we’ll get Contributors back later.
测试一下自己,看看在没有图标的情况下能否找到 Releases 标签,以及这是否比以前更难?并没有,对吧?关于这个设计的一点说明:我使用了 Github 现有的限制条件:仅限英语,页面宽度锁定为 1020px。对于不同的条件,比如自适应设计,我们可能需要不同的解决方案。另一点说明:我不得不移除 Contributors(贡献者)标签(它实际上不是一个标签,而是 Insights 下的一个子标签,不知为何在 Code 中被重复显示),以便为 Settings(设置)标签腾出空间。别担心,我们稍后会把 Contributors 加回来。
Problem 3: Vanity counters This is the “vanity menu”: The thing with vanity metrics is that there should be just one. One metrics is simple to understand and focus. Two or three split attention, making everything weaker. Luckily for us, both watchers and forks perform poorly as metrics anyways. For watches, people tend not to watch too much. For forks, people tend to fork for no reason. But stars work. They work because they have no other function but to represent vanity. So let’s keep stars and move them to the left to get more attention:
问题 3:虚荣指标计数器。这就是“虚荣菜单”:虚荣指标的问题在于,它应该只有一个。单一指标易于理解和聚焦。两三个指标会分散注意力,削弱整体效果。幸运的是,Watchers(关注者)和 Forks(分支)作为指标的表现都不太好。对于关注,人们往往不会关注太多;对于分支,人们往往无缘无故地进行分支。但 Stars(星标)是有用的。它们之所以有效,是因为除了代表虚荣心之外,它们没有其他功能。所以让我们保留星标,并将它们移到左侧以获得更多关注:
Problem 4: “Watch” button ambiguity In the watch button we have a classic “button or status” UX dilemma. Buttons tell us what can be done but don’t say what the current status is. Status tells current state but it’s not clear what it would change to. In Github case “Watch” has a button label but it doesn’t act as a button: clicking on it won’t make you watch the repo. It’s not a status either: if you see “Watch” it means you are not watching. Same for the other two states: they are neither buttons nor states. The problem here is that a single button can’t be used to switch between three states. But dropdown can!
问题 4:“Watch”(关注)按钮的歧义。在关注按钮上,我们遇到了一个经典的“按钮还是状态”的 UX 困境。按钮告诉我们能做什么,但没有说明当前状态;状态告诉我们当前处于什么状态,但不清楚点击后会变成什么。在 Github 的案例中,“Watch”有一个按钮标签,但它并不像按钮那样工作:点击它并不会让你关注该仓库。它也不是一个状态:如果你看到“Watch”,意味着你并没有关注。其他两种状态也一样:它们既不是按钮也不是状态。这里的问题在于,单个按钮无法用于在三种状态之间切换。但下拉菜单可以!
Dropdowns are a well-established UI component that shows status and can be used to change it at the same time. Funny, but Github is already using a dropdown! We just need to fix it to work as any other dropdown on Earth works: to show current status. Trivial fix, really: Minor, but annoying: that checkmark is really hard to spot. Let’s highlight the whole row: All together so far: Uff, we’ve done a lot! If you need a little break, now would be a perfect time for it. Don’t worry, I’ll wait. Back? Great! Let’s move on.
下拉菜单是一个成熟的 UI 组件,既能显示状态,又能同时用于更改状态。有趣的是,Github 已经在用下拉菜单了!我们只需要修复它,让它像地球上任何其他下拉菜单一样工作:显示当前状态。这其实是一个微小的修复:虽然很小,但很烦人:那个勾选标记真的很难看清。让我们高亮整行:到目前为止的整体效果:呼,我们做了很多工作!如果你需要休息一下,现在正是时候。别担心,我会等你的。回来了?太好了!让我们继续。
Problem 5: Repo description This is the repository description: The problem with it is: why is it located under the Code tab? It’s a description of the whole repository, not just its code, right? To fix this let’s move it above the tabs, to the area that belongs to the whole repository: It still needs a couple of touches. First, font is neither big nor small (it’s 16px, standing between 18px repository name and 14px tabs). Let’s make it 14px so that there’re only two distinct font sizes. Also I’m sure there’s no need to render “https://” in the URL: The second change is to move topics right next to the repository name. There’re usually just a few of those
问题 5:仓库描述。这是仓库描述:它的问题在于:为什么它位于 Code 标签页下方?这是对整个仓库的描述,而不仅仅是代码,对吧?为了解决这个问题,让我们把它移到标签页上方,移到属于整个仓库的区域:它还需要一些润色。首先,字体既不大也不小(它是 16px,介于 18px 的仓库名称和 14px 的标签页之间)。让我们把它改为 14px,这样就只有两种不同的字体大小了。另外,我确定 URL 中没有必要显示“https://”:第二个改动是将主题(topics)移到仓库名称旁边。通常只有几个主题。