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

chore: bump carbon packages #3858

Merged
merged 31 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
66bd11b
chore: bump carbon packages
herleraja Apr 19, 2024
0437978
test: update snapshots
herleraja Apr 19, 2024
fe34bab
fix: fix pretty formatter comment movement
herleraja Apr 19, 2024
1a0c7ef
refactor: pretty formatter
herleraja Apr 19, 2024
ed6b729
test: fix testcases after package bump I
herleraja Apr 19, 2024
d59e081
test: fix testcases after package bump II
herleraja Apr 19, 2024
0b74d10
build: suppress unnecessory test logging
herleraja Apr 19, 2024
01903e3
test: fix testcases after package bump III
herleraja Apr 19, 2024
413fe77
test: fix testcases after package bump IV
herleraja Apr 23, 2024
a769928
chore: bump carbon packages
herleraja Apr 19, 2024
bad5465
test: update snapshots
herleraja Apr 19, 2024
201761d
fix: fix pretty formatter comment movement
herleraja Apr 19, 2024
aadbc2c
refactor: pretty formatter
herleraja Apr 19, 2024
f2650e0
test: fix testcases after package bump I
herleraja Apr 19, 2024
7f7a754
test: fix testcases after package bump II
herleraja Apr 19, 2024
ebcb3ff
build: suppress unnecessory test logging
herleraja Apr 19, 2024
6143fb9
test: fix testcases after package bump III
herleraja Apr 19, 2024
103fe18
test: fix testcases after package bump IV
herleraja Apr 23, 2024
085a7e1
chore: bump packages II
herleraja Jul 10, 2024
d211532
refactor: pretty formatter
herleraja Jul 10, 2024
22af848
chore: merge
cgirani Jul 10, 2024
bd89411
chore: format
cgirani Jul 10, 2024
fe49dc7
fix: filedrop and rulebuilder components fixes
cgirani Jul 10, 2024
3c9e6aa
chore: formatter
cgirani Jul 10, 2024
aed37f6
fix: failing components unit tests fixed
cgirani Jul 11, 2024
7859448
test: update the hotspot testcase
herleraja Jul 11, 2024
62a8280
chore: bump packages
herleraja Jul 11, 2024
3489c65
chore: remove files
cgirani Jul 11, 2024
f5a946b
test: update snapshot
herleraja Jul 16, 2024
a943d20
test: update snapshot
herleraja Jul 16, 2024
583d870
docs: update the storybook link
herleraja Jul 16, 2024
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
23 changes: 12 additions & 11 deletions .github/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,33 @@
<a href="https://www.npmjs.com/package/carbon-addons-iot-react">
<img src="https://img.shields.io/npm/v/carbon-addons-iot-react/next" alt="@next npm version release" />
</a>
<br/>
<a href="https://carbon-design-system.github.io/carbon-addons-iot-react">
<img src="https://img.shields.io/badge/view%20%40next-storybook-ff4785" alt="view @next storybook" />
</a>
<br/>
<a href="https://github.com/carbon-design-system/carbon-addons-iot-react/actions?query=workflow%3ABuild+branch%3Amaster">
<img src="https://img.shields.io/github/workflow/status/carbon-design-system/carbon-addons-iot-react/Build/master" alt="Build Status" />
</a>
<a href="https://coveralls.io/github/carbon-design-system/carbon-addons-iot-react?branch=master">
<img src="https://coveralls.io/repos/github/carbon-design-system/carbon-addons-iot-react/badge.svg?branch=master" alt="Coverage Report" />
</a>
<br/>
<a href="https://github.com/carbon-design-system/carbon-addons-iot-react/blob/master/LICENSE">
<img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="Carbon add-ons for Watson IoT is released under the Apache-2.0 license" />
</a>
<a href="https://github.com/carbon-design-system/carbon-addons-iot-react/blob/master/.github/CONTRIBUTING.MD">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome" />
</a>

</p>

## Installation

**@latest from
[`master`](https://github.com/carbon-design-system/carbon-addons-iot-react/tree/master)**
&nbsp; - &nbsp; <a href="https://carbon-design-system.github.io/carbon-addons-iot-react">
<img valign=middle src="https://img.shields.io/badge/view%20%40latest-storybook-ff4785" alt="view @latest storybook" />
</a>

```
```bash
# with npm
npm install carbon-addons-iot-react d3@">=5.0.0 <=5.14.2"

Expand All @@ -54,11 +58,8 @@ yarn add carbon-addons-iot-react d3@">=5.0.0 <=5.14.2"

**@next pre-releases from
[`next`](https://github.com/carbon-design-system/carbon-addons-iot-react/tree/next)**
&nbsp; - &nbsp; <a href="https://next.carbon-addons-iot-react.com">
<img valign=middle src="https://img.shields.io/badge/view%20%40next-storybook-ff4785" alt="view @next storybook" />
</a>

```
```bash
# with npm
npm install carbon-addons-iot-react@next d3@"^7.0.0"

Expand Down Expand Up @@ -92,15 +93,15 @@ To test drive everything here, use
will create a new project that is preconfigured with everything you need to
begin to build an application.

```
```bash
npx create-iot-react-app <app-name>
```

## Styling

What's included

```
```bash
carbon-addons-iot-react/
├── css
│ ├── carbon-addons-iot-react.css
Expand Down Expand Up @@ -150,7 +151,7 @@ You can find our component test statement

If you are using our project with Jest tests, due to it's dependency on d3, you
may have to add some mock to your Jest setup script. See this issue for more
details: https://github.com/facebook/jest/issues/5379
details: <https://github.com/facebook/jest/issues/5379>

Here's an example setup script, update your jest config to point to a setup
script: setupFiles: ['setupJest.js'],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
if: steps.changes.outputs.react == 'true'
run: |
cd packages/react
yarn test:ci
yarn test:ci --silent

- name: Archive coverage artifacts
if: ${{ success() }} && steps.changes.outputs.react == 'true'
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
"husky": "^1.3.1",
"lerna": "^6.6.2",
"lint-staged": "^8.1.0",
"prettier": "^2.1.2",
"prettier-config-carbon": "^0.4.0"
"prettier": "^2.8.8",
"prettier-config-carbon": "^0.11.0"
},
"sideEffects": false,
"version": "0.0.0-development",
Expand Down
10 changes: 4 additions & 6 deletions packages/angular/src/table/table.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,8 @@ storiesOf('Components/Table', module)
customSort: (index: number) => {
if (simpleMultiHeaderModel.getClosestHeader(index).sorted) {
// if already sorted flip sorting direction
simpleMultiHeaderModel.getClosestHeader(
index
).ascending = simpleMultiHeaderModel.getClosestHeader(index).descending;
simpleMultiHeaderModel.getClosestHeader(index).ascending =
simpleMultiHeaderModel.getClosestHeader(index).descending;
}
simpleMultiHeaderModel.sort(index);
},
Expand Down Expand Up @@ -216,9 +215,8 @@ storiesOf('Components/Table', module)
customSort: (index: number) => {
if (simpleMultiHeaderModel.getClosestHeader(index).sorted) {
// if already sorted flip sorting direction
simpleMultiHeaderModel.getClosestHeader(
index
).ascending = simpleMultiHeaderModel.getClosestHeader(index).descending;
simpleMultiHeaderModel.getClosestHeader(index).ascending =
simpleMultiHeaderModel.getClosestHeader(index).descending;
}
simpleMultiHeaderModel.sort(index);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const simpleModel = new SCTableModel();
simpleModel.header = [
[
new TableHeaderItem({
data:
'Name Name Name Name Name Name Name Name Name Name \
data: 'Name Name Name Name Name Name Name Name Name Name \
Name Name Name Name Name Name Name Name Name Name Name Name Name Name Name Name Name \
Name Name Name Name Name Name Name Name Name Name Name Name Name Name Name Name Name \
Name Name Name Name Name Name Name Name Name Name \
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...rd/DashboardGrid.test.e2ex-DashboardGrid-lg-Card--with-datetimerange-picker.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .../Dashboard/DashboardGrid.test.e2ex-DashboardGrid-lg-Card--with-range-picker.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...baseline/components/Dashboard/DashboardGrid.test.e2ex-DashboardGrid-lg-Card.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...eline/components/DateTimePicker/DateTimePickerV2.test.e2ex-v2-icon-only-rtl.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .../baseline/components/FlyoutMenu/FlyoutMenu.test.e2ex-flyout-positioning-ltr.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .../baseline/components/FlyoutMenu/FlyoutMenu.test.e2ex-flyout-positioning-rtl.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 7 additions & 6 deletions packages/react/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ module.exports = {
lines: 90,
},
// set coverage to 90 for all items except those who are covered by e2e cypress tests
'./src/components/**/!(TimeSeriesCard|BarChartCard|DashboardEditor|ListTarget|PageTitleBar|DateTimePickerV2|DateTimePicker|HeaderActionGroup|DashboardEditorCardRenderer|CardCodeEditor|SimpleList|index|ListContent|List|VirtualListContent|TableMultiSortRow|TableColumnCustomizationModal|ListBuilder|SidePanel|ListSpinner|DateTimePickerV2WithTimeSpinner|DateTimePickerV2WithoutTimeSpinner).jsx': {
statements: 90,
branches: 90,
functions: 90,
lines: 90,
},
'./src/components/**/!(TimeSeriesCard|BarChartCard|DashboardEditor|ListTarget|PageTitleBar|DateTimePickerV2|DateTimePicker|HeaderActionGroup|DashboardEditorCardRenderer|CardCodeEditor|SimpleList|index|ListContent|List|VirtualListContent|TableMultiSortRow|TableColumnCustomizationModal|ListBuilder|SidePanel|ListSpinner|DateTimePickerV2WithTimeSpinner|DateTimePickerV2WithoutTimeSpinner).jsx':
{
statements: 90,
branches: 90,
functions: 90,
lines: 90,
},
'./src/components/List/ListItem/ListTarget.jsx': {
branches: 88,
},
Expand Down
26 changes: 13 additions & 13 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,18 @@
},
"dependencies": {
"@babel/runtime": "^7.10.2",
"@carbon/charts": "0.55.1",
"@carbon/charts-react": "0.55.1",
"@carbon/colors": "10.37.0",
"@carbon/icons-react": "10.49.0",
"@carbon/layout": "10.37.0",
"@carbon/motion": "10.29.0",
"@carbon/pictograms-react": "11.25.0",
"@carbon/themes": "10.54.0",
"@ibm/telemetry-js": "^1.5.0",
"@carbon/charts": "^0.58.2",
"@carbon/charts-react": "^0.58.2",
"@carbon/colors": "^10.37.4",
"@carbon/icons-react": "^10.49.5",
"@carbon/layout": "^10.37.4",
"@carbon/motion": "^10.29.4",
"@carbon/pictograms-react": "^11.63.0",
"@carbon/themes": "^10.55.5",
"@ibm/telemetry-js": "^1.6.0",
"@monaco-editor/react": "4.4.5",
"carbon-components": "10.56.0",
"carbon-components-react": "7.56.0",
"carbon-components": "^10.58.12",
"carbon-components-react": "^7.59.24",
"carbon-icons": "^7.0.7",
"classnames": "^2.5.1",
"core-js": "3.26.1",
Expand Down Expand Up @@ -310,8 +310,8 @@
"object-assign": "^4.1.1",
"ol": "^6.5.0",
"postcss-loader": "^3.0.0",
"prettier": "^2.1.2",
"prettier-config-carbon": "^0.4.0",
"prettier": "^2.8.8",
"prettier-config-carbon": "^0.11.0",
"promise": "^8.0.2",
"react": ">=16.14.0",
"react-dom": ">=16.14.0",
Expand Down
15 changes: 8 additions & 7 deletions packages/react/src/components/BarChartCard/BarChartCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ const BarChartCard = ({
...others
}) => {
// need to deep merge the nested content default props as default props only uses a shallow merge natively
const contentWithDefaults = useMemo(() => defaultsDeep({}, content, defaultProps.content), [
content,
]);
const contentWithDefaults = useMemo(
() => defaultsDeep({}, content, defaultProps.content),
[content]
);
const mergedI18n = useMemo(() => ({ ...defaultProps.i18n, ...i18n }), [i18n]);
const {
title,
Expand All @@ -117,10 +118,10 @@ const BarChartCard = ({

const size = useMemo(() => increaseSmallCardSize(sizeProp, 'BarChartCard'), [sizeProp]);

const resizeHandles = useMemo(() => (isResizable ? getResizeHandles(children) : []), [
children,
isResizable,
]);
const resizeHandles = useMemo(
() => (isResizable ? getResizeHandles(children) : []),
[children, isResizable]
);

const memoizedGenerateSampleValues = useMemo(
() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,10 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/C
Default
</div>
<button
aria-controls={null}
aria-expanded={false}
aria-haspopup={true}
aria-label="open and close list of options"
aria-label="Open and close list of options"
className="iot--card--toolbar-date-range-action bx--overflow-menu bx--overflow-menu--lg"
data-testid="Card-toolbar-range-picker"
onClick={[Function]}
Expand Down Expand Up @@ -617,9 +618,10 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/C
Default
</div>
<button
aria-controls={null}
aria-expanded={false}
aria-haspopup={true}
aria-label="open and close list of options"
aria-label="Open and close list of options"
className="iot--card--toolbar-date-range-action bx--overflow-menu bx--overflow-menu--lg"
data-testid="Card-toolbar-range-picker"
onClick={[Function]}
Expand Down Expand Up @@ -769,9 +771,10 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/C
Default
</div>
<button
aria-controls={null}
aria-expanded={false}
aria-haspopup={true}
aria-label="open and close list of options"
aria-label="Open and close list of options"
className="iot--card--toolbar-date-range-action bx--overflow-menu bx--overflow-menu--lg"
data-testid="Card-toolbar-range-picker"
onClick={[Function]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ CurrentPageWithAriaCurrent.storyName = 'current page with aria-current';

CurrentPageWithAriaCurrent.parameters = {
info: {
text:
'You can specify a BreadcrumbItem component as the current page with the `aria-current` prop by specifying `aria-current="page"`',
text: 'You can specify a BreadcrumbItem component as the current page with the `aria-current` prop by specifying `aria-current="page"`',
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/B
>
<div
aria-atomic="true"
aria-labelledby="loading-id-1"
aria-live="assertive"
className="bx--loading bx--loading--small"
>
Expand Down Expand Up @@ -291,7 +290,6 @@ exports[`Storybook Snapshot tests and console checks Storyshots 1 - Watson IoT/B
>
<div
aria-atomic="true"
aria-labelledby="loading-id-2"
aria-live="assertive"
className="bx--loading bx--loading--small"
>
Expand Down
8 changes: 6 additions & 2 deletions packages/react/src/components/Button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
}
}

.#{$iot-prefix}--btn.#{$prefix}--btn.#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only:not(.#{$iot-prefix}--btn-icon-selection--selected).#{$iot-prefix}--btn-icon-selection--recommended {
.#{$iot-prefix}--btn.#{$prefix}--btn.#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only:not(
.#{$iot-prefix}--btn-icon-selection--selected
).#{$iot-prefix}--btn-icon-selection--recommended {
border: 1px solid $support-02;
}

Expand Down Expand Up @@ -79,7 +81,9 @@
// For Carbon v.11 when the button sizes are adjusted we should take the oportunity to
// see if we can remove this global ghost padding.
.#{$iot-prefix}--btn.#{$prefix}--btn--ghost {
&:not(.#{$prefix}--btn--sm.#{$prefix}--btn--icon-only):not(.#{$iot-prefix}--menu-button__trigger) {
&:not(.#{$prefix}--btn--sm.#{$prefix}--btn--icon-only):not(
.#{$iot-prefix}--menu-button__trigger
) {
padding-left: $spacing-05;
padding-right: $spacing-05;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Card/Card.test.e2e.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ describe('Card', () => {
/>
);

cy.findByRole('button', { name: 'open and close list of options' }).click();
cy.findByRole('button', { name: 'Open and close list of options' }).click();
cy.findByRole('menu').then(($el) => {
const menu = $el[0].getBoundingClientRect();
expect(menu.width).to.be.greaterThan(160);
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/components/Card/CardTitle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ export const CardTitle = (
{
[`${iotPrefix}--card--title--text--wrapped`]:
hasTitleWrap && !subtitle && !hasExternalTitleTextTooltip,
[`${iotPrefix}--card-title__title-text--has-title-text-tooltip`]: hasExternalTitleTextTooltip,
[`${iotPrefix}--card-title__title-text--has-title-text-tooltip`]:
hasExternalTitleTextTooltip,
}
)}
triggerText={title}
Expand Down
7 changes: 4 additions & 3 deletions packages/react/src/components/Card/CardTypeContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ const CardTypeContent = ({ testId, isExpanded, type, data, content }) => {
const listRef = useRef(null);
const [listHeight, setListHeight] = useState();

const contentWithDefaults = useMemo(() => defaultsDeep({}, content, defaultProps.content), [
content,
]);
const contentWithDefaults = useMemo(
() => defaultsDeep({}, content, defaultProps.content),
[content]
);

const options = getChartOptions(type, data.length > 1, contentWithDefaults);

Expand Down
Loading
Loading