Skip to content

Commit 74482af

Browse files
authoredFeb 2, 2023
Copy content from primer.style/desktop → primer.style/design (#365)
* Copy content from primer.style/desktop → primer.style/design * code review feedback * update titles to be unique
1 parent 3d23500 commit 74482af

File tree

7 files changed

+192
-6
lines changed

7 files changed

+192
-6
lines changed
 
125 KB
Loading

‎content/images/desktop-icons.png

7.51 KB
Loading
+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
title: Foundations
3+
---
4+
5+
These are the foundational design concepts and constraints that can help inform design decisions. The core considerations for GitHub Desktop include platform differences and relationships to Primer Web guidelines.
6+
7+
## Color
8+
9+
The color scheme file is the only element inherited directly from Primer CSS. For the most part, Deskotp uses the same palette as Primer CSS, with a few exceptions:
10+
11+
- Use blue for the primary buttons (rather than the green buttons on github.com)
12+
- Use blue for tab underlines (orange is used on github.com)
13+
14+
### Dark mode
15+
16+
GitHub Desktop has a dark mode users can choose in their app preferences. It's displayed using a theme that essentially converts all the elements to their dark mode equivalents.
17+
18+
## Iconography
19+
20+
import icons from '../../images/desktop-icons.png'
21+
22+
GitHub Desktop uses [octicons](https://primer.style/octicons/), but doesn't inherit updates, instead they're duplicated into the Desktop code base. There are icons that are unique to Desktop:
23+
24+
- Stash: Uses the octicon for ‘modified’ but made to appear stacked
25+
- Commit co-author: Person with plus sign
26+
- Avatar default: The old version (a filled in silhouette with rounded container) is used instead of the newer outlined style due to the context
27+
- Force push icon: Push arrow with outline of two more arrows to make it look more extreme
28+
- Repo force push: Repo with arrow with triple outline above
29+
30+
<img src={icons} alt="" />
31+
32+
Some older octicons have also been used in the illustrations (check mark, question mark, ufo with speech bubble with telescope, planet with thumbs up).
33+
34+
## Illustrations
35+
36+
GitHub Desktop has its own set of illustrations, which were adopted from a previous GitHub Universe with a space theme. Illustrations primarily show up in the welcome wizard and empty states for lists areas. Because Desktop has a dark mode, hard-coded colors need to look good on either white or dark gray backgrounds. They are composed of 1 or 2 swatches that get swapped out with a css invert filter on. If a shadow is included in the illustration, it needs to be translucent.
37+
38+
All of the illustrations can be found in the [desktop repo](https://github.com/desktop/desktop/tree/development/app/static/common).
39+
40+
## Platforms
41+
42+
Desktop is built using Electron, which allows it to be cross-platform. With Electron, it’s possible to implement anything that can be implemented on github.com, and more. For example, in the future, multiple desktop windows could be part of the app experience. Though Electron enables a cross-platform app, there are a few key differentiating features between macOS and Windows that need to be considered when designing for GitHub Desktop.
43+
44+
### Button order
45+
46+
#### Button order on macOS
47+
48+
The secondary button is always on the left, whether it’s the default or cancel, and the primary action is on the right. This is aligned with the Primer guidelines used on github.com.
49+
50+
Example: "Cancel | Let’s Do This"
51+
52+
#### Button order on Windows
53+
54+
The default button is always on the far right and the primary action is on the left. This differs from the Primer guidelines and should be taken into consideration for Windows users.
55+
56+
Example: "Let’s do this | Cancel"
57+
58+
### Capitalization
59+
60+
#### Capitalization on macOS
61+
62+
Title case is used for headlines and buttons. This is different from Primer guidelines, so it needs to be taken into consideration.
63+
64+
Example: "Current Repository"
65+
66+
#### Capitalization on Windows
67+
68+
Sentence case is used for headlines and buttons, which is aligned with Primer guidelines.
69+
70+
Example: "Current repository"
71+
72+
### Menu bar
73+
74+
#### Menu bar on macOS
75+
76+
The menu bar on macOS sits at the top of the screen, disconnected from the GitHub Desktop window. The system menu bar is used.
77+
78+
#### Menu bar on Windows
79+
80+
The menu bar on Windows sits directly on top of the GitHub Desktop UI, with no separation or ability to disconnect it. The menu bar is a custom design, so when considering changing elements in the topbar (the top of the Desktop interface), consider the Windows menu bar in relation.
81+
82+
## Relationship to Primer Web
83+
84+
GitHub Desktop's architecture and Primer Web are not compatible. For that reason, Desktop has its own set of components and CSS that leverage Primer Web, and doesn't take advantage of Primer updates to the code directly, with the exception of the color scheme file.
85+
86+
## Spacing
87+
88+
GitHub Desktop uses a 10 pixel grid (different from the 8px grid used by Primer). Changing the spacing scale has been considered and is documented in [this PR](https://github.com/desktop/desktop/compare/spacing-scale-spike-v2).
89+
90+
## System Elements
91+
92+
The following UI elements use system-generated code that has not been customized or styled:
93+
94+
- Context menus
95+
- Tooltips
96+
- Dropdowns
97+
- Menu bar on macOS (Windows uses a custom menu bar)
98+
99+
## Typography
100+
101+
GitHub Desktop uses system fonts. When creating design mockups for GitHub Desktop, consider that:
102+
103+
- In Figma, use macOS fonts (Primer Web defaults) for mocking up designs, unless the feature is Windows-specific.
104+
- Windows' system font is Segoe UI, and type styles for Windows are included in the Figma library to make it easy to switch from SF Pro to Segoe to show the difference between Mac and Windows screens. Segoe UI reads a little smaller and tighter, so it may be worth adjusting the point size to make it feel consistent with macOS.
105+
- Styles and sizes follow the same guidelines as Primer Web, with the addition of `text-x-small` (11pt and used for all small, secondary text).
106+
107+
[Download Segoe UI (Mac only)](https://aka.ms/SegoeFonts)
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: Getting started
3+
---
4+
5+
import DesktopChangesView from '../../images/desktop-changesview.png'
6+
7+
## Getting started
8+
9+
GitHub Desktop is a git workflow tool built on Electron. It's available on both macOS and Windows and was designed to feel like a native application, considering the core differences between the two platforms. It's meant to look platform agnostic and neutral, rather than mimicking the Primer styles used on github.com. These guidelines cover the basic principles and foundation elements to consider when designing for Desktop.
10+
11+
<img src={DesktopChangesView} alt="" />
12+
13+
## Principles
14+
15+
Follow these principles to help guide your design choices.
16+
17+
### Promote good git behavior
18+
19+
Encourage using git sucessfully so that users can better communicate the work they've done to their teams and for their own records. For example, we encourage well written commit messages by making partial committing easy.
20+
21+
### Balance the spectrum between “git” and “magic”
22+
23+
Consider what the UI explicitly shows the user and what is hidden behind controls and feels like "magic". It's important to achieve a good balance between these two paradigms, so that users can understand what is happening and troubleshoot when necessary.
24+
25+
### Prioritize beginners over advanced developers
26+
27+
Always consider the needs of, and optimize for, beginner developers in favor of advanced developers.
28+
29+
### Help developers learn as they go
30+
31+
Use git terminology and add clarifying information and hints throughout to help users understand just enough of what’s going on behind the scenes. When git language is used accurately, users can more easily troubleshoot and learn concepts quickly.
32+
33+
### Put what’s next front and center
34+
35+
Always make it clear what the next step is after any given action. This helps beginner develolpers to learn common workflows.
36+
37+
You can read more about how GitHub Desktop makes product decisions in the
38+
["What is GitHub Desktop and who is it for?"](https://github.com/desktop/desktop/blob/development/docs/process/what-is-desktop.md) document.

‎content/native/desktop/index.mdx

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Desktop
3+
---
4+
5+
import {Box, Link, Text} from '@primer/react'
6+
7+
<Box display="grid" gridTemplateColumns={['1fr', null, null, null]} gridGap={4}>
8+
<div>
9+
<Link href="/native/desktop/getting-started" sx={{fontWeight: 'bold'}}>
10+
Getting Started
11+
</Link>
12+
<Text as="p">Get started with the principles, standards, and recommendations for designing Github Desktop.</Text>
13+
</div>
14+
<div>
15+
<Link href="/native/desktop/foundations" sx={{fontWeight: 'bold'}}>
16+
Foundations
17+
</Link>
18+
<Text as="p">These are the foundational design concepts and constraints that can help inform design decisions. The core considerations for GitHub Desktop include platform differences and relationships to Primer Web guidelines.</Text>
19+
</div>
20+
21+
</Box>

‎content/native/index.mdx

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Native
3+
---
4+
5+
import {Box, Link, Text} from '@primer/react'
6+
7+
<Box display="grid" gridTemplateColumns={['1fr', null, null, null]} gridGap={4}>
8+
<div>
9+
<Link href="/native/desktop/" sx={{fontWeight: 'bold'}}>
10+
Desktop
11+
</Link>
12+
<Text as="p">TODO: text for Desktop</Text>
13+
</div>
14+
</Box>

‎src/@primer/gatsby-theme-doctocat/nav.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,6 @@
161161
url: /components/tree-view
162162
- title: Native
163163
children:
164-
- title: Mobile
165-
children:
166-
- title: Platforms
167-
url: /native/mobile/platforms
168-
- title: Foundations
169-
url: /native/mobile/foundations
170164
- title: CLI
171165
children:
172166
- title: Getting started
@@ -175,3 +169,15 @@
175169
url: /native/cli/foundations
176170
- title: Components
177171
url: /native/cli/components
172+
- title: Desktop
173+
children:
174+
- title: Getting started
175+
url: /native/desktop/getting-started
176+
- title: Foundations
177+
url: /native/desktop/foundations
178+
- title: Mobile
179+
children:
180+
- title: Platforms
181+
url: /native/mobile/platforms
182+
- title: Foundations
183+
url: /native/mobile/foundations

0 commit comments

Comments
 (0)
Please sign in to comment.