Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: V11 migration for gatsby-theme #1209

Merged
merged 46 commits into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
566cfe7
fix: medium post image aspect ratio closes #1176 (#1185)
vpicone Oct 28, 2021
9a44a87
fix: grid alignment at max breakpoint (#1181)
alisonjoseph Oct 28, 2021
c9a8e07
chore: release 2.1.5
vpicone Oct 28, 2021
3ca8b4d
Update CODEOWNERS (#1190)
alisonjoseph Nov 19, 2021
00817e4
Update v2-migration.mdx (#1193)
alisonjoseph Nov 30, 2021
d9d4e01
Update Switcher.js (#1192)
alisonjoseph Dec 2, 2021
8966ddf
chore: release 2.1.6
Dec 3, 2021
b858aa6
build(deps): bump semver-regex from 3.1.2 to 3.1.3 (#1196)
dependabot[bot] Dec 6, 2021
8a4dd50
fix: aside docs (#1202)
alisonjoseph Jan 7, 2022
f9be700
feat(switcher): add carbon for ibm products remove ix (#1205)
alisonjoseph Jan 10, 2022
9812979
chore: release 2.2.0
Jan 10, 2022
cc33c69
build(deps): bump postcss from 7.0.35 to 7.0.36 (#1206)
dependabot[bot] Jan 13, 2022
ad11d12
build(deps): bump engine.io from 4.1.1 to 4.1.2 (#1207)
dependabot[bot] Jan 13, 2022
5b6ed04
docs(page-description): update PageDescription docs (#1195)
rodet Jan 14, 2022
dbcd7be
build(deps): bump follow-redirects from 1.14.4 to 1.14.7 (#1208)
dependabot[bot] Jan 18, 2022
938f98e
feat: migrate to v11
Jan 19, 2022
af8fb2f
feat: migrate to v11 yarn lock
Jan 19, 2022
d6dd6ca
feat: update component prefix
Jan 19, 2022
3f6714e
feat: update imports
Jan 19, 2022
b0c2722
feat: icon size prop/imports
jnm2377 Jan 24, 2022
0698a71
fix: try to add styles
jnm2377 Jan 24, 2022
6f17ea3
build(deps): bump nanoid from 3.1.29 to 3.2.0 (#1210)
dependabot[bot] Jan 25, 2022
3dca270
build(deps): bump trim-off-newlines from 1.0.1 to 1.0.3 (#1213)
dependabot[bot] Jan 25, 2022
57d3e88
fix: update the references to the new homepage (#1212)
rodet Jan 25, 2022
b540415
feat: migrate styles to v11
Jan 26, 2022
17ec996
feat(expressive-list): creates the expressive content only list (#1197)
aledavila Jan 28, 2022
160e6a3
Update CONTRIBUTING.md (#1215)
alisonjoseph Jan 31, 2022
bceada6
feat: import all styles from react
Feb 1, 2022
efc5a30
feat: add additional aspect ratios for do dont (#1216)
alisonjoseph Feb 2, 2022
d7e0265
feat(grid): update grid in theme
Feb 8, 2022
aa1c131
build(deps): bump follow-redirects from 1.14.7 to 1.14.8 (#1222)
dependabot[bot] Feb 14, 2022
67fc11c
fix: do dont component updates (#1220)
alisonjoseph Feb 14, 2022
81f8fe3
feat: new config option to add default mdx layouts (#1214)
xlegs Feb 16, 2022
83b7914
feat(expressive-list-container): adds expressive list container compo…
Feb 16, 2022
8fc8c60
build(deps): bump simple-get from 3.1.0 to 3.1.1 (#1223)
dependabot[bot] Feb 16, 2022
5257408
chore: release 2.3.0
Feb 17, 2022
f1fbb38
Merge branch 'main' of github.com:carbon-design-system/gatsby-theme-c…
Feb 22, 2022
826e4f1
feat(grid): add 12 grid
Feb 22, 2022
009fe77
fix: fleex grid 12 col
Feb 22, 2022
eaade94
feat: migrate notification and remove comments
Feb 25, 2022
57da3a0
fix: tile components and aspect ratio
Feb 25, 2022
e33b58e
fix: temp comment out abbr export
Feb 25, 2022
63fbf1c
fix(header): update header svg colors
Mar 2, 2022
ba5dbe1
chore: update package
Mar 2, 2022
f5d8a76
Merge branch 'next' of github.com:carbon-design-system/gatsby-theme-c…
Mar 3, 2022
bf3b7f0
chore: update yarn lock
Mar 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @carbon-design-system/developers-auxiliary
* @carbon-design-system/developers-carbon-brand
3 changes: 1 addition & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ features, by not reporting duplicate issues.
for more details on commit messages.

7. Once ready for feedback from other contributors and maintainers, **push your
commits to your fork** (be sure to run `yarn ci-check` before pushing, to
make sure your code passes linting and unit tests):
commits to your fork** :

```
$ git push origin { YOUR_BRANCH_NAME }
Expand Down
3 changes: 2 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"composes"
]
}
]
],
"no-descending-specificity": null
}
}
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
## [2.3.0](https://github.com/carbon-design-system/gatsby-theme-carbon/compare/v2.2.0...v2.3.0) (2022-02-17)


### Features

* **expressive-list-container:** adds expressive list container component ([#1198](https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1198)) ([83b7914](https://github.com/carbon-design-system/gatsby-theme-carbon/commit/83b7914cdf86fed6dbe9232e21b53cb7328c32ab))
* add additional aspect ratios for do dont ([#1216](https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1216)) ([efc5a30](https://github.com/carbon-design-system/gatsby-theme-carbon/commit/efc5a3081cc9d8375cfd9ddb1793b046e7004771))
* new config option to add default mdx layouts ([#1214](https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1214)) ([81f8fe3](https://github.com/carbon-design-system/gatsby-theme-carbon/commit/81f8fe31e95a6fc8cb19ee9414e9972a4ca56a1c))
* **expressive-list:** creates the expressive content only list ([#1197](https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1197)) ([17ec996](https://github.com/carbon-design-system/gatsby-theme-carbon/commit/17ec996d147d02ffca0374a8e9e272869bd340f0))


### Bug Fixes

* do dont component updates ([#1220](https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1220)) ([67fc11c](https://github.com/carbon-design-system/gatsby-theme-carbon/commit/67fc11c1df4a450fc6011d0696cc92fb2685e34b))
* update the references to the new homepage ([#1212](https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1212)) ([57d3e88](https://github.com/carbon-design-system/gatsby-theme-carbon/commit/57d3e886b8ef260481414ef8b7d20c9668f81fc9))

## [2.2.0](https://github.com/carbon-design-system/gatsby-theme-carbon/compare/v2.1.6...v2.2.0) (2022-01-10)


### Features

* **switcher:** add carbon for ibm products remove ix ([#1205](https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1205)) ([f9be700](https://github.com/carbon-design-system/gatsby-theme-carbon/commit/f9be700ac5b6325eb73892f0211b59d177cf53fd))


### Bug Fixes

* aside docs ([#1202](https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1202)) ([8a4dd50](https://github.com/carbon-design-system/gatsby-theme-carbon/commit/8a4dd50c4d81eef57b98891c14bd00b8c2d5dace))

### [2.1.6](https://github.com/carbon-design-system/gatsby-theme-carbon/compare/v2.1.5...v2.1.6) (2021-12-03)

### [2.1.5](https://github.com/carbon-design-system/gatsby-theme-carbon/compare/v2.1.4...v2.1.5) (2021-10-28)


### Bug Fixes

* grid alignment at max breakpoint ([#1181](https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1181)) ([9a44a87](https://github.com/carbon-design-system/gatsby-theme-carbon/commit/9a44a87b8958c5a790e1c5726a341e31e4a5ae63))
* medium post image aspect ratio closes [#1176](https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1176) ([#1185](https://github.com/carbon-design-system/gatsby-theme-carbon/issues/1185)) ([566cfe7](https://github.com/carbon-design-system/gatsby-theme-carbon/commit/566cfe77f4a7489e5f300eb0e94f64aebf3ee2f6))

### [2.1.4](https://github.com/carbon-design-system/gatsby-theme-carbon/compare/v2.1.4-next.0...v2.1.4) (2021-10-19)

### [2.1.4-next.0](https://github.com/carbon-design-system/gatsby-theme-carbon/compare/v2.1.3...v2.1.4-next.0) (2021-10-19)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ The Gatsby Carbon theme includes all the configuration you need to build a beaut
## Resources

- [Contribution guidelines](.github/CONTRIBUTING.md)
- [Getting Started](https://gatsby-theme-carbon.now.sh/getting-started)
- [Guides](https://gatsby-theme-carbon.now.sh/guides/configuration)
- [Components](https://gatsby-theme-carbon.now.sh/components/markdown)
- [Demo](https://gatsby-theme-carbon.now.sh/demo)
- [Gallery](https://gatsby-theme-carbon.now.sh/gallery)
- [Getting Started](https://gatsby.carbondesignsystem.com/getting-started)
- [Guides](https://gatsby.carbondesignsystem.com/guides/configuration)
- [Components](https://gatsby.carbondesignsystem.com/components/markdown)
- [Demo](https://gatsby.carbondesignsystem.com/demo)
- [Gallery](https://gatsby.carbondesignsystem.com/gallery)
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"husky": "^4.2.3",
"lerna": "^3.22.1",
"lint-staged": "^10.0.9",
"prettier": "^2.0.2",
"prettier": "^2.5.1",
"prettier-config-carbon": "^0.2.0",
"release-it": "^14.6.1",
"release-it-yarn-workspaces": "^2.0.1",
Expand All @@ -102,5 +102,5 @@
"stylelint-scss": "^3.16.0",
"yarn": "^1.22.4"
},
"version": "2.1.4"
"version": "2.3.0"
}
4 changes: 2 additions & 2 deletions packages/example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
## How do I use it?

Check out our quick
[getting started](https://gatsby-theme-carbon.now.sh/getting-started) guide and
[getting started](https://gatsby.carbondesignsystem.com/getting-started) guide and
video!

`gatsby-theme-carbon` at it’s core relies on [mdx](https://mdxjs.com/) for page
Expand All @@ -28,4 +28,4 @@ You’re also free to make your own components and use them in your MDX pages.

## What’s Next?

[Check out the docs!](https://gatsby-theme-carbon.now.sh)
[Check out the docs!](https://gatsby.carbondesignsystem.com)
4 changes: 2 additions & 2 deletions packages/example/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "example",
"private": true,
"version": "2.1.4",
"version": "2.3.0",
"license": "Apache 2.0",
"scripts": {
"dev": "gatsby develop -H 0.0.0.0",
Expand All @@ -13,7 +13,7 @@
},
"dependencies": {
"gatsby": "^3.3.1",
"gatsby-theme-carbon": "^2.1.4",
"gatsby-theme-carbon": "^2.3.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/example/src/components/Homepage.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.callout-link {
@include carbon--type-style('body-long-02');
@include type-style('body-long-02');
display: table-cell; // like display block, but the width fits to content rather than 100%
position: relative;
top: $spacing-06; //margin-top doesn't work on table-cell, and padding-top looks weird on focus
Expand Down
4 changes: 4 additions & 0 deletions packages/example/src/data/nav-items.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
path: /components/DoDontExample
- title: DoDontRow
path: /components/DoDontRow
- title: ExpressiveList
path: /components/ExpressiveList
- title: ExpressiveListContainer
path: /components/ExpressiveListContainer
- title: FeatureCard
path: /components/FeatureCard
- title: FeedbackDialog
Expand Down
9 changes: 4 additions & 5 deletions packages/example/src/pages/components/Aside.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ It should only be used within a `<Column>` component with specific parameters.
**Warning:** If you use more than one `<Aside>` component on a single page, you
need to provide an accessibility label so that someone using assistive
technology can quickly understand the purpose of the landmark. See
[Mozilla Developer Network’s documentation](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Complementary_role#Labeling_landmarks)
for more information. Props for accessibility labels are described in the
[Props section](#props) below.
Mozilla Developer Network’s documentation for more information. Props for accessibility labels are described in the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the links intended to be removed here or was it a temporary thing while doing the migration?

Copy link
Contributor Author

@aledavila aledavila Mar 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshblack So the v11 inline notifications don't allow for links inside of them anymore for accessibility issues. I'm not sure what we should do in this case.

Copy link
Member

@tay1orjones tay1orjones Mar 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aledavila ActionableNotification can be used, it accepts an inline prop.

props below.

</InlineNotification>

Expand Down Expand Up @@ -103,8 +102,8 @@ attitudes and approach used at the time.
<Title>Without hanging rule</Title>

```mdx path=components/Aside/Aside.js src=https://github.com/carbon-design-system/gatsby-theme-carbon/tree/main/packages/gatsby-theme-carbon/src/components/Aside
<Column colMd={2} colLg={3} offsetMd={1} offsetLg={1} hideRule>
<Aside>
<Column colMd={2} colLg={3} offsetMd={1} offsetLg={1}>
<Aside hideRule>

A by-product of every experience with IBM should be time—time saved or time
well-spent.
Expand Down
96 changes: 86 additions & 10 deletions packages/example/src/pages/components/DoDontExample.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ title: DoDontExample
description: Usage instructions for the DoDontExample component
---

<InlineNotification kind="warning">

**Warning:** This component will be deprecated in a future release. Please use
the `<DoDontRow>` and `<DoDont>`component instead.

</InlineNotification>

<PageDescription>

The `<DoDontExample>` component will generally need to be placed inside `<Row>`
Expand All @@ -27,7 +34,15 @@ and `<Column>` components to align them to the grid at the correct size.

<Title>Text</Title>

<DoDontExample type="dont" aspectRatio="1:1" color="dark" captionTitle="Caption title" caption="Caption" text="This is some text" />
<DoDontExample
type="dont"
aspectRatio="1:1"
color="dark"
captionTitle="Caption title"
caption="Caption"
text="This is some text"
/>

</Column>
</Row>
<Row>
Expand All @@ -43,6 +58,55 @@ and `<Column>` components to align them to the grid at the correct size.
</Column>
</Row>

<Title>Aspect ratios</Title>

<Row>

<Column colMd={4} colLg={4}>

<DoDontExample aspectRatio="4:3" text="4:3" />

</Column>
<Column colMd={4} colLg={4}>

<DoDontExample aspectRatio="16:9" text="16:9" />

</Column>
<Column colMd={4} colLg={4}>

<DoDontExample aspectRatio="2:1" text="2:1" />

</Column>
</Row>

<Row>
<Column colMd={4} colLg={4}>

<DoDontExample aspectRatio="9:16" text="9:16" />

</Column>

<Column colMd={4} colLg={4}>

<DoDontExample aspectRatio="1:2" text="1:2" />

</Column>

<Column colMd={4} colLg={4}>

<DoDontExample aspectRatio="3:4" text="3:4" />

</Column>
</Row>

<Row>
<Column colMd={4} colLg={4}>

<DoDontExample aspectRatio="1:1" text="1:1" />

</Column>
</Row>

## Code

<Title>Image</Title>
Expand Down Expand Up @@ -76,14 +140,26 @@ and `<Column>` components to align them to the grid at the correct size.
</DoDontExample>
```

<Title>Aspect ratios</Title>

```mdx path=components/DoDontExample/DoDontExample.js src=https://github.com/carbon-design-system/gatsby-theme-carbon/tree/main/packages/gatsby-theme-carbon/src/components/DoDontExample
<DoDontExample aspectRatio="4:3" text="4:3" />
<DoDontExample aspectRatio="16:9" text="16:9" />
<DoDontExample aspectRatio="2:1" text="2:1" />
<DoDontExample aspectRatio="9:16" text="9:16" />
<DoDontExample aspectRatio="1:2" text="1:2" />
<DoDontExample aspectRatio="3:4" text="3:4" />
<DoDontExample aspectRatio="1:1" text="1:1" />
```

### Props

| property | propType | required | default | description |
| ------------ | -------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| children | node | | | child node, expects a markdown image or `<Video>` component |
| text | string | | | text to display inside the component instead of an image or video |
| caption | string | | | caption |
| captionTitle | string | | | caption title |
| type | string | | dont | set to `do` to show green check, otherwise shows pink X |
| color | string | | light | set to `dark` for dark background card |
| aspectRatio | string | | | set to `1:1` to force square example <br/>_(We welcome [contributions](https://github.com/carbon-design-system/gatsby-theme-carbon/tree/main/packages/gatsby-theme-carbon/src/components/DoDontExample) to add additional aspect ratio options)_ |
| property | propType | required | default | description |
| ------------ | -------- | -------- | ------- | ----------------------------------------------------------------- |
| children | node | | | child node, expects a markdown image or `<Video>` component |
| text | string | | | text to display inside the component instead of an image or video |
| caption | string | | | caption |
| captionTitle | string | | | caption title |
| type | string | | dont | set to `do` to show green check, otherwise shows pink X |
| color | string | | light | set to `dark` for dark background card |
| aspectRatio | string | | | `1:1`,`1:2`,`2:1`,`3:4`,`4:3`,`16:9`,`9:16` |
63 changes: 53 additions & 10 deletions packages/example/src/pages/components/DoDontRow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,31 @@ component, which now includes built in columns.

</DoDontRow>

<DoDontRow>

<DoDont aspectRatio="4:3" text="4:3" />

<DoDont aspectRatio="16:9" text="16:9" />

<DoDont aspectRatio="2:1" text="2:1" />

</DoDontRow>

<DoDontRow>

<DoDont aspectRatio="9:16" text="9:16" />

<DoDont aspectRatio="1:2" text="1:2" />

<DoDont aspectRatio="3:4" text="3:4" />

</DoDontRow>
<DoDontRow>

<DoDont aspectRatio="1:1" text="1:1" />

</DoDontRow>

## Code

### Image
Expand Down Expand Up @@ -99,6 +124,24 @@ component, which now includes built in columns.
</DoDontRow>
```

### Aspect Ratios

```mdx path=components/DoDontRow/DoDontRow.js src=https://github.com/carbon-design-system/gatsby-theme-carbon/tree/main/packages/gatsby-theme-carbon/src/components/DoDontRow
<DoDontRow>
<DoDont aspectRatio="4:3" text="4:3" />
<DoDont aspectRatio="16:9" text="16:9" />
<DoDont aspectRatio="2:1" text="2:1" />
</DoDontRow>
<DoDontRow>
<DoDont aspectRatio="9:16" text="9:16" />
<DoDont aspectRatio="1:2" text="1:2" />
<DoDont aspectRatio="3:4" text="3:4" />
</DoDontRow>
<DoDontRow>
<DoDont aspectRatio="1:1" text="1:1" />
</DoDontRow>
```

## Props

### DoDontRow
Expand All @@ -109,13 +152,13 @@ component, which now includes built in columns.

### Do & Dont

| property | propType | required | default | description |
| -------------- | -------- | -------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| children | node | | | child node, expects a markdown image or `<Video>` component |
| text | string | | | text to display inside the component instead of an image or video |
| caption | string | | | caption |
| captionTitle | string | | | caption title |
| color | string | | light | set to `dark` for dark background card |
| aspectRatio | string | | | set to `1:1` to force square example <br/>_(We welcome [contributions](https://github.com/carbon-design-system/gatsby-theme-carbon/tree/main/packages/gatsby-theme-carbon/src/components/DoDontExample) to add additional aspect ratio options)_ |
| type | string | | `do` | specify the type of example with `do` or `dont` |
| ...columnProps | number | | `colMd=4, colLg=4` | specify any `<Column>` props to pass down |
| property | propType | required | default | description |
| -------------- | -------- | -------- | ------------------ | ----------------------------------------------------------------- |
| children | node | | | child node, expects a markdown image or `<Video>` component |
| text | string | | | text to display inside the component instead of an image or video |
| caption | string | | | caption |
| captionTitle | string | | | caption title |
| color | string | | light | set to `dark` for dark background card |
| aspectRatio | string | | | `1:1`,`1:2`,`2:1`,`3:4`,`4:3`,`16:9`,`9:16` |
| type | string | | `do` | specify the type of example with `do` or `dont` |
| ...columnProps | number | | `colMd=4, colLg=4` | specify any `<Column>` props to pass down |
Loading