Skip to content

Commit 5cf987e

Browse files
feat(elements): refresh some icons and colours (#3978)
1 parent fca4d58 commit 5cf987e

File tree

99 files changed

+282
-284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+282
-284
lines changed

.github/workflows/update-screenshots.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,22 @@ jobs:
1616
app-id: ${{ vars.STRYKER_MUTATOR_APP_ID }}
1717
private-key: ${{ secrets.STRYKER_MUTATOR_NPA_KEY }}
1818
- uses: actions/checkout@v6
19-
with:
20-
token: ${{ steps.generate-token.outputs.token }}
21-
persist-credentials: false
2219
- uses: ./.github/setup
2320
- run: npx playwright install chromium firefox --with-deps
24-
- run: npx nx run-many --target=build
21+
- run: npx nx run-many -t generate,build:tsc
2522
- run: npx nx run elements:test:integration:update
23+
- name: Get GitHub App User ID
24+
id: get-user-id
25+
shell: bash
26+
run: echo "user-id=$(gh api "/users/${{ steps.generate-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
27+
env:
28+
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
29+
- run: |
30+
git config --global user.name '${{ steps.generate-token.outputs.app-slug }}[bot]'
31+
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.generate-token.outputs.app-slug }}[bot]@users.noreply.github.com'
2632
- name: Commit
2733
run: |
28-
git config --global user.name "stryker-mutator[bot]"
29-
git config --global user.email 158062761+stryker-mutator[bot]@users.noreply.github.com
30-
git pull
3134
git add .
3235
git commit -m "test(screenshots): update screenshots for ${{ runner.os }}"
36+
git pull --rebase
3337
git push
34-
env:
35-
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}

packages/elements/playwright.config.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default defineConfig({
2020
/* Opt out of parallel tests on CI. */
2121
workers: process.env.CI ? 1 : undefined,
2222
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
23-
reporter: process.env.CI ? [['github'], ['html']] : [['list'], ['html']],
23+
reporter: process.env.CI ? [['github'], ['list'], ['html']] : [['list'], ['html']],
2424
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2525
use: {
2626
/* Base URL to use in actions like `await page.goto('/')`. */
@@ -31,15 +31,9 @@ export default defineConfig({
3131
},
3232
/* Configure projects for major browsers */
3333
projects: [
34-
{
35-
name: 'chromium',
36-
use: { ...devices['Desktop Chrome'], viewport: { width: 1400, height: 1000 } },
37-
},
34+
{ name: 'chromium', use: { ...devices['Desktop Chrome'], viewport: { width: 1400, height: 1000 } } },
3835

39-
{
40-
name: 'firefox',
41-
use: { ...devices['Desktop Firefox'] },
42-
},
36+
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
4337

4438
// {
4539
// name: 'webkit',
@@ -68,9 +62,5 @@ export default defineConfig({
6862
],
6963

7064
/* Run your local dev server before starting the tests */
71-
webServer: {
72-
command: 'npm run start -- --port 5173',
73-
url: 'http://localhost:5173',
74-
reuseExistingServer: !process.env.CI,
75-
},
65+
webServer: { command: 'npm run start -- --port 5173', url: 'http://localhost:5173', reuseExistingServer: !process.env.CI },
7666
});

packages/elements/src/components/app/theme.css

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* Prismjs theming (code highlighting) ===================================== */
22
:host(:not([theme='dark'])) {
3-
--prism-maintext: #393a34;
4-
--prism-background: #f6f8fa;
5-
--prism-border: #ddd;
3+
--prism-maintext: var(--color-gray-700);
4+
--prism-background: var(--color-gray-50);
5+
--prism-border: var(--color-gray-200);
66

77
/* from https://github.com/FormidableLabs/prism-react-renderer/blob/master/src/themes/github.js */
88
--prism-cdata: #999988;
@@ -42,8 +42,8 @@
4242
}
4343
:host([theme='dark']) {
4444
/* From https://atelierbram.github.io/syntax-highlighting/prism/demo/assets/css/prism-atom-dark.css */
45-
--prism-maintext: #d3d0c8;
46-
--prism-background: #1d1f21;
45+
--prism-maintext: var(--mut-gray-700);
46+
--prism-background: var(--mut-gray-50);
4747
--prism-border: var(--mut-gray-200);
4848

4949
--prism-cdata: #7c7c7c;
@@ -96,13 +96,13 @@
9696
/* @see https://github.com/microsoft/vscode/blob/master/extensions/theme-seti/icons/vs-seti-icon-theme.json */
9797
:host(:not([theme='dark'])) {
9898
--mut-file-ts-color: #498ba7;
99-
--mut-file-ts-test-color: #b7b73b;
99+
--mut-file-ts-test-color: #cc6d2e;
100100
--mut-file-scala-color: #b8383d;
101101
--mut-file-java-color: #b8383d;
102102
--mut-file-js-color: #b7b73b;
103103
--mut-file-js-test-color: #cc6d2e;
104104
--mut-file-php-color: #9068b0;
105-
--mut-file-html-color: #498ba7;
105+
--mut-file-html-color: #cc6d2e;
106106
--mut-file-csharp-color: #498ba7;
107107
--mut-file-vue-color: #7fae42;
108108
--mut-file-gherkin-color: #00a818;
@@ -112,13 +112,13 @@
112112
}
113113
:host([theme='dark']) {
114114
--mut-file-ts-color: #519aba;
115-
--mut-file-ts-test-color: #cbcb41;
115+
--mut-file-ts-test-color: #e37933;
116116
--mut-file-scala-color: #cc3e44;
117117
--mut-file-java-color: #cc3e44;
118118
--mut-file-js-color: #cbcb41;
119119
--mut-file-js-test-color: #e37933;
120120
--mut-file-php-color: #a074c4;
121-
--mut-file-html-color: #519aba;
121+
--mut-file-html-color: #e37933;
122122
--mut-file-csharp-color: #519aba;
123123
--mut-file-vue-color: #8dc149;
124124
--mut-file-gherkin-color: #10b828;
@@ -138,32 +138,32 @@
138138
}
139139

140140
:host(:not([theme='dark'])) {
141-
--mut-octicon-icon-color: #498ba7;
142-
--mut-line-number: #6e7781;
143-
--mut-diff-add-bg: #e6ffec;
144-
--mut-diff-add-bg-line-number: #ccffd8;
145-
--mut-diff-add-line-number: #24292f;
146-
--mut-diff-del-bg: #ffebe9;
147-
--mut-diff-del-bg-line-number: #ffd7d5;
141+
--mut-octicon-icon-color: var(--color-primary-600);
142+
--mut-line-number: var(--color-gray-400);
143+
144+
--mut-diff-add-bg: oklch(from var(--color-green-300) l c h / 0.3);
145+
--mut-diff-add-bg-line-number: oklch(from var(--color-green-300) l c h / 0.5);
146+
--mut-diff-add-line-number: var(--color-gray-600);
147+
148+
--mut-diff-del-bg: oklch(from var(--color-red-300) l c h / 0.3);
149+
--mut-diff-del-bg-line-number: oklch(from var(--color-red-300) l c h / 0.5);
150+
148151
--mut-diff-del-line-number: var(--mut-diff-add-line-number);
149-
--mut-badge-info-bg: #54c6ec;
150-
--mut-badge-info: #212529;
151-
--mut-code-lense: #919191;
152152
}
153153
:host([theme='dark']) {
154154
color-scheme: dark;
155155

156-
--mut-octicon-icon-color: #519aba;
157-
--mut-line-number: #484f58;
158-
--mut-diff-add-bg: rgba(46, 160, 67, 0.15);
159-
--mut-diff-add-bg-line-number: rgba(63, 185, 80, 0.3);
160-
--mut-diff-add-line-number: #c9d1d9;
161-
--mut-diff-del-bg: rgba(248, 81, 73, 0.15);
162-
--mut-diff-del-bg-line-number: rgba(248, 81, 73, 0.3);
163-
--mut-diff-del-line-number: #c9d1d9;
164-
--mut-badge-info-bg: #17a3b8;
165-
--mut-badge-info: #fff;
166-
--mut-code-lense: #999;
156+
--mut-octicon-icon-color: var(--color-primary-500);
157+
--mut-line-number: var(--color-gray-400);
158+
159+
--mut-diff-add-bg: oklch(from var(--color-green-600) l c h / 0.15);
160+
--mut-diff-add-bg-line-number: oklch(from var(--color-green-600) l c h / 0.3);
161+
--mut-diff-add-line-number: var(--color-gray-700);
162+
163+
--mut-diff-del-bg: oklch(from var(--color-red-600) l c h / 0.15);
164+
--mut-diff-del-bg-line-number: oklch(from var(--color-red-600) l c h / 0.3);
165+
166+
--mut-diff-del-line-number: var(--mut-diff-add-line-number);
167167
}
168168

169169
/* Dark mode colors */
@@ -184,7 +184,7 @@
184184

185185
/* --mut-primary-50: var(--color-sky-900); */
186186
--mut-primary-100: var(--color-sky-800);
187-
/* --mut-primary-200: var(--color-sky-700); */
187+
--mut-primary-200: var(--color-sky-700);
188188
/* --mut-primary-300: var(--color-sky-600); */
189189
/* --mut-primary-400: var(--color-sky-500); */
190190
/* --mut-primary-500: var(--color-sky-400); */

packages/elements/src/components/breadcrumb.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class MutationTestReportBreadcrumbComponent extends BaseElement {
2626
}
2727

2828
public render() {
29-
return html`<nav class="my-4 flex rounded-md border border-primary-600 bg-primary-100 p-3 text-gray-700" aria-label="Breadcrumb">
29+
return html`<nav class="my-4 flex rounded-md bg-primary-100 p-3 text-gray-700" aria-label="Breadcrumb">
3030
<ol class="inline-flex items-center">
3131
${this.path && this.path.length > 0 ? this.#renderLink(this.rootName, []) : this.#renderActiveItem(this.rootName)}
3232
${this.#renderBreadcrumbItems()}
@@ -71,7 +71,9 @@ export class MutationTestReportBreadcrumbComponent extends BaseElement {
7171

7272
#renderSearchIcon() {
7373
return html`
74-
<button @click="${() => this.#dispatchFilePickerOpenEvent()}" class="ml-auto" title="Open file picker (Ctrl-K)">${searchIcon}</button>
74+
<button @click="${() => this.#dispatchFilePickerOpenEvent()}" class="ml-auto cursor-pointer" title="Open file picker (Ctrl-K)"
75+
>${searchIcon}</button
76+
>
7577
`;
7678
}
7779

0 commit comments

Comments
 (0)