Skip to content

Commit 52ceec9

Browse files
authored
Merge pull request #1 from 91volt/fspissu/dark-theme-implementation
Fspissu/dark theme implementation
2 parents 522a5c6 + 10d2e15 commit 52ceec9

File tree

9 files changed

+700
-7
lines changed

9 files changed

+700
-7
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: themes-weekly-pull
2+
3+
on:
4+
schedule:
5+
# run every friday at 5AM
6+
- cron: '0 5 * * 5'
7+
workflow_dispatch:
8+
9+
env:
10+
NODE_VERSION: 14.x
11+
12+
jobs:
13+
pull-from-jsonbin:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
19+
- name: Install Node.js
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: ${{ env.NODE_VERSION }}
23+
registry-url: 'https://registry.npmjs.org'
24+
25+
- name: Install dependencies
26+
run: yarn
27+
28+
- name: Run themes:pull script
29+
run: yarn run themes:pull
30+
env:
31+
JSONBIN_MASTER_KEY: ${{ secrets.JSONBIN_MASTER_KEY }}
32+
JSONBIN_ID: ${{ secrets.JSONBIN_ID }}
33+
34+
- name: Generate dark tokens
35+
run: npx token-transformer scripts/themes/tokens/arduino-tokens.json scripts/themes/tokens/dark.json core,ide-default,ide-dark,theia core,ide-default,ide-dark
36+
37+
- name: Generate default tokens
38+
run: npx token-transformer scripts/themes/tokens/arduino-tokens.json scripts/themes/tokens/default.json core,ide-default,theia core,ide-default
39+
40+
- name: Run themes:generate script
41+
run: yarn run themes:generate
42+
43+
- name: Create Pull Request
44+
uses: peter-evans/create-pull-request@v4
45+
with:
46+
commit-message: Updated themes
47+
title: Update themes
48+
branch: themes/themes-update
49+
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ yarn*.log
1717
plugins
1818
# the config files for the CLI
1919
arduino-ide-extension/data/cli/config
20+
# the tokens folder for the themes
21+
scripts/themes/tokens
22+
# environment variables
23+
.env

arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,14 @@ MonacoThemingService.register({
282282
id: 'arduino-theme',
283283
label: 'Light (Arduino)',
284284
uiTheme: 'vs',
285-
json: require('../../src/browser/data/arduino.color-theme.json'),
285+
json: require('../../src/browser/data/default.color-theme.json'),
286+
});
287+
288+
MonacoThemingService.register({
289+
id: 'arduino-theme-dark',
290+
label: 'Dark (Arduino)',
291+
uiTheme: 'vs-dark',
292+
json: require('../../src/browser/data/dark.color-theme.json'),
286293
});
287294

288295
export default new ContainerModule((bind, unbind, isBound, rebind) => {
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
{
2+
"name": "Arduino dark",
3+
"type": "dark",
4+
"colors": {
5+
"list.highlightForeground": "#0ca1a6",
6+
"list.activeSelectionForeground": "#dae3e3",
7+
"list.activeSelectionBackground": "#434f54",
8+
"list.inactiveSelectionForeground": "#dae3e3",
9+
"list.inactiveSelectionBackground": "#434f54",
10+
"list.hoverBackground": "#1f272a",
11+
"progressBar.background": "#005c5f",
12+
"editor.background": "#1f272a",
13+
"editor.foreground": "#dae3e3",
14+
"editor.lineHighlightBackground": "#434f5410",
15+
"editor.selectionBackground": "#f1c40f",
16+
"editorCursor.foreground": "#434f54",
17+
"editorWhitespace.foreground": "#bfbfbf",
18+
"editorWidget.background": "#171e21",
19+
"focusBorder": "#dae3e3",
20+
"menubar.selectionBackground": "#ffffff",
21+
"menubar.selectionForeground": "#212121",
22+
"menu.selectionBackground": "#dae3e3",
23+
"menu.selectionForeground": "#212121",
24+
"editorGroupHeader.tabsBackground": "#171e21",
25+
"button.background": "#0ca1a6",
26+
"titleBar.activeBackground": "#171e21",
27+
"titleBar.activeForeground": "#dae3e3",
28+
"terminal.background": "#000000",
29+
"terminal.foreground": "#e0e0e0",
30+
"dropdown.border": "#7fcbcd",
31+
"dropdown.background": "#2c353a",
32+
"dropdown.foreground": "#dae3e3",
33+
"activityBar.background": "#171e21",
34+
"activityBar.foreground": "#dae3e3",
35+
"activityBar.inactiveForeground": "#4e5b61",
36+
"activityBar.activeBorder": "#0ca1a6",
37+
"statusBar.background": "#171e21",
38+
"secondaryButton.background": "#ff000000",
39+
"secondaryButton.foreground": "#dae3e3",
40+
"secondaryButton.hoverBackground": "#434f54",
41+
"arduino.branding.primary": "#0ca1a6",
42+
"arduino.branding.secondary": "#b5c8c9",
43+
"arduino.foreground": "#edf1f1",
44+
"arduino.output.foreground": "#ffffff",
45+
"arduino.output.background": "#000000",
46+
"arduino.toolbar.hoverBackground": "#dae3e3",
47+
"sideBar.background": "#101618",
48+
"input.background": "#000000",
49+
"foreground": "#dae3e3",
50+
"settings.headerForeground": "#dae3e3",
51+
"tree.indentGuidesStroke": "#374146",
52+
"tab.unfocusedActiveForeground": "#dae3e3",
53+
"tab.inactiveBackground": "#171e21"
54+
},
55+
"tokenColors": [
56+
{
57+
"name": "",
58+
"settings": {
59+
"foreground": "#dae3e3"
60+
}
61+
},
62+
{
63+
"name": "Comments",
64+
"scope": "comment",
65+
"settings": {
66+
"foreground": "#7f8c8d"
67+
}
68+
},
69+
{
70+
"name": "Keywords Attributes",
71+
"scope": [
72+
"storage",
73+
"support",
74+
"string.quoted.single.c"
75+
],
76+
"settings": {
77+
"foreground": "#0ca1a6"
78+
}
79+
},
80+
{
81+
"name": "literal",
82+
"scope": [
83+
"meta.function.c",
84+
"entity.name.function",
85+
"meta.function-call.c",
86+
"variable.other"
87+
],
88+
"settings": {
89+
"foreground": "#F39C12"
90+
}
91+
},
92+
{
93+
"name": "punctuation",
94+
"scope": [
95+
"punctuation.section",
96+
"meta.function-call.c",
97+
"meta.block.c",
98+
"meta.function.c",
99+
"variable",
100+
"variable.name"
101+
],
102+
"settings": {
103+
"foreground": "#dae3e3"
104+
}
105+
},
106+
{
107+
"name": "function preprocessor",
108+
"scope": [
109+
"entity.name.function.preprocessor.c",
110+
"meta.preprocessor.macro.c"
111+
],
112+
"settings": {
113+
"foreground": "#569CD6"
114+
}
115+
},
116+
{
117+
"name": "constants",
118+
"scope": [
119+
"string.quoted.double",
120+
"string.quoted.other.lt-gt",
121+
"constant"
122+
],
123+
"settings": {
124+
"foreground": "#7fcbcd"
125+
}
126+
},
127+
{
128+
"name": "meta keywords",
129+
"scope": [
130+
"keyword.control",
131+
"meta.preprocessor.c"
132+
],
133+
"settings": {
134+
"foreground": "#C586C0"
135+
}
136+
},
137+
{
138+
"name": "numeric preprocessor",
139+
"scope": [
140+
"meta.preprocessor.macro.c",
141+
"constant.numeric.preprocessor.c",
142+
"meta.preprocessor.c"
143+
],
144+
"settings": {
145+
"foreground": "#434f54"
146+
}
147+
}
148+
]
149+
}
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
{
2+
"name": "Arduino default",
3+
"type": "default",
4+
"colors": {
5+
"list.highlightForeground": "#008184",
6+
"list.activeSelectionForeground": "#4e5b61",
7+
"list.activeSelectionBackground": "#dae3e3",
8+
"list.inactiveSelectionForeground": "#4e5b61",
9+
"list.inactiveSelectionBackground": "#dae3e3",
10+
"list.hoverBackground": "#ecf1f1",
11+
"progressBar.background": "#005c5f",
12+
"editor.background": "#ffffff",
13+
"editor.foreground": "#4e5b61",
14+
"editor.lineHighlightBackground": "#434f5410",
15+
"editor.selectionBackground": "#f1c40f",
16+
"editorCursor.foreground": "#434f54",
17+
"editorWhitespace.foreground": "#bfbfbf",
18+
"editorWidget.background": "#f7f9f9",
19+
"focusBorder": "#7fcbcd",
20+
"menubar.selectionBackground": "#ffffff",
21+
"menubar.selectionForeground": "#212121",
22+
"menu.selectionBackground": "#dae3e3",
23+
"menu.selectionForeground": "#212121",
24+
"editorGroupHeader.tabsBackground": "#ecf1f1",
25+
"button.background": "#7fcbcd",
26+
"titleBar.activeBackground": "#006d70",
27+
"titleBar.activeForeground": "#f7f9f9",
28+
"terminal.background": "#000000",
29+
"terminal.foreground": "#e0e0e0",
30+
"dropdown.border": "#f7f9f9",
31+
"dropdown.background": "#ffffff",
32+
"dropdown.foreground": "#4e5b61",
33+
"activityBar.background": "#ecf1f1",
34+
"activityBar.foreground": "#4e5b61",
35+
"activityBar.inactiveForeground": "#bdc7c7",
36+
"activityBar.activeBorder": "#008184",
37+
"statusBar.background": "#006d70",
38+
"secondaryButton.background": "#ff000000",
39+
"secondaryButton.foreground": "#008184",
40+
"secondaryButton.hoverBackground": "#dae3e3",
41+
"arduino.branding.primary": "#008184",
42+
"arduino.branding.secondary": "#b5c8c9",
43+
"arduino.foreground": "#edf1f1",
44+
"arduino.output.foreground": "#ffffff",
45+
"arduino.output.background": "#000000",
46+
"arduino.toolbar.hoverBackground": "#f7f9f9",
47+
"sideBar.background": "#f7f9f9",
48+
"input.background": "#ffffff",
49+
"foreground": "#4e5b61",
50+
"settings.headerForeground": "#4e5b61",
51+
"tree.indentGuidesStroke": "#dae3e3",
52+
"tab.unfocusedActiveForeground": "#4e5b61",
53+
"tab.inactiveBackground": "#ecf1f1"
54+
},
55+
"tokenColors": [
56+
{
57+
"name": "",
58+
"settings": {
59+
"foreground": "#434f54"
60+
}
61+
},
62+
{
63+
"name": "Comments",
64+
"scope": "comment",
65+
"settings": {
66+
"foreground": "#95a5a6cc"
67+
}
68+
},
69+
{
70+
"name": "Keywords Attributes",
71+
"scope": [
72+
"storage",
73+
"support",
74+
"string.quoted.single.c"
75+
],
76+
"settings": {
77+
"foreground": "#00979D"
78+
}
79+
},
80+
{
81+
"name": "literal",
82+
"scope": [
83+
"meta.function.c",
84+
"entity.name.function",
85+
"meta.function-call.c",
86+
"variable.other"
87+
],
88+
"settings": {
89+
"foreground": "#D35400"
90+
}
91+
},
92+
{
93+
"name": "punctuation",
94+
"scope": [
95+
"punctuation.section",
96+
"meta.function-call.c",
97+
"meta.block.c",
98+
"meta.function.c",
99+
"variable",
100+
"variable.name"
101+
],
102+
"settings": {
103+
"foreground": "#434f54"
104+
}
105+
},
106+
{
107+
"name": "function preprocessor",
108+
"scope": [
109+
"entity.name.function.preprocessor.c",
110+
"meta.preprocessor.macro.c"
111+
],
112+
"settings": {
113+
"foreground": "#9e846d"
114+
}
115+
},
116+
{
117+
"name": "constants",
118+
"scope": [
119+
"string.quoted.double",
120+
"string.quoted.other.lt-gt",
121+
"constant"
122+
],
123+
"settings": {
124+
"foreground": "#005C5F"
125+
}
126+
},
127+
{
128+
"name": "meta keywords",
129+
"scope": [
130+
"keyword.control",
131+
"meta.preprocessor.c"
132+
],
133+
"settings": {
134+
"foreground": "#728E00"
135+
}
136+
},
137+
{
138+
"name": "numeric preprocessor",
139+
"scope": [
140+
"meta.preprocessor.macro.c",
141+
"constant.numeric.preprocessor.c",
142+
"meta.preprocessor.c"
143+
],
144+
"settings": {
145+
"foreground": "#434f54"
146+
}
147+
}
148+
]
149+
}

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@
3131
"reflect-metadata": "^0.1.10",
3232
"rimraf": "^2.6.1",
3333
"semver": "^7.3.2",
34+
"style-dictionary": "^3.7.0",
3435
"typescript": "~4.5.5",
3536
"jsdom": "^11.5.1"
37+
"xhr2": "^0.2.1"
38+
3639
},
3740
"resolutions": {
3841
"find-git-exec": "0.0.4",
@@ -53,6 +56,8 @@
5356
"i18n:check": "yarn i18n:generate && git add -N ./i18n && git diff --exit-code ./i18n",
5457
"i18n:push": "node ./scripts/i18n/transifex-push.js ./i18n/en.json",
5558
"i18n:pull": "node ./scripts/i18n/transifex-pull.js ./i18n/",
59+
"themes:pull": "node ./scripts/themes/theme-tokens-pull.js",
60+
"themes:generate": "node ./scripts/themes/theme-generator.js",
5661
"compose-changelog": "yarn --cwd ./arduino-ide-extension compose-changelog"
5762
},
5863
"lint-staged": {

0 commit comments

Comments
 (0)