Skip to content

Commit

Permalink
Merge branch 'main' into types/StructuredList
Browse files Browse the repository at this point in the history
  • Loading branch information
tay1orjones authored Sep 19, 2023
2 parents 9c5da70 + 7cd529f commit b03c36b
Show file tree
Hide file tree
Showing 82 changed files with 997 additions and 552 deletions.
2 changes: 1 addition & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,7 @@
"contributions": [
"code"
]
},
}
],
"commitConvention": "none"
}
4 changes: 2 additions & 2 deletions .github/workflows/deploy-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
@carbon/icons@next \
@carbon/icons-react@next \
- name: Generate token
uses: tibdex/github-app-token@v1
uses: tibdex/github-app-token@0914d50df753bbc42180d982a6550f195390069f #v2.0.0
id: generate_token
with:
app_id: ${{ secrets.APP_ID }}
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
@carbon/pictograms-react \
@carbon/react
- name: Generate token
uses: tibdex/github-app-token@v1
uses: tibdex/github-app-token@0914d50df753bbc42180d982a6550f195390069f #v2.0.0
id: generate_token
with:
app_id: ${{ secrets.APP_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@main
- name: Generate token
uses: tibdex/github-app-token@v1
uses: tibdex/github-app-token@0914d50df753bbc42180d982a6550f195390069f #v2.0.0
id: generate_token
with:
app_id: ${{ secrets.APP_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@main
- name: Generate token
uses: tibdex/github-app-token@v1
uses: tibdex/github-app-token@0914d50df753bbc42180d982a6550f195390069f #v2.0.0
id: generate_token
with:
app_id: ${{ secrets.APP_ID }}
Expand Down
100 changes: 97 additions & 3 deletions .github/workflows/slack-office-hours-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
- cron: '0 14 * * TUE'

jobs:
post-reminder:
post-reminder-to-carbon-react:
name: Post dev reminder to carbon-react
runs-on: ubuntu-latest
steps:
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/[email protected]
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 #v1.24.0
with:
payload: |
{
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Carbon developer office hours* are a bi-weekly opportunity to discuss topics like these and get help from the team. Developers from the Carbon System Squad, who maintain the core React components, elements and styles, will be available to help and answer questions. While it's very informal, please be prepared to screen share and show your issue!"
"text": "*Carbon developer office hours* are a bi-weekly opportunity to discuss topics like these and get help from the team. Developers from the Carbon team will be available to help and answer questions. While it's very informal, please be prepared to screen share and show your issue!"
}
},
{
Expand Down Expand Up @@ -98,3 +98,97 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

post-reminder-to-carbon-web-components:
name: Post dev reminder to carbon-web-components
runs-on: ubuntu-latest
steps:
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 #v1.24.0
with:
payload: |
{
"username": "Carbon Design System",
"icon_url": "https://user-images.githubusercontent.com/3360588/192045905-5d9705af-92e2-4432-805e-15db98571e8b.png",
"channel": "#carbon-web-components",
"text": "Join us for Carbon Developer Office Hours!",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "Join us for Carbon Developer Office Hours!",
"emoji": true
}
},
{
"type": "divider"
},
{
"type": "image",
"image_url": "https://carbondesignsystem.com/static/406b7e7bf6865c094dd9a7a0bcb8bd41/3cbba/light-getting-started-developers.png",
"alt_text": "A terminal prompt symbol"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":thinking_face: _Are you running into a weird bug you can’t resolve?_ \n\n_:question: Do you have questions about using Carbon?_ \n\n :rocket: _Would you like to discuss migrating from v10 to v11?_"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Carbon developer office hours* are a bi-weekly opportunity to discuss topics like these and get help from the team. Developers from the Carbon team will be available to help and answer questions. While it's very informal, please be prepared to screen share and show your issue!"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":yourlearning: *Subscribe and add to your calendar* :ibm-arrow-right::ibm-arrow-right::ibm-arrow-right:"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": "Subscribe",
"emoji": true
},
"value": "click_me_123",
"url": "https://ec.yourlearning.ibm.com/w3/enrollment/event/10322733",
"action_id": "button-action"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":memo: *Sign up to get help in a future session* :ibm-arrow-right::ibm-arrow-right::ibm-arrow-right:"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": "View the agenda",
"emoji": true
},
"value": "click_me_123",
"url": "https://ibm.biz/carbon-dev-office-hours",
"action_id": "button-action"
}
},
{
"type": "divider"
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

2 changes: 1 addition & 1 deletion .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: |
yarn lerna version minor --no-git-tag-version --no-push --yes
- name: Generate token
uses: tibdex/github-app-token@v1
uses: tibdex/github-app-token@0914d50df753bbc42180d982a6550f195390069f #v2.0.0
id: generate_token
with:
app_id: ${{ secrets.APP_ID }}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
<tr>
<td align="center"><a href="https://github.com/djragsdale"><img src="https://avatars.githubusercontent.com/u/4396766?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David Ragsdale</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=djragsdale" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/haocheng6"><img src="https://avatars.githubusercontent.com/u/7645930?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hao Cheng</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=haocheng6" title="Code">💻</a></td>
<td align="center"><a href="https://med-aziz-chebbi.web.app/"><img src="https://avatars.githubusercontent.com/u/60013060?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aziz Chebbi</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=azizChebbi" title="Code">💻</a> <a href="https://github.com/carbon-design-system/carbon/commits?author=azizChebbi" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/cordesmj"><img src="https://avatars.githubusercontent.com/u/7409239?v=4?s=100" width="100px;" alt=""/><br /><sub><b>cordesmj</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=cordesmj" title="Code">💻</a></td>
<td align="center"><a href="https://med-aziz-chebbi.web.app/"><img src="https://avatars.githubusercontent.com/u/60013060?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aziz Chebbi</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=azizChebbi" title="Code">💻</a></td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion config/eslint-config-carbon/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "eslint-config-carbon",
"description": "ESLint configuration for Carbon",
"version": "3.10.0-rc.0",
"version": "3.10.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions config/stylelint-config-carbon/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "stylelint-config-carbon",
"description": "Stylelint configuration for Carbon",
"version": "1.15.0-rc.0",
"version": "1.15.0",
"license": "Apache-2.0",
"main": "index.js",
"repository": {
Expand Down Expand Up @@ -32,7 +32,7 @@
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard": "^24.0.0",
"stylelint-config-standard-scss": "^11.0.0",
"stylelint-no-unsupported-browser-features": "^5.0.2",
"stylelint-no-unsupported-browser-features": "^7.0.0",
"stylelint-order": "^5.0.0",
"stylelint-prettier": "^2.0.0",
"stylelint-scss": "^4.1.0",
Expand Down
25 changes: 25 additions & 0 deletions docs/developer-handbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,31 @@ Avoid nesting selectors, this will make it easier to maintain in the future.
}
```

Use
[CSS logical properties and values](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values)
for layout. These are impacted by the writing mode and provide support for
right-to-left styling out of the box.

```scss
// Don't do this
.my-element {
padding-top: 2em;
padding-bottom: 2em;
margin-left: 2em;
position: relative;
top: 0.2em;
}

// Do this instead
.my-element {
padding-block-start: 2em;
padding-block-end: 2em;
margin-inline-start: 2em;
position: relative;
inset-block-start: 0.2em;
}
```

### Sass documentation

[SassDoc](http://sassdoc.com) is used to document the Carbon Sass source.
Expand Down
111 changes: 111 additions & 0 deletions e2e/components/Checkbox/Checkbox-test.avt.e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
/**
* Copyright IBM Corp. 2016, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

'use strict';

import { expect, test } from '@playwright/test';
import { visitStory } from '../../test-utils/storybook';

test.describe('Checkbox @avt', () => {
test('@avt-default-state', async ({ page }) => {
await visitStory(page, {
component: 'Checkbox',
id: 'components-checkbox--default',
globals: {
theme: 'white',
},
});
await expect(page).toHaveNoACViolations('Checkbox');
});

test('@avt-advanced-states single', async ({ page }) => {
await visitStory(page, {
component: 'Checkbox',
id: 'components-checkbox--single',
globals: {
theme: 'white',
},
});
await expect(page).toHaveNoACViolations('Checkbox-single');
});

test('@avt-advanced-states skeleton', async ({ page }) => {
await visitStory(page, {
component: 'Checkbox',
id: 'components-checkbox--skeleton',
globals: {
theme: 'white',
},
});
await expect(page).toHaveNoACViolations('Checkbox-skeleton');
});

test('@avt-keyboard-nav default', async ({ page }) => {
await visitStory(page, {
component: 'Checkbox',
id: 'components-checkbox--default',
globals: {
theme: 'white',
},
});
const checkbox1 = page.locator('input#checkbox-label-1');

await expect(checkbox1).toBeVisible();
await page.keyboard.press('Tab');
await expect(checkbox1).toBeFocused();

// Checking checkbox
await page.keyboard.press('Space');
await expect(checkbox1).toBeChecked();

// Unchecking checkbox
await page.keyboard.press('Space');
await expect(checkbox1).not.toBeChecked();
});

test('@avt-keyboard-nav single', async ({ page }) => {
await visitStory(page, {
component: 'Checkbox',
id: 'components-checkbox--single',
globals: {
theme: 'white',
},
});
const checkbox3 = page.locator('input#checkbox-3');
const checkbox4 = page.locator('input#checkbox-4');
const checkbox5 = page.locator('input#checkbox-5');
const checkbox6 = page.locator('input#checkbox-6');

// Check the first checkbox 3
await expect(checkbox3).toBeVisible();
await page.keyboard.press('Tab');
await expect(checkbox3).toBeFocused();
await page.keyboard.press('Space');
await expect(checkbox3).toBeChecked();

// Check the first checkbox 4
await expect(checkbox4).toBeVisible();
await page.keyboard.press('Tab');
await expect(checkbox4).toBeFocused();
await page.keyboard.press('Space');
await expect(checkbox4).toBeChecked();

// Check the first checkbox 5
await expect(checkbox5).toBeVisible();
await page.keyboard.press('Tab');
await expect(checkbox5).toBeFocused();
await page.keyboard.press('Space');
await expect(checkbox5).toBeChecked();

// Checking if the checkbox is readonly
await expect(checkbox6).toBeVisible();
await page.keyboard.press('Tab');
await expect(checkbox6).toBeFocused();
await page.keyboard.press('Space');
await expect(checkbox6).not.toBeChecked();
});
});
15 changes: 2 additions & 13 deletions e2e/components/Checkbox/Checkbox-test.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

'use strict';

const { expect, test } = require('@playwright/test');
const { test } = require('@playwright/test');
const { themes } = require('../../test-utils/env');
const { snapshotStory, visitStory } = require('../../test-utils/storybook');
const { snapshotStory } = require('../../test-utils/storybook');

test.describe('Checkbox', () => {
themes.forEach((theme) => {
Expand All @@ -23,15 +23,4 @@ test.describe('Checkbox', () => {
});
});
});

test('accessibility-checker @avt', async ({ page }) => {
await visitStory(page, {
component: 'Checkbox',
id: 'components-checkbox--default',
globals: {
theme: 'white',
},
});
await expect(page).toHaveNoACViolations('Checkbox');
});
});
Loading

0 comments on commit b03c36b

Please sign in to comment.