From ccc94bc795468fa6ed6a053cdfca4de17eeb387d Mon Sep 17 00:00:00 2001 From: jonguenther Date: Thu, 29 Oct 2020 15:32:55 +0100 Subject: [PATCH 01/17] fix(basetablereducer): fix selecting unselectable items --- src/components/Table/baseTableReducer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Table/baseTableReducer.js b/src/components/Table/baseTableReducer.js index 315fe9926c..a43c49e252 100644 --- a/src/components/Table/baseTableReducer.js +++ b/src/components/Table/baseTableReducer.js @@ -292,10 +292,11 @@ export const baseTableReducer = (state = {}, action) => { isSelectAllSelected: { $set: isSelected, }, - // selectedIds: { $set: isSelected - ? state.data.map((i) => i.isSelectable !== false && i.id) + ? state.data + .filter((i) => i.isSelectable !== false) + .map((i) => i.id) : [], }, isSelectAllIndeterminate: { From ef05c37e7f978410f173ff865c1d4496ba90f216 Mon Sep 17 00:00:00 2001 From: jonguenther Date: Mon, 9 Nov 2020 09:52:16 +0100 Subject: [PATCH 02/17] chore(table): add test #1735 --- src/components/Table/StatefulTable.test.jsx | 49 +++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/src/components/Table/StatefulTable.test.jsx b/src/components/Table/StatefulTable.test.jsx index eeeb2ec5bf..12e8d6933f 100644 --- a/src/components/Table/StatefulTable.test.jsx +++ b/src/components/Table/StatefulTable.test.jsx @@ -405,4 +405,53 @@ describe('stateful table with real reducer', () => { expect(initialState.data.length).toEqual(100); expect(screen.queryByText('1–10 of 500 items')).toBeTruthy(); }); + + it('stateful table every third row unselectable', () => { + const modifiedData = initialState.data.map((eachRow, index) => ({ + ...eachRow, + isSelectable: index % 3 !== 0, + })); + + const dataCount = modifiedData.filter((data) => data.isSelectable).length; + render( + + ); + + // check if checkboxes displayed correctly + const checkboxes = screen.getAllByLabelText('Select row'); + checkboxes.forEach((box, i) => { + if (i % 3 !== 0) { + expect(box).toHaveProperty('disabled', false); + } else { + expect(box).toHaveProperty('disabled', true); + } + }); + + // select all elements + const selectAllCheckbox = screen.getByLabelText('Select all items'); + expect(selectAllCheckbox).toBeInTheDocument(); + expect(selectAllCheckbox).toHaveProperty('checked', false); + fireEvent.click(selectAllCheckbox); + + // check that only selectable items are counted + expect(selectAllCheckbox).toHaveProperty('checked', true); + expect(screen.getByText(`${dataCount} items selected`)).toBeInTheDocument(); + + // check if selectable checkboxes checked + checkboxes.forEach((box, i) => { + if (i % 3 !== 0) { + expect(box).toHaveProperty('checked', true); + } else { + expect(box).toHaveProperty('checked', false); + } + }); + }); }); From cd704586ff4ed5f5957790b690135023e3799b4a Mon Sep 17 00:00:00 2001 From: Taylor Jones Date: Wed, 11 Nov 2020 11:17:54 -0600 Subject: [PATCH 03/17] chore(release): disable Travis CI, enable Publish GH action workflow --- .github/workflows/publish.yml | 5 ++--- .travis.yml | 29 ----------------------------- 2 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9ec70581a3..bf641bb7f0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,6 +6,7 @@ on: push: branches: - master + - next jobs: publish: @@ -46,6 +47,4 @@ jobs: env: GH_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - # Dry-run only for now for testing purposes. Travis CI does the actual publish currently. - # https://semantic-release.gitbook.io/semantic-release/usage/configuration#dryrun - run: yarn publish-npm --dry-run + run: yarn publish-npm diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c65d1a54bf..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: node_js -filter_secrets: false - -stages: - - name: after_success - # require the branch name to be master or next (note for PRs this is the base branch name) - if: branch = master OR branch = next - -before_install: - - node --version - # Repo for Yarn Classic - - sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg - - echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee - /etc/apt/sources.list.d/yarn.list - - sudo apt-get update -qq - - sudo apt-get install -y -qq yarn - -cache: - yarn: true - -install: - - yarn install - - yarn list - -script: - - yarn build - -after_success: - - yarn publish-npm From 747dc248eca56766d98ee367652f570d6cce12ff Mon Sep 17 00:00:00 2001 From: marcJV Date: Wed, 11 Nov 2020 11:23:45 -0600 Subject: [PATCH 04/17] fix(table): fixed left alignment of table headers --- src/components/DataTable/_data-table.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/DataTable/_data-table.scss b/src/components/DataTable/_data-table.scss index a7aad0cbe1..cb007b001a 100644 --- a/src/components/DataTable/_data-table.scss +++ b/src/components/DataTable/_data-table.scss @@ -73,6 +73,11 @@ html[dir='rtl'] { .#{$prefix}--table-sort { padding-left: $spacing-04; padding-right: $spacing-04; + + .#{$prefix}--table-header-label { + padding-left: 0; + padding-right: 0; + } } } From a6444bd4ee64aa7bb4c551784175f8adebdb39ea Mon Sep 17 00:00:00 2001 From: Joel Armendariz Date: Wed, 11 Nov 2020 13:24:16 -0600 Subject: [PATCH 05/17] fix(cardeditor): add translated strings for timerange labels --- .../CardEditForm/CardEditFormContent.jsx | 44 +++++++++++++------ .../CardEditFormItems/DataSeriesFormItem.jsx | 13 +++--- .../DataSeriesFormItem.test.jsx | 6 +-- 3 files changed, 42 insertions(+), 21 deletions(-) diff --git a/src/components/CardEditor/CardEditForm/CardEditFormContent.jsx b/src/components/CardEditor/CardEditForm/CardEditFormContent.jsx index 57ac1177ee..f3ef26fb3e 100644 --- a/src/components/CardEditor/CardEditForm/CardEditFormContent.jsx +++ b/src/components/CardEditor/CardEditForm/CardEditFormContent.jsx @@ -66,6 +66,15 @@ const propTypes = { selectASize: PropTypes.string, timeRange: PropTypes.string, selectATimeRange: PropTypes.string, + last24HoursLabel: PropTypes.string, + last7DaysLabel: PropTypes.string, + lastMonthLabel: PropTypes.string, + lastQuarterLabel: PropTypes.string, + lastYearLabel: PropTypes.string, + thisWeekLabel: PropTypes.string, + thisMonthLabel: PropTypes.string, + thisQuarterLabel: PropTypes.string, + thisYearLabel: PropTypes.string, }), /** if provided, returns an array of strings which are the timeRanges to be allowed * on each card @@ -108,23 +117,32 @@ const defaultProps = { selectASize: 'Select a size', timeRange: 'Time range', selectATimeRange: 'Select a time range', + last24HoursLabel: 'Last 24 hours', + last7DaysLabel: 'Last 7 days', + lastMonthLabel: 'Last month', + lastQuarterLabel: 'Last quarter', + lastYearLabel: 'Last year', + thisWeekLabel: 'This week', + thisMonthLabel: 'This month', + thisQuarterLabel: 'This quarter', + thisYearLabel: 'This year', }, getValidDataItems: null, getValidTimeRanges: null, dataItems: [], }; -export const defaultTimeRangeOptions = { - last24Hours: 'Last 24 hrs', - last7Days: 'Last 7 days', - lastMonth: 'Last month', - lastQuarter: 'Last quarter', - lastYear: 'Last year', - thisWeek: 'This week', - thisMonth: 'This month', - thisQuarter: 'This quarter', - thisYear: 'This year', -}; +const defaultTimeRangeOptions = [ + 'last24Hours', + 'last7Days', + 'lastMonth', + 'lastQuarter', + 'lastYear', + 'thisWeek', + 'thisMonth', + 'thisQuarter', + 'thisYear', +]; /** * Returns card size and dimensions labels @@ -155,7 +173,7 @@ const CardEditFormContent = ({ const validTimeRanges = getValidTimeRanges ? getValidTimeRanges(cardConfig, selectedDataItems) - : Object.keys(defaultTimeRangeOptions); + : defaultTimeRangeOptions; return ( <> @@ -215,7 +233,7 @@ const CardEditFormContent = ({ validTimeRanges ? validTimeRanges.map((range) => ({ id: range, - text: defaultTimeRangeOptions[range], + text: mergedI18n[range] || range, })) : [] } diff --git a/src/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItem.jsx b/src/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItem.jsx index 4083eef119..9c5596e7d6 100644 --- a/src/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItem.jsx +++ b/src/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItem.jsx @@ -108,13 +108,16 @@ const DATAITEM_COLORS_OPTIONS = [ */ export const formatSeries = (selectedItems, cardJson) => { const cardSeries = cardJson?.content?.series; - const series = selectedItems.map(({ id, text }, i) => { + const series = selectedItems.map(({ id }, i) => { + const currentItem = cardSeries?.find( + (dataItem) => dataItem.dataSourceId === id + ); const color = - cardSeries?.find((dataItem) => dataItem.label === id)?.color ?? + currentItem?.color ?? DATAITEM_COLORS_OPTIONS[i % DATAITEM_COLORS_OPTIONS.length]; return { dataSourceId: id, - label: text, + label: currentItem?.label || id, color, }; }); @@ -122,9 +125,9 @@ export const formatSeries = (selectedItems, cardJson) => { }; export const formatDataItemsForDropdown = (dataItems) => - dataItems?.map(({ dataSourceId, label }) => ({ + dataItems?.map(({ dataSourceId }) => ({ id: dataSourceId, - text: label || dataSourceId, + text: dataSourceId, })) || []; const DataSeriesFormItem = ({ diff --git a/src/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItem.test.jsx b/src/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItem.test.jsx index a5b7e5f36b..d9b22e1cba 100644 --- a/src/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItem.test.jsx +++ b/src/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItem.test.jsx @@ -68,7 +68,7 @@ describe('DataSeriesFormItem', () => { ]; it('should correctly format the card series', () => { expect(formatSeries(selectedItems, cardConfig)).toEqual([ - { dataSourceId: 'temperature', label: 'Temperature', color: '#6929c4' }, + { dataSourceId: 'temperature', label: 'Temperature', color: 'red' }, { dataSourceId: 'pressure', label: 'Pressure', color: '#1192e8' }, ]); }); @@ -84,8 +84,8 @@ describe('DataSeriesFormItem', () => { describe('formatDataItemsForDropdown', () => { it('should correctly format the items for the dropdown', () => { expect(formatDataItemsForDropdown(dataItems)).toEqual([ - { id: 'temperature', text: 'Temperature' }, - { id: 'pressure', text: 'Pressure' }, + { id: 'temperature', text: 'temperature' }, + { id: 'pressure', text: 'pressure' }, ]); }); }); From 0ea442194eb92c3d487afa7a68a33fe6eb1f4f14 Mon Sep 17 00:00:00 2001 From: Joel Armendariz Date: Wed, 11 Nov 2020 13:37:31 -0600 Subject: [PATCH 06/17] fix(cardeditor): fix time range labels --- .../CardEditForm/CardEditFormContent.jsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/CardEditor/CardEditForm/CardEditFormContent.jsx b/src/components/CardEditor/CardEditForm/CardEditFormContent.jsx index f3ef26fb3e..b1555d184e 100644 --- a/src/components/CardEditor/CardEditForm/CardEditFormContent.jsx +++ b/src/components/CardEditor/CardEditForm/CardEditFormContent.jsx @@ -117,15 +117,15 @@ const defaultProps = { selectASize: 'Select a size', timeRange: 'Time range', selectATimeRange: 'Select a time range', - last24HoursLabel: 'Last 24 hours', - last7DaysLabel: 'Last 7 days', - lastMonthLabel: 'Last month', - lastQuarterLabel: 'Last quarter', - lastYearLabel: 'Last year', - thisWeekLabel: 'This week', - thisMonthLabel: 'This month', - thisQuarterLabel: 'This quarter', - thisYearLabel: 'This year', + last24Hours: 'Last 24 hours', + last7Days: 'Last 7 days', + lastMonth: 'Last month', + lastQuarter: 'Last quarter', + lastYear: 'Last year', + thisWeek: 'This week', + thisMonth: 'This month', + thisQuarter: 'This quarter', + thisYear: 'This year', }, getValidDataItems: null, getValidTimeRanges: null, @@ -174,7 +174,7 @@ const CardEditFormContent = ({ const validTimeRanges = getValidTimeRanges ? getValidTimeRanges(cardConfig, selectedDataItems) : defaultTimeRangeOptions; - + console.log('i18n', mergedI18n); return ( <>
From eb49304f89ea680a909dad722196e7dbd6f1a6b8 Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Wed, 11 Nov 2020 17:09:13 -0600 Subject: [PATCH 07/17] fix(charts): upgrade carbon charts to get zoombar fix --- package.json | 2 +- yarn.lock | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8e106d24e1..e3d54cd9b3 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ }, "dependencies": { "@babel/runtime": "^7.10.2", - "@carbon/charts": "^0.40.13", + "@carbon/charts": "^0.41.1", "@carbon/charts-react": "^0.40.13", "@carbon/colors": "10.15.0", "@carbon/icons-react": "10.17.0", diff --git a/yarn.lock b/yarn.lock index 6cbc1fd916..a0c799a9e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2545,6 +2545,17 @@ lodash-es "4.17.15" resize-observer-polyfill "1.5.0" +"@carbon/charts@^0.41.1": + version "0.41.1" + resolved "https://registry.yarnpkg.com/@carbon/charts/-/charts-0.41.1.tgz#766ad4ed306ad3df0b4fa3a4e97dec9cdd649f55" + integrity sha512-nCWNMOsiV0E0Tdulf9TcsUSFvkhY5onkdqfZ8NEKX40LQzSWO/nGG1fRAlPxfZpFDuZr7rAW9l0/Z8W5QzkddQ== + dependencies: + "@carbon/colors" "10.15.0" + "@carbon/utils-position" "1.1.1" + date-fns "2.8.1" + lodash-es "4.17.15" + resize-observer-polyfill "1.5.0" + "@carbon/colors@10.15.0": version "10.15.0" resolved "https://registry.yarnpkg.com/@carbon/colors/-/colors-10.15.0.tgz#1a7f211a9e92b51c838995f5f3ffae002a3fed8b" From 52cae90a2159f82f1689d93e1c7423bca3d9db8e Mon Sep 17 00:00:00 2001 From: Scott Dickerson <6663002+scottdickerson@users.noreply.github.com> Date: Thu, 12 Nov 2020 07:22:15 -0600 Subject: [PATCH 08/17] Update src/components/CardEditor/CardEditForm/CardEditFormContent.jsx Co-authored-by: Taylor Jones --- src/components/CardEditor/CardEditForm/CardEditFormContent.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/CardEditor/CardEditForm/CardEditFormContent.jsx b/src/components/CardEditor/CardEditForm/CardEditFormContent.jsx index b1555d184e..b165893834 100644 --- a/src/components/CardEditor/CardEditForm/CardEditFormContent.jsx +++ b/src/components/CardEditor/CardEditForm/CardEditFormContent.jsx @@ -174,7 +174,6 @@ const CardEditFormContent = ({ const validTimeRanges = getValidTimeRanges ? getValidTimeRanges(cardConfig, selectedDataItems) : defaultTimeRangeOptions; - console.log('i18n', mergedI18n); return ( <>
From aa1611045af8164fc0967357ea08265284f66051 Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Thu, 12 Nov 2020 12:23:06 -0600 Subject: [PATCH 09/17] fix(hierarchylist): need to useDeepCompareEffect to stop infinite loop --- src/components/List/HierarchyList/HierarchyList.jsx | 3 ++- src/components/List/List.jsx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/List/HierarchyList/HierarchyList.jsx b/src/components/List/HierarchyList/HierarchyList.jsx index d82a8b6b5e..20a1d9e566 100644 --- a/src/components/List/HierarchyList/HierarchyList.jsx +++ b/src/components/List/HierarchyList/HierarchyList.jsx @@ -244,7 +244,8 @@ const HierarchyList = ({ cancelMoveClicked(); }; - useEffect( + useDeepCompareEffect( + // have to use deep compare to accurately compare items () => { // Expand the parent elements of the defaultSelectedId if (defaultSelectedId) { diff --git a/src/components/List/List.jsx b/src/components/List/List.jsx index 0bf9b5c69d..ba9ac3e482 100644 --- a/src/components/List/List.jsx +++ b/src/components/List/List.jsx @@ -1,4 +1,4 @@ -import React, { forwardRef } from 'react'; +import React, { forwardRef, useMemo } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { DragDropContext } from 'react-dnd'; @@ -144,7 +144,7 @@ const List = forwardRef((props, ref) => { itemWillMove, emptyState, } = props; - const mergedI18n = { ...defaultProps.i18n, i18n }; + const mergedI18n = useMemo(() => ({ ...defaultProps.i18n, i18n }), [i18n]); const selectedItemRef = ref; const ListHeader = overrides?.header?.component || DefaultListHeader; const renderItemAndChildren = (item, index, parentId, level) => { From ef6128eec2fb8fc53df79624a455aa6138524074 Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Thu, 12 Nov 2020 12:23:06 -0600 Subject: [PATCH 10/17] fix(hierarchylist): need to useDeepCompareEffect to stop infinite loop --- src/components/List/HierarchyList/HierarchyList.jsx | 3 ++- src/components/List/List.jsx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/List/HierarchyList/HierarchyList.jsx b/src/components/List/HierarchyList/HierarchyList.jsx index d82a8b6b5e..20a1d9e566 100644 --- a/src/components/List/HierarchyList/HierarchyList.jsx +++ b/src/components/List/HierarchyList/HierarchyList.jsx @@ -244,7 +244,8 @@ const HierarchyList = ({ cancelMoveClicked(); }; - useEffect( + useDeepCompareEffect( + // have to use deep compare to accurately compare items () => { // Expand the parent elements of the defaultSelectedId if (defaultSelectedId) { diff --git a/src/components/List/List.jsx b/src/components/List/List.jsx index 0bf9b5c69d..ba9ac3e482 100644 --- a/src/components/List/List.jsx +++ b/src/components/List/List.jsx @@ -1,4 +1,4 @@ -import React, { forwardRef } from 'react'; +import React, { forwardRef, useMemo } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { DragDropContext } from 'react-dnd'; @@ -144,7 +144,7 @@ const List = forwardRef((props, ref) => { itemWillMove, emptyState, } = props; - const mergedI18n = { ...defaultProps.i18n, i18n }; + const mergedI18n = useMemo(() => ({ ...defaultProps.i18n, i18n }), [i18n]); const selectedItemRef = ref; const ListHeader = overrides?.header?.component || DefaultListHeader; const renderItemAndChildren = (item, index, parentId, level) => { From ad9f3e9a57d00fca8d117348ec4392f9ee4a2490 Mon Sep 17 00:00:00 2001 From: marcJV Date: Wed, 11 Nov 2020 11:23:45 -0600 Subject: [PATCH 11/17] fix(table): fixed left alignment of table headers --- src/components/DataTable/_data-table.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/DataTable/_data-table.scss b/src/components/DataTable/_data-table.scss index a7aad0cbe1..cb007b001a 100644 --- a/src/components/DataTable/_data-table.scss +++ b/src/components/DataTable/_data-table.scss @@ -73,6 +73,11 @@ html[dir='rtl'] { .#{$prefix}--table-sort { padding-left: $spacing-04; padding-right: $spacing-04; + + .#{$prefix}--table-header-label { + padding-left: 0; + padding-right: 0; + } } } From abe2ab870bd63cf9492b1bb8811b7000ee59acdd Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Mon, 16 Nov 2020 09:54:08 -0600 Subject: [PATCH 12/17] fix(listitem): need to support render function --- .../HierarchyList.story.storyshot | 76 +++++++++---------- src/components/List/ListItem/ListItem.jsx | 13 +++- src/components/List/ListItem/_list-item.scss | 6 +- .../List/__snapshots__/List.story.storyshot | 76 +++++++++---------- 4 files changed, 90 insertions(+), 81 deletions(-) diff --git a/src/components/List/HierarchyList/__snapshots__/HierarchyList.story.storyshot b/src/components/List/HierarchyList/__snapshots__/HierarchyList.story.storyshot index 092ee1afbf..44c42b9642 100644 --- a/src/components/List/HierarchyList/__snapshots__/HierarchyList.story.storyshot +++ b/src/components/List/HierarchyList/__snapshots__/HierarchyList.story.storyshot @@ -1910,7 +1910,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -2002,7 +2002,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -2094,7 +2094,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -2186,7 +2186,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -2278,7 +2278,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -2370,7 +2370,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -2462,7 +2462,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -2554,7 +2554,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -2646,7 +2646,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4228,7 +4228,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4268,7 +4268,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4308,7 +4308,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4348,7 +4348,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4388,7 +4388,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4428,7 +4428,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4468,7 +4468,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4508,7 +4508,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4548,7 +4548,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4639,7 +4639,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4679,7 +4679,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4719,7 +4719,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4759,7 +4759,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4799,7 +4799,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4839,7 +4839,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4879,7 +4879,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4919,7 +4919,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4959,7 +4959,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -4999,7 +4999,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -6036,7 +6036,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -6076,7 +6076,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -6116,7 +6116,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -6156,7 +6156,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -6196,7 +6196,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -6236,7 +6236,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -6276,7 +6276,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -6316,7 +6316,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -6356,7 +6356,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -6903,7 +6903,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "0px", } } /> diff --git a/src/components/List/ListItem/ListItem.jsx b/src/components/List/ListItem/ListItem.jsx index 078ac40f35..c1412f00d6 100644 --- a/src/components/List/ListItem/ListItem.jsx +++ b/src/components/List/ListItem/ListItem.jsx @@ -32,7 +32,11 @@ const ListItemPropTypes = { expanded: PropTypes.bool, value: PropTypes.string.isRequired, secondaryValue: PropTypes.string, - rowActions: PropTypes.arrayOf(PropTypes.node), // TODO + /** either a callback render function or a node */ + rowActions: PropTypes.oneOfType([ + PropTypes.arrayOf(PropTypes.node), + PropTypes.func, + ]), icon: PropTypes.node, iconPosition: PropTypes.string, isCategory: PropTypes.bool, @@ -120,7 +124,7 @@ const ListItem = ({ return nestingLevel > 0 ? (
) : null; }; @@ -151,9 +155,10 @@ const ListItem = ({ ) : null; const renderRowActions = () => - rowActions && rowActions.length > 0 ? ( + rowActions && + (typeof rowActions === 'function' || rowActions.length > 0) ? (
- {rowActions} + {typeof rowActions === 'function' ? rowActions() : rowActions}
) : null; diff --git a/src/components/List/ListItem/_list-item.scss b/src/components/List/ListItem/_list-item.scss index afff5dbe6a..cdd1851526 100644 --- a/src/components/List/ListItem/_list-item.scss +++ b/src/components/List/ListItem/_list-item.scss @@ -152,6 +152,7 @@ } } &--values { + position: relative; flex: 1; max-width: 100%; &--main { @@ -167,10 +168,11 @@ } &--value { flex: 1; + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - padding-right: $spacing-05; + padding-right: $spacing-09; &__with-actions { padding-right: 0; width: $spacing-05; @@ -191,6 +193,8 @@ margin-right: 0; overflow: none; display: flex; + position: absolute; + right: 0; } } &--nesting-offset { diff --git a/src/components/List/__snapshots__/List.story.storyshot b/src/components/List/__snapshots__/List.story.storyshot index 2289006599..531fb1f019 100644 --- a/src/components/List/__snapshots__/List.story.storyshot +++ b/src/components/List/__snapshots__/List.story.storyshot @@ -527,7 +527,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -568,7 +568,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -609,7 +609,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -650,7 +650,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -691,7 +691,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -732,7 +732,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -773,7 +773,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -814,7 +814,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -855,7 +855,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -896,7 +896,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -1039,7 +1039,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -1080,7 +1080,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -1121,7 +1121,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -1162,7 +1162,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -1203,7 +1203,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -1244,7 +1244,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -1285,7 +1285,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -1326,7 +1326,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -1367,7 +1367,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -2342,7 +2342,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "0px", } } /> @@ -2401,7 +2401,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -2499,7 +2499,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "60px", } } /> @@ -2608,7 +2608,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "60px", } } /> @@ -2717,7 +2717,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "120px", + "width": "90px", } } /> @@ -2776,7 +2776,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "120px", + "width": "90px", } } /> @@ -2835,7 +2835,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "120px", + "width": "90px", } } /> @@ -2894,7 +2894,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "120px", + "width": "90px", } } /> @@ -2953,7 +2953,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "120px", + "width": "90px", } } /> @@ -3012,7 +3012,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "120px", + "width": "90px", } } /> @@ -3071,7 +3071,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "120px", + "width": "90px", } } /> @@ -3130,7 +3130,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "120px", + "width": "90px", } } /> @@ -3189,7 +3189,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "120px", + "width": "90px", } } /> @@ -3248,7 +3248,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "120px", + "width": "90px", } } /> @@ -3307,7 +3307,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "60px", } } /> @@ -3416,7 +3416,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "30px", } } /> @@ -3514,7 +3514,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "60px", } } /> @@ -3623,7 +3623,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "60px", } } /> @@ -3732,7 +3732,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "60px", } } /> From b2efaa11ab26d76f361eb9c38436ccd9d98dd3e8 Mon Sep 17 00:00:00 2001 From: Taylor Jones Date: Wed, 11 Nov 2020 11:17:54 -0600 Subject: [PATCH 13/17] chore(release): disable Travis CI, enable Publish GH action workflow --- .github/workflows/publish.yml | 5 ++--- .travis.yml | 29 ----------------------------- 2 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9ec70581a3..bf641bb7f0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,6 +6,7 @@ on: push: branches: - master + - next jobs: publish: @@ -46,6 +47,4 @@ jobs: env: GH_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - # Dry-run only for now for testing purposes. Travis CI does the actual publish currently. - # https://semantic-release.gitbook.io/semantic-release/usage/configuration#dryrun - run: yarn publish-npm --dry-run + run: yarn publish-npm diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c65d1a54bf..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: node_js -filter_secrets: false - -stages: - - name: after_success - # require the branch name to be master or next (note for PRs this is the base branch name) - if: branch = master OR branch = next - -before_install: - - node --version - # Repo for Yarn Classic - - sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg - - echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee - /etc/apt/sources.list.d/yarn.list - - sudo apt-get update -qq - - sudo apt-get install -y -qq yarn - -cache: - yarn: true - -install: - - yarn install - - yarn list - -script: - - yarn build - -after_success: - - yarn publish-npm From 6983f8496859d05cf94b384ab4a6e1b62ee36f9f Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Mon, 16 Nov 2020 14:00:01 -0600 Subject: [PATCH 14/17] fix(listiem): fix the padding on non-expandable roots --- src/components/List/ListItem/ListItem.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/List/ListItem/ListItem.jsx b/src/components/List/ListItem/ListItem.jsx index c1412f00d6..3218aee407 100644 --- a/src/components/List/ListItem/ListItem.jsx +++ b/src/components/List/ListItem/ListItem.jsx @@ -124,7 +124,11 @@ const ListItem = ({ return nestingLevel > 0 ? (
) : null; }; From 9a082a0bcd28cd3e4561b2557ab1fef628026c80 Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Mon, 16 Nov 2020 14:02:56 -0600 Subject: [PATCH 15/17] chore(listitem): show deprecation warning for rowAction arrays --- src/components/List/ListItem/ListItem.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/List/ListItem/ListItem.jsx b/src/components/List/ListItem/ListItem.jsx index 3218aee407..fc8a181fad 100644 --- a/src/components/List/ListItem/ListItem.jsx +++ b/src/components/List/ListItem/ListItem.jsx @@ -4,6 +4,7 @@ import classnames from 'classnames'; import { Draggable16, ChevronUp16, ChevronDown16 } from '@carbon/icons-react'; import PropTypes from 'prop-types'; import isEmpty from 'lodash/isEmpty'; +import warning from 'warning'; import { EditingStyle } from '../../../utils/DragAndDropUtils'; import { settings } from '../../../constants/Settings'; @@ -120,6 +121,13 @@ const ListItem = ({ }) => { const handleExpansionClick = () => isExpandable && onExpand(id); + if (__DEV__ && Array.isArray(rowActions)) { + warning( + false, + 'You have passed an array of nodes to ListItem as rowActions. This can cause performance problems and has been deprecated. You should pass a render function instead.' + ); + } + const renderNestingOffset = () => { return nestingLevel > 0 ? (
Date: Mon, 16 Nov 2020 14:17:48 -0600 Subject: [PATCH 16/17] test(snaps): update snaps --- .../HierarchyList/__snapshots__/HierarchyList.story.storyshot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/List/HierarchyList/__snapshots__/HierarchyList.story.storyshot b/src/components/List/HierarchyList/__snapshots__/HierarchyList.story.storyshot index 44c42b9642..8493ba34a9 100644 --- a/src/components/List/HierarchyList/__snapshots__/HierarchyList.story.storyshot +++ b/src/components/List/HierarchyList/__snapshots__/HierarchyList.story.storyshot @@ -6903,7 +6903,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "0px", + "width": "30px", } } /> From 3dff9b9d583bc052afaf1a186e265b82c4e2c4f1 Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Mon, 16 Nov 2020 14:29:06 -0600 Subject: [PATCH 17/17] fix(listitem): undo nestingoffset changes --- .../HierarchyList.story.storyshot | 74 +++++++++--------- src/components/List/ListItem/ListItem.jsx | 4 +- .../List/__snapshots__/List.story.storyshot | 76 +++++++++---------- 3 files changed, 76 insertions(+), 78 deletions(-) diff --git a/src/components/List/HierarchyList/__snapshots__/HierarchyList.story.storyshot b/src/components/List/HierarchyList/__snapshots__/HierarchyList.story.storyshot index 8493ba34a9..092ee1afbf 100644 --- a/src/components/List/HierarchyList/__snapshots__/HierarchyList.story.storyshot +++ b/src/components/List/HierarchyList/__snapshots__/HierarchyList.story.storyshot @@ -1910,7 +1910,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -2002,7 +2002,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -2094,7 +2094,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -2186,7 +2186,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -2278,7 +2278,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -2370,7 +2370,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -2462,7 +2462,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -2554,7 +2554,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -2646,7 +2646,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4228,7 +4228,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4268,7 +4268,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4308,7 +4308,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4348,7 +4348,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4388,7 +4388,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4428,7 +4428,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4468,7 +4468,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4508,7 +4508,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4548,7 +4548,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4639,7 +4639,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4679,7 +4679,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4719,7 +4719,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4759,7 +4759,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4799,7 +4799,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4839,7 +4839,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4879,7 +4879,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4919,7 +4919,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4959,7 +4959,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -4999,7 +4999,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -6036,7 +6036,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -6076,7 +6076,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -6116,7 +6116,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -6156,7 +6156,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -6196,7 +6196,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -6236,7 +6236,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -6276,7 +6276,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -6316,7 +6316,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -6356,7 +6356,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> diff --git a/src/components/List/ListItem/ListItem.jsx b/src/components/List/ListItem/ListItem.jsx index fc8a181fad..31b35705ca 100644 --- a/src/components/List/ListItem/ListItem.jsx +++ b/src/components/List/ListItem/ListItem.jsx @@ -133,9 +133,7 @@ const ListItem = ({
) : null; diff --git a/src/components/List/__snapshots__/List.story.storyshot b/src/components/List/__snapshots__/List.story.storyshot index 531fb1f019..2289006599 100644 --- a/src/components/List/__snapshots__/List.story.storyshot +++ b/src/components/List/__snapshots__/List.story.storyshot @@ -527,7 +527,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -568,7 +568,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -609,7 +609,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -650,7 +650,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -691,7 +691,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -732,7 +732,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -773,7 +773,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -814,7 +814,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -855,7 +855,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -896,7 +896,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -1039,7 +1039,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -1080,7 +1080,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -1121,7 +1121,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -1162,7 +1162,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -1203,7 +1203,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -1244,7 +1244,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -1285,7 +1285,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -1326,7 +1326,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -1367,7 +1367,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -2342,7 +2342,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "0px", + "width": "30px", } } /> @@ -2401,7 +2401,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -2499,7 +2499,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "90px", } } /> @@ -2608,7 +2608,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "90px", } } /> @@ -2717,7 +2717,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "120px", } } /> @@ -2776,7 +2776,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "120px", } } /> @@ -2835,7 +2835,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "120px", } } /> @@ -2894,7 +2894,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "120px", } } /> @@ -2953,7 +2953,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "120px", } } /> @@ -3012,7 +3012,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "120px", } } /> @@ -3071,7 +3071,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "120px", } } /> @@ -3130,7 +3130,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "120px", } } /> @@ -3189,7 +3189,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "120px", } } /> @@ -3248,7 +3248,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "90px", + "width": "120px", } } /> @@ -3307,7 +3307,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "90px", } } /> @@ -3416,7 +3416,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "30px", + "width": "60px", } } /> @@ -3514,7 +3514,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "90px", } } /> @@ -3623,7 +3623,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "90px", } } /> @@ -3732,7 +3732,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper className="iot--list-item--nesting-offset" style={ Object { - "width": "60px", + "width": "90px", } } />