Skip to content

Commit

Permalink
Merge branch 'remote-status' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
simurai authored Mar 17, 2022
2 parents 398126d + 403f562 commit c70767f
Show file tree
Hide file tree
Showing 19 changed files with 3,416 additions and 2,878 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
10 changes: 10 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", {"repo": "primer/github-vscode-theme"}],
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/dry-jobs-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"github-vscode-theme": minor
---

fix: add missing scope variable.other.enummember
5 changes: 5 additions & 0 deletions .changeset/olive-clocks-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"github-vscode-theme": minor
---

Update markdown inline code scope
5 changes: 5 additions & 0 deletions .changeset/rare-games-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"github-vscode-theme": minor
---

feat: add underline support
5 changes: 5 additions & 0 deletions .github/diff_comment_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<details>
<summary><strong>Colors changed</strong></summary>

<!-- diff --><!-- /diff -->
</details>
98 changes: 98 additions & 0 deletions .github/workflows/diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Posts a comment listing all the colors that changed in a PR
name: Diff
on:
pull_request:
branches-ignore:
- 'test/**'
jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 14

- name: Create comment (if necessary)
uses: actions/github-script@v5
with:
script: |
const fs = require('fs')
const body = fs.readFileSync('.github/diff_comment_template.md', 'utf8')
const result = await github.rest.issues.listComments({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo
});
console.log(result.data)
const botComments = result.data.filter(c => c.user.login === 'github-actions[bot]')
if (!botComments.length) {
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body
})
}
diff:
needs: comment
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Checkout base branch
uses: actions/checkout@v2
with:
ref: ${{ github.base_ref }}
path: base

- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: 14

- name: Install dependencies
run: yarn

- name: Build
run: yarn build

- name: Install dependencies (base)
run: pushd base; yarn; popd

- name: Build (base)
run: pushd base; yarn build; popd

- name: Diff
uses: primer/comment-token-update@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USER: github-actions[bot]
with:
# This action will find the first comment by `github-actions[bot]` and
# insert the diff data if `<!-- diff --><!-- /diff -->` is present in that comment.
# If there are multiple comments by `github-actions[bot]`
# or if `<!-- diff --><!-- /diff -->` is missing,
# this action may not work as expected.
comment-token: 'diff'
script: |
diff=$(for file in themes/*.json
do
diff -U 1 base/$file $file
done)
echo "\`\`\`diff"
if [[ $diff ]]
then
echo "$diff"
else
echo "No colors changed"
fi
echo "\`\`\`"
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release
on:
push:
branches:
- 'main'
jobs:
release:
name: Final
if: ${{ github.repository == 'primer/github-vscode-theme' }}

runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14.x

- name: Install dependencies
run: yarn

- name: Create release pull request or publish to npm
id: changesets
uses: changesets/action@master
with:
title: Release Tracking
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GPR_AUTH_TOKEN_SHARED }}
VSCE_PAT: ${{ secrets.VSCE_PUBLISHER_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.DS_Store
node_modules/
/themes/
package-lock.json
build
*.vsix
3 changes: 3 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.vscode/**
.vscode-test/**
.changeset/
.github/
.gitignore
/node_modules/
/package-lock.json
/src/
/build/
78 changes: 77 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,79 @@
# github-vscode-theme

## 6.0.0

### Major Changes

- [#240](https://github.com/primer/github-vscode-theme/pull/240) [`075feb5`](https://github.com/primer/github-vscode-theme/commit/075feb5c753b3ac3fc2029e98203be5134bcd8f7) Thanks [@maximedegreve](https://github.com/maximedegreve)! - # Light High Contrast Theme

GitHub Light High Contrast is now out of beta and available to everyone. 🎉

![Light High Contrast Theme](https://user-images.githubusercontent.com/980622/151374445-39670cae-ab83-400c-8b7d-fe4dd36c7cc3.png)

## 5.2.2

### Patch Changes

- [#244](https://github.com/primer/github-vscode-theme/pull/244) [`d318d0e`](https://github.com/primer/github-vscode-theme/commit/d318d0eb3aa3a48c0983c3cc7b245847643b046a) Thanks [@maximedegreve](https://github.com/maximedegreve)! - Easier code to manage + port values to new primitives

## 5.2.1

### Patch Changes

- [#256](https://github.com/primer/github-vscode-theme/pull/256) [`6549f32`](https://github.com/primer/github-vscode-theme/commit/6549f32ee5e97bb01655d4de47672c15e58e06c9) Thanks [@simurai](https://github.com/simurai)! - Fix Dark Dimmed from loosing syntax highlighting

## 5.2.0

### Minor Changes

- [#240](https://github.com/primer/github-vscode-theme/pull/240) [`075feb5`](https://github.com/primer/github-vscode-theme/commit/075feb5c753b3ac3fc2029e98203be5134bcd8f7) Thanks [@maximedegreve](https://github.com/maximedegreve)! - Light High Contrast Theme

## 5.1.0

### Minor Changes

- [#225](https://github.com/primer/github-vscode-theme/pull/225) [`241d482`](https://github.com/primer/github-vscode-theme/commit/241d48297ea3a7c91d6bf3c61b5beffb13044f32) Thanks [@maximedegreve](https://github.com/maximedegreve)! - # Colorblind Light & Dark Theme
Adds a new GitHub Colorblind Light and Dark theme similar to the themes on github.com.

![Colorblind](https://user-images.githubusercontent.com/980622/136975341-4d5eca55-40d6-4d9f-8b33-ba8acbc805e4.png)

## 5.0.3

### Patch Changes

- [#234](https://github.com/primer/github-vscode-theme/pull/234) [`bbb3a83`](https://github.com/primer/github-vscode-theme/commit/bbb3a83f20be57106f6bf68bb06b7d64b2a58025) Thanks [@simurai](https://github.com/simurai)! - Update README

## 5.0.2

### Patch Changes

- [#232](https://github.com/primer/github-vscode-theme/pull/232) [`027ef70`](https://github.com/primer/github-vscode-theme/commit/027ef7050ba360a76d7bdd252ff60568edc4343b) Thanks [@jonrohan](https://github.com/jonrohan)! - Testing another patch release

## 5.0.1

### Patch Changes

- [#229](https://github.com/primer/github-vscode-theme/pull/229) [`4279f43`](https://github.com/primer/github-vscode-theme/commit/4279f431387df11544508f618ecc75c3739a95ed) Thanks [@simurai](https://github.com/simurai)! - Add note about publishing

## 5.0.0

### Major Changes

- Add new "GitHub Dark High Contrast" theme [#203](https://github.com/primer/github-vscode-theme/pull/203).
- Update colors from Primer Primitives [#203](https://github.com/primer/github-vscode-theme/pull/203).

![GitHub VS Code theme](https://user-images.githubusercontent.com/378023/132220037-3cd3e777-55a6-445f-9a2e-da6020ebd78d.png)

## 4.2.1

- Fix importing v2 colors from primer/primitives

## 4.2.0

- Add `editorBracketHighlight` and ANSI to classic. [#205](https://github.com/primer/github-vscode-theme/pull/205).
- Set `terminal.tab.activeBorder` based on editor tab [#189](https://github.com/primer/github-vscode-theme/pull/189).
- More clearer for the difference between new theme and legacy theme [#191](https://github.com/primer/github-vscode-theme/pull/191).

## 4.1.1

- Generate themes based on `4.1.0`.
Expand Down Expand Up @@ -40,7 +116,7 @@

## 3.0.0

- Revert dark changes [#123](https://github.com/primer/github-vscode-theme/pull/123). This should be the same as the `1.1.5` version.
- Revert dark changes [#123](https://github.com/primer/github-vscode-theme/pull/123). This should be the same as the `1.1.5` version.

## 2.0.1

Expand Down
44 changes: 21 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,47 @@
# GitHub's VS Code themes

![GitHub VS Code theme](https://user-images.githubusercontent.com/378023/114663107-c1c97e00-9d34-11eb-8aa6-0c4f3d35af0b.png)
![GitHub VS Code theme](https://user-images.githubusercontent.com/378023/132220037-3cd3e777-55a6-445f-9a2e-da6020ebd78d.png)

## Install

1. Go to [VS Marketplace](https://marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme).
2. Click on the "Install" button.
3. Then [select a theme](https://code.visualstudio.com/docs/getstarted/themes#_selecting-the-color-theme). Currently the following themes are available:
- `GitHub Light`
- `GitHub Dark`
- `GitHub Light Default` ✨ new ✨
- `GitHub Dark Default` ✨ new ✨
- `GitHub Dark Dimmed` ✨ new ✨
3. Then [select a theme](https://code.visualstudio.com/docs/getstarted/themes#_selecting-the-color-theme). The GitHub themes try to match the themes available in [github.com's settings](https://github.com/settings/appearance):
- `GitHub Light Default`
- `GitHub Light High Contrast` ✨ new ✨
- `GitHub Light Colorblind` ✨ new ✨
- `GitHub Dark Default`
- `GitHub Dark High Contrast`
- `GitHub Dark Colorblind` ✨ new ✨
- `GitHub Dark Dimmed`

Additionally, there are also two older themes. **Note**: They might not get updated frequently and are kept for legacy reasons:

- `GitHub Light` (legacy)
- `GitHub Dark` (legacy)

## Override this theme

To quickly test something, you can also override this (or any other) theme in your personal config file. Please follow the guide in the [color theme](https://code.visualstudio.com/api/extension-guides/color-theme) documentation.
To override this (or any other) theme in your personal config file, please follow the guide in the [color theme](https://code.visualstudio.com/api/extension-guides/color-theme) documentation. This is handy for small tweaks to the theme without having to fork and maintain your own theme.

## Contribute

1. Clone and open this [repo](https://github.com/primer/github-vscode-theme) in VS Code
2. Run `npm install` to install the Primer CSS color reference and run `npm start` to run the converter.
2. Run `yarn` to install the dependencies.
3. Press `F5` to open a new window with your extension loaded
4. Open `Code > Preferences > Color Theme` [`⌘k ⌘t`] and pick the "GitHub Light" or "GitHub Dark" theme
4. Open `Code > Preferences > Color Theme` [`⌘k ⌘t`] and pick the "GitHub ..." theme you want to test. Note: It seems this has to be done 2x because the first time it switches back to the default light theme. This might be a bug?
5. Make changes to the [`/src/theme.js`](https://github.com/primer/github-vscode-theme/blob/master/src/theme.js) file.
- **UI**: For all changes to the "outer UI", like (status bar, file navigation etc.), take a look at the [Theme Color](https://code.visualstudio.com/api/references/theme-color) reference.
- **Syntax**: For changes to the "code highlighting", examine the syntax scopes by invoking the [`Developer: Inspect Editor Tokens and Scopes`](https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#scope-inspector) command from the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) in the Extension Development Host window.
6. Commit your changes and open a PR.
6. Run `yarn build` to update the theme. You can also run `yarn start` instead to automatically rebuild the theme while making changes and no reloading should be necessary.
7. Once you're happy, commit your changes and open a PR.

Note:

- If possible use colors from [Primer's color system](https://primer.style/css/support/color-system).
- Changes to the theme files are automatically applied to the Extension Development Host window, so no reloading should be necessary.
- If possible use colors from [Primer's color system](https://primer.style/primitives/colors).

## Publish (internal)

> Note: Publishing a new version of this theme is only meant for maintainers.
**Prerequisite**: Please follow this [guide](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) to install and login to `vsce`. Ask an existing maintainer how to get the "Personal Access Token".

1. Merge any PR that is ready to be published into `master`.
2. Run `npm run build` to generate the themes with the new changes.
3. Update [CHANGELOG.md](https://github.com/primer/github-vscode-theme/blob/master/CHANGELOG.md) + commit the changes.
4. Run `vsce publish [version]`. Follow the [SemVer](https://semver.org) convention and replace `[version]` with one of the following options:
- `patch` for bug fixes
- `minor` for improvements
- `major` for breaking or bigger changes
5. Push the commits and make a [new release](https://github.com/primer/github-vscode-theme/releases/new).
This repo uses [changesets](https://github.com/atlassian/changesets) to automatically make updates to [CHANGELOG.md](https://github.com/primer/github-vscode-theme/blob/main/CHANGELOG.md) and publish a new version to the [VS Marketplace](https://marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme).
Loading

0 comments on commit c70767f

Please sign in to comment.