ui_guide.md 3.3 KB
Newer Older
1
# UI Guide for building GitLab
2 3 4 5 6

## GitLab UI development kit

We created a page inside GitLab where you can check commonly used html and css elements.

7
When you run GitLab instance locally - just visit http://localhost:3000/help/ui page to see UI examples
8
you can use during GitLab development.
9 10 11

## Design repository

12 13
All design files are stored in the [gitlab-design](https://gitlab.com/gitlab-org/gitlab-design)
repository and maintained by GitLab UX designers.
14 15 16

## Navigation

17 18 19 20 21
GitLab's layout contains 2 sections: the left sidebar and the content. The left sidebar contains a static navigation menu.
This menu will be visible regardless of what page you visit. The left sidebar also contains the GitLab logo
and the current user's profile picture. The content section contains a header and the content itself.
The header describes the current GitLab page and what navigation is
available to user in this area. Depending on the area (project, group, profile setting) the header name and navigation may change. For example when user visits one of the
J
Jacob Schatz 已提交
22
project pages the header will contain a project name and navigation for that project. When the user visits a group page it will contain a group name and navigation related to this group.
23 24 25

### Adding new tab to header navigation

26 27 28
We try to keep the amount of tabs in the header navigation between 5 and 10 so that it fits on a typical laptop screen. We also try not to confuse the user with too many options. Ideally each
tab should represent separate functionality. Everything related to the issue
tracker should be under the 'Issues' tab while everything related to the wiki should
J
Jacob Schatz 已提交
29
be under 'Wiki' tab and so on and so forth.
30
When adding a new tab to the header don't use more than 2 words for text in the link.
D
Dmitriy Zaporozhets 已提交
31
We want to keep links short and easy to remember and fit all of them in the small screen.
32

33
## Mobile screen size
34

35 36
We want GitLab to work well on small mobile screens as well. Size limitations make it is impossible to fit everything on a mobile screen. In this case it is OK to hide
part of the UI for smaller resolutions in favor of a better user experience.
J
Jacob Schatz 已提交
37
However core functionality like browsing files, creating issues, writing comments, should
38 39 40 41
be available on all resolutions.

## Icons

42
* `trash` icon for button or link that does destructive action like removing
43 44 45 46 47
information from database or file system
* `x` icon for closing/hiding UI element. For example close modal window
* `pencil` icon for edit button or link
* `eye` icon for subscribe action
* `rss` for rss/atom feed
D
Dmitriy Zaporozhets 已提交
48
* `plus` for link or dropdown that lead to page where you create new object (For example new issue page)
49 50 51 52 53 54


## Buttons

* Button should contain icon or text. Exceptions should be approved by UX designer.
* Use red button for destructive actions (not revertable). For example removing issue.
55 56 57 58
* Use green or blue button for primary action. Primary button should be only one.
Do not use both green and blue button in one form.
* For all other cases use default white button.
* Text button should have only first word capitalized. So should be "Create issue" instead of "Create Issue"
59

60 61 62 63 64 65
## Counts

* Always use the [`number_with_delimiter`][number_with_delimiter] helper to
  display counts in the UI.

[number_with_delimiter]: http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#method-i-number_with_delimiter