Newshot

Github 重新设计

AI summary

我建议讨论避开最后一个有争议的观点——他为了减少“过时感”而大幅扁平化 UI;在此之前的内容都相当不错,值得讨论。评论

Translation(model translation, not the source's own text)

文章标题:Github Redesign

正文:

  • Personal Information
  • User Agreement

重新设计 Github 仓库页面

插画:Julia Litvin

Github 的设计相当不错:功能到位、界面干净、视觉语言一致,整体风格克制,适合日常使用。

尽管如此,仍有许多地方可以改进。今天我们就拿一个界面——仓库页面——来看看它有哪些 UI 问题,以及能否修复。

第一个问题:嵌套标签页

直接从最大的问题开始:信息架构。以标签页为例。目前有两层标签页,一层嵌套在另一层之下:

如果你是程序员,可能会感到意外,但普通人通常不喜欢层级结构。嵌套结构难以理解、记忆和导航,而且分组往往很不直观。嵌套标签页是现有最糟糕的 UI 模式之一。

此外还有一个纯粹的可用性问题:假设我在 Wiki 里,想去看 Releases。我该怎么做?界面上看不到 Releases 标签页,所以我必须自己想办法弄明白 Releases 是 Code 的一部分(?)。这几乎毫无道理。Releases 和 Issues、Wiki 一样,都应该是 Code 的一部分。

解决方案是把所有标签页摊平为一个统一的导航控件:

这样组织之后,标签页从仓库的任何位置都能直接访问。这意义重大。

额外的好处是,我们还在不牺牲任何东西的情况下赢回了相当多的垂直空间!垂直空间非常重要,它能让你看到更多内容、更快地到达内容——全是好事。

不过我们还有一个问题:标签页放不下。我们打算通过去掉图标来解决,但先让我把理由铺陈一下。

问题 2:多余的图标

图标是视觉线索,帮助你快速扫视 UI。这里的“快速”意味着比阅读文字标签更快。如果由于某种原因阅读标签仍然更快,那图标就没有起作用。

图标误用的一个例子:如果你在一行里放了太多图标,而且它们各不相同,它们就不会起作用。

优先突出某样东西,就意味着把其他一切降级。你不可能突出所有东西。

图标失败的另一种方式:如果你使用晦涩的图形,人们反正还是得读标签,所以,同样不起作用。

现在说实话:仓库和项目管理这个领域相当抽象。无论你设计水平多高、多努力尝试,你都想不出一个能代表 commit 的好图标。或者 release。或者 issue。或者 license。好图标是别人已经知道并理解的东西。而对于仓库,根本不存在这样的图标。我是说,

所以 Github 的标签页图标纯粹是装饰性的。如果你不信我,看看 Github 自己是怎么做的。他们把图标调暗了:

这明确表明,他们自己也认为几乎不可能搞清楚为什么一个逆时针的时钟代表 "Commit"。Github 知道人们反正都会去看标签。

但即使是作为装饰,这些图标也很糟糕。我是说,图标 + 标签 + 计数构成了一个对称而薄弱的构图:

去掉图标后,我们:

  • 释放了大量水平空间,
  • 让设计更有力,并且
  • 消除了视觉噪音。

三赢!结果如下,没有图标的标签页:

自己试试,看看没有图标能不能找到 Releases 标签页,是不是比之前更难?并没有,对吧?

关于这个设计的一点说明:我沿用了 Github 已经在用的限制条件:仅英文、页面宽度锁定为 1020px。对于不同的条件,比如自适应设计,我们可能需要不同的方案。

文章标题:Github Redesign

正文: 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.

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:

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! 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.

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, so it seems wasteful to dedicate a whole line to them:

Look at us, winning more vertical space again!

Problem 6: Removing background color

Blue topics on blue background became harder to read. This is because they used to be on #FFF and now they’re on Github’s #FAFBFC “very light dirty blue”.

Let’s change tab’s background to #FFF too:

But why was that background there in the first place? What did it do?

My guess is Github had to add it because the structure of their menu layers was becoming too complex and they needed visual cues to help you “split” it in order to understand. The black top bar serves the same purpose: to separate. I mean, they were literally spending a good half of 768px screen at navigation alone.

当被分成图层时,至少你不会立刻被它吓到。没有背景的话,它会是一团乱麻。

但因为我们把整个页头简化了这么多,并去掉了一个中间层,我们不再需要那种颜色编码了。相反,我们可以享受清爽干净的白:

看看那么多空白!终于,我们也能在屏幕上半部分看到一些内容了。

问题 7:描述编辑

一个小细节。如果你拥有该仓库,你就可以编辑它的描述和主题:

首先,“编辑”按钮位置很糟——太远,容易被忽略。

其次,主题单独的编辑按钮是主题系统在不同时间开发的产物,也许是由不同团队开发的。真的没必要有两个单独的按钮。

解决方案?我们需要多少个编辑按钮?我说一个都不需要。

“但是……编辑按钮去哪儿了?”你可能会问。

你看,

首先,我加入了贡献者。Github 的核心就是人与协作,这也是为什么他们把 Fork 和 PR 按钮强调到这种程度。而人正是这种协作的门面。他们付出空闲时间和精力,让代码得以存在。看到其中一些人的面孔才公平。

Activity 是一个相对较新的功能,之前在仓库页面上还没找到自己的位置——直到现在。它帮你看到项目有多大的推进势头。

语言统计此前被不公平地藏了起来,现在它被放到了最前面。我还加上了以代码行数计算的代码规模——一个显而易见、但 Github 出于某种原因至今仍没有的补充。

总而言之,在我看来,新的 Overview 标签页在日常使用中更有帮助。

问题 10:让按钮更贴合上下文

“Create new file”“Upload files”和“Find files”都与文件有关,所以把它们移到它们操作的对象——Files——旁边是合理的。

问题 11:被隐藏的 clone 链接

Github 过去总是把 clone URL 直接放在页面上。这非常有用——当你需要获取代码时,不需要额外点击。

不幸的是,在某次改版中,Github 把 clone URL 藏到了一个按钮后面。我猜他们这样做只是因为空间实在不够。但人们一直在找它,于是他们不得不把按钮涂成绿色。

嗯,在移动文件按钮之后,我们有足够的空间恢复完整长度的 Clone 链接:

我还把获取仓库的四种方式统一到了一个控件里,因为从语义上说它们几乎是一回事:都是把代码拿到你机器上的方式。

最后一个问题:过时的外观

这是 Github 在 2013 年时的样子:

这是 2015 年的截图:

最后,这是它今天的样子:

如你所见,至少从 2013 年以来,配色方案和主要 UI 元素并没有太大变化。这不一定不好,而且很大程度上证明了最初的设计足够优秀,经受住了时间的考验。

但也许该稍微给它焕新一下?去掉渐变、脏兮兮的褪色配色、不必要的分隔线,多留一点呼吸空间。大致像这样:

如果你感到迷失方向,给它一分钟。一旦你习惯了,你可能会注意到它其实对眼睛更友好,也稍微轻盈一些。

最后

当前 Github 设计与我的方案并排对比:

我们在相同垂直尺寸的屏幕里多放了约 4 个文件、6 条最新提交、3 个分支、10 位贡献者的面孔、项目 Activity,以及扩展后的语言统计,而且没有丢失任何信息。

如果你认识 Github 的人,把这篇文章的链接发给他们。也许那里有人会喜欢我的想法,并最终实现它们——谁知道呢?

February 28, 2019·在 Hacker News Reddit 上讨论

我是 Niki。我在这里写编程和 UI 设计 订阅

我提供 Clojure 相关的一切咨询:Web、后端、Datomic、DataScript、性能等。看看我的 Github 并联系 [email protected]

The translation is machine-generated and individual terms may be off. Nothing is rewritten or cut; the original is authoritative.

Published by Lobsters
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗