Skip to content

Commit

Permalink
Merge 0f0a6e8 into 028ad8e
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasoppermann authored Oct 8, 2024
2 parents 028ad8e + 0f0a6e8 commit 7f86070
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 30 deletions.
47 changes: 45 additions & 2 deletions .github/workflows/a11y-contrast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,28 @@ jobs:
repo: context.repo.repo
});
const possibleTitles = [
'❌ light:',
'❌ light_high_contrast:',
'❌ light_colorblind:',
'❌ light_tritanopia:',
'❌ dark:',
'❌ dark_dimmed:',
'❌ dark_high_contrast:',
'❌ dark_colorblind:',
'❌ dark_tritanopia:'
]
// get comments of token issues
let currentComments = comments.filter(comment => possibleTitles.some(titleStart => comment.body.includes(titleStart)));
for (const {title, body} of results) {
// get token issue
const tokenCheckComment = comments.filter(comment => comment.body.includes(title));
const titleStart = title.substring(0, title.indexOf(':') + 1);
// remove from currentComments
currentComments = currentComments.filter(comment => !comment.body.includes(titleStart));
//
const tokenCheckComment = comments.filter(comment => comment.body.includes(titleStart));
const outputBody = `${title}\n\n${body}\n\n<a href="${WORKFLOW_SUMMARY_URL}">→ Details</a>`
// if token issue exists, update it
Expand All @@ -136,6 +155,18 @@ jobs:
}
}
// if token issue exists, update it
if(currentComments.length > 0) {
await currentComments.map(comment => {
console.log('deleting comment', comment.id, comment)
github.rest.issues.deleteComment({
comment_id: comment.id,
owner: context.repo.owner,
repo: context.repo.repo,
})
})
}
Fail_action_on_contrast_failing:
needs: build
name: Fail action on contrast failing
Expand Down Expand Up @@ -164,8 +195,20 @@ jobs:
repo: context.repo.repo
});
const possibleTitles = [
'❌ light:',
'❌ light_high_contrast:',
'❌ light_colorblind:',
'❌ light_tritanopia:',
'❌ dark:',
'❌ dark_dimmed:',
'❌ dark_high_contrast:',
'❌ dark_colorblind:',
'❌ dark_tritanopia:'
]
// get token issue
const tokenCheckComment = comments.filter(comment => comment.body.includes('## Design Token Contrast Check'));
const tokenCheckComment = comments.filter(comment => possibleTitles.some(titleStart => comment.body.includes(titleStart)));
// if token issue exists, update it
if(tokenCheckComment.length > 0) {
Expand Down
20 changes: 10 additions & 10 deletions src/tokens/base/color/dark/dark.json5
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
},
green: {
'0': {
$value: '#aff5b4',
$value: '#70e691',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -273,7 +273,7 @@
},
},
'1': {
$value: '#7ee787',
$value: '#1edc5a',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -282,7 +282,7 @@
},
},
'2': {
$value: '#56d364',
$value: '#13c351',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -291,7 +291,7 @@
},
},
'3': {
$value: '#3fb950',
$value: '#0cb64d',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -300,7 +300,7 @@
},
},
'4': {
$value: '#2ea043',
$value: '#048f3e',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -309,7 +309,7 @@
},
},
'5': {
$value: '#238636',
$value: '#00873D',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -318,7 +318,7 @@
},
},
'6': {
$value: '#196c2e',
$value: '#005c2c',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -327,7 +327,7 @@
},
},
'7': {
$value: '#0f5323',
$value: '#004725',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -336,7 +336,7 @@
},
},
'8': {
$value: '#033a16',
$value: '#00331c',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -345,7 +345,7 @@
},
},
'9': {
$value: '#04260f',
$value: '#002918',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand Down
20 changes: 10 additions & 10 deletions src/tokens/base/color/light/light.json5
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
},
green: {
'0': {
$value: '#dafbe1',
$value: '#cbf6d7',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -273,7 +273,7 @@
},
},
'1': {
$value: '#aceebb',
$value: '#8aefaa',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -282,7 +282,7 @@
},
},
'2': {
$value: '#6fdd8b',
$value: '#16da5a',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -291,7 +291,7 @@
},
},
'3': {
$value: '#4ac26b',
$value: '#0cc051',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -300,7 +300,7 @@
},
},
'4': {
$value: '#2da44e',
$value: '#05a347',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -309,7 +309,7 @@
},
},
'5': {
$value: '#1a7f37',
$value: '#00873D',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -318,7 +318,7 @@
},
},
'6': {
$value: '#116329',
$value: '#007036',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -327,7 +327,7 @@
},
},
'7': {
$value: '#044f1e',
$value: '#006132',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -336,7 +336,7 @@
},
},
'8': {
$value: '#003d16',
$value: '#004d2a',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -345,7 +345,7 @@
},
},
'9': {
$value: '#002d11',
$value: '#003821',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand Down
4 changes: 2 additions & 2 deletions src/tokens/functional/color/light/patterns-light.json5
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
scopes: ['bgColor'],
},
},
}
},
},
},
button: {
Expand Down Expand Up @@ -2089,7 +2089,7 @@
underlineNav: {
borderColor: {
active: {
$value: '{base.color.coral.3}',
$value: '#FD794F',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand Down
8 changes: 2 additions & 6 deletions src/tokens/functional/color/light/primitives-light.json5
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
},
},
success: {
$value: '{base.color.green.5}',
$value: '{base.color.green.6}',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand Down Expand Up @@ -475,7 +475,7 @@
},
},
emphasis: {
$value: '{base.color.green.4}',
$value: '{base.color.green.5}',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -488,10 +488,6 @@
},
},
},
mix: {
color: '{base.color.green.5}',
weight: 0.75,
},
},
},
open: {
Expand Down

0 comments on commit 7f86070

Please sign in to comment.