Skip to content

Commit 256affc

Browse files
remove DiffStat component (#2403)
1 parent b631882 commit 256affc

File tree

6 files changed

+10
-127
lines changed

6 files changed

+10
-127
lines changed

.changeset/breezy-comics-attend.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@primer/css': major
3+
---
4+
5+
## Removed DiffStat component
6+
7+
- the diffStat component is removed from primer/css
8+
- the component is very specific to this use-case, it is not generic enough to be part of the primer design system and was thus chosen for removal
9+
- the component will be added to the github codebase directly so that it is still available
10+
- if you are working within github.com you should be ale to use diffStat just like before. On other projects you will need to copy the diffStat code and add it to your codebase

docs/content/components/labels.md

-23
Original file line numberDiff line numberDiff line change
@@ -99,26 +99,3 @@ If an issue label needs to be bigger, add the `.IssueLabel--big` modifier.
9999
<span class="IssueLabel IssueLabel--big color-bg-success-emphasis color-fg-on-emphasis mr-1">help wanted</span>
100100
<span class="IssueLabel IssueLabel--big color-bg-attention-emphasis color-fg-on-emphasis mr-1">🚂 deploy: train</span>
101101
```
102-
103-
## Diffstat
104-
105-
Diffstats show how many deletions or additions a diff has. It's typically a row of 5 blocks that get colored with green or red.
106-
107-
```html live
108-
<span class="diffstat tooltipped tooltipped-e" aria-label="6 changes: 3 additions &amp; 3 deletions">
109-
6
110-
<span class="diffstat-block-added"></span><span class="diffstat-block-added"></span><span class="diffstat-block-deleted"></span><span class="diffstat-block-deleted"></span><span class="diffstat-block-neutral"></span>
111-
</span>
112-
```
113-
114-
Use the `color-fg-success` and `color-fg-danger` utilities to add additional information about the size of the diff.
115-
116-
```html live
117-
<span class="diffstat">
118-
<span class="color-fg-success">+7</span>
119-
<span class="color-fg-danger">−2</span>
120-
<span class="tooltipped tooltipped-e" aria-label="9 lines changed">
121-
<span class="diffstat-block-added"></span><span class="diffstat-block-added"></span><span class="diffstat-block-added"></span><span class="diffstat-block-deleted"></span><span class="diffstat-block-neutral"></span>
122-
</span>
123-
</span>
124-
```

docs/content/stickersheet/labels.md

-19
Original file line numberDiff line numberDiff line change
@@ -128,22 +128,3 @@ The base <span class="Label Label--inline"> label </span> component styles the t
128128
<span class="Counter Counter--small mr-1 Counter--gray">456</span>
129129
<span class="Counter Counter--small mr-1">1.5K</span>
130130
```
131-
132-
### Diffstat
133-
134-
```html live
135-
<span class="diffstat tooltipped tooltipped-e" aria-label="6 changes: 3 additions &amp; 3 deletions">
136-
6
137-
<span class="diffstat-block-added"></span><span class="diffstat-block-added"></span><span class="diffstat-block-deleted"></span><span class="diffstat-block-deleted"></span><span class="diffstat-block-neutral"></span>
138-
</span>
139-
140-
<div class="my-4"></div><!-- Spacer ------------------------ -->
141-
142-
<span class="diffstat">
143-
<span class="color-fg-success">+7</span>
144-
<span class="color-fg-danger">−2</span>
145-
<span class="tooltipped tooltipped-e" aria-label="9 lines changed">
146-
<span class="diffstat-block-added"></span><span class="diffstat-block-added"></span><span class="diffstat-block-added"></span><span class="diffstat-block-deleted"></span><span class="diffstat-block-neutral"></span>
147-
</span>
148-
</span>
149-
```

docs/src/stories/components/Label/LabelDiffstat.stories.jsx

-47
This file was deleted.

src/labels/diffstat.scss

-37
This file was deleted.

src/labels/index.scss

-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@
44
@import './labels.scss';
55
@import './states.scss';
66
@import './counters.scss';
7-
@import './diffstat.scss';

0 commit comments

Comments
 (0)