Skip to content

Commit

Permalink
chore: fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewgallo committed Dec 4, 2023
2 parents 4c3a040 + ae33c58 commit b9cb90b
Show file tree
Hide file tree
Showing 29 changed files with 1,638 additions and 819 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,15 @@
"contributions": [
"code"
]
},
{
"login": "SeonyuK",
"name": "SeonyuK",
"avatar_url": "https://avatars.githubusercontent.com/u/144151347?v=4",
"profile": "https://github.com/SeonyuK",
"contributions": [
"a11y"
]
}
],
"contributorsPerLine": 5,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ Thanks goes to these wonderful people
</tr>
<tr>
<td align="center" valign="top" width="20%"><a href="https://github.com/punnoosewilson"><img src="https://avatars.githubusercontent.com/u/40118548?v=4?s=100" width="100px;" alt="PUNNOOSE WILSON"/><br /><sub><b>PUNNOOSE WILSON</b></sub></a><br /><a href="https://github.com/carbon-design-system/ibm-products/commits?author=punnoosewilson" title="Code">💻</a></td>
<td align="center" valign="top" width="20%"><a href="https://github.com/SeonyuK"><img src="https://avatars.githubusercontent.com/u/144151347?v=4?s=100" width="100px;" alt="SeonyuK"/><br /><sub><b>SeonyuK</b></sub></a><br /><a href="#a11y-SeonyuK" title="Accessibility">️️️️♿️</a></td>
</tr>
</tbody>
</table>
Expand Down
5 changes: 5 additions & 0 deletions cspell.contributors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,16 @@ thefirstartist

Balchin

jlongshore

kristastarr

Olasov
mikeolasov

Punnoose
punnoosewilson

SeonyuK

tay1orjones
29 changes: 18 additions & 11 deletions packages/core/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
/**
* Copyright IBM Corp. 2020, 2022
* Copyright IBM Corp. 2020, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

const { resolve } = require('path');
const { merge } = require('webpack-merge');
const path = require('path');
const { dirname, join, resolve } = require('path');

module.exports = {
addons: [
'@storybook/addon-actions',
'@storybook/addon-docs',
'@storybook/addon-controls',
'@storybook/addon-links',
getAbsolutePath('@storybook/addon-actions'),
getAbsolutePath('@storybook/addon-docs'),
getAbsolutePath('@storybook/addon-controls'),
getAbsolutePath('@storybook/addon-links'),
{
name: '@storybook/addon-storysource',
options: {
Expand All @@ -23,26 +22,30 @@ module.exports = {
},
},
},
'@storybook/addon-viewport',
'@storybook/addon-mdx-gfm',
getAbsolutePath('@storybook/addon-viewport'),
getAbsolutePath('@storybook/addon-mdx-gfm'),
'@carbon/storybook-addon-theme/preset.js',
],

framework: {
name: '@storybook/react-webpack5',
name: getAbsolutePath('@storybook/react-webpack5'),
options: {
// fastRefresh: true,
// strictMode: true,
},
},

features: {
// setting storyStoryV7 to false allows the storybook to build
storyStoreV7: false, // 👈 Opt out of on-demand story loading - problems https://github.com/storybookjs/storybook/issues/21696
},

stories: [
'../../ibm-products/+(docs|src)/**/*+(-story|.stories).*',
'../+(docs|src)/**/*+(-story|.stories).*',
'../../../examples/**/*+(-story|.stories).*',
],

// v11 will only show stories for C4P components (or at least until CDAI/Security move from v10 to v11)
webpackFinal: async (configuration, { configType }) =>
merge(configuration, {
Expand Down Expand Up @@ -87,7 +90,7 @@ module.exports = {
},
resolve: {
alias: {
ALIAS_STORY_STYLE_CONFIG$: path.resolve(
ALIAS_STORY_STYLE_CONFIG$: resolve(
configType === 'DEVELOPMENT'
? '../ibm-products-styles/src/config-dev.scss'
: '../ibm-products-styles/src/config.scss'
Expand All @@ -96,3 +99,7 @@ module.exports = {
},
}),
};

function getAbsolutePath(value) {
return dirname(require.resolve(join(value, 'package.json')));
}
37 changes: 19 additions & 18 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,26 @@
"@carbon/ibm-products-styles": "^2.17.1",
"@carbon/layout": "^11.20.1",
"@carbon/motion": "^11.16.1",
"@carbon/react": "^1.42.1",
"@carbon/react": "^1.44.0",
"@carbon/storybook-addon-theme": "^2.0.5",
"@carbon/themes": "^11.27.1",
"@carbon/themes": "^11.28.0",
"@carbon/type": "^11.25.1",
"@storybook/addon-actions": "^7.2.3",
"@storybook/addon-controls": "^7.2.3",
"@storybook/addon-docs": "^7.2.3",
"@storybook/addon-links": "^7.2.3",
"@storybook/addon-mdx-gfm": "^7.2.3",
"@storybook/addon-storysource": "^7.2.3",
"@storybook/addon-viewport": "^7.2.3",
"@storybook/addons": "^7.2.3",
"@storybook/api": "^7.2.3",
"@storybook/components": "^7.2.3",
"@storybook/core-events": "^7.2.3",
"@storybook/csf": "^0.1.1",
"@storybook/react": "^7.2.3",
"@storybook/react-webpack5": "^7.2.3",
"@storybook/theming": "^7.2.3",
"@storybook/addon-actions": "^7.6.2",
"@storybook/addon-controls": "^7.6.2",
"@storybook/addon-docs": "^7.6.2",
"@storybook/addon-links": "^7.6.2",
"@storybook/addon-mdx-gfm": "^7.6.2",
"@storybook/addon-storysource": "^7.6.2",
"@storybook/addon-viewport": "^7.6.2",
"@storybook/addons": "^7.6.2",
"@storybook/api": "^7.6.2",
"@storybook/components": "^7.6.2",
"@storybook/core-events": "^7.6.2",
"@storybook/csf": "^0.1.2",
"@storybook/react": "^7.6.2",
"@storybook/react-webpack5": "^7.6.2",
"@storybook/source-loader": "^7.6.2",
"@storybook/theming": "^7.6.2",
"babel-loader": "^9.1.3",
"babel-preset-ibm-cloud-cognitive": "^0.14.39",
"css-loader": "^6.8.1",
Expand All @@ -65,7 +66,7 @@
"rimraf": "^5.0.1",
"sass": "^1.64.2",
"sass-loader": "^13.3.2",
"storybook": "^7.2.3",
"storybook": "^7.6.2",
"style-loader": "^3.3.3",
"typescript": "^5.1.6",
"webpack": "^5.88.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/ibm-products-styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@carbon/grid": "^11.21.1",
"@carbon/layout": "^11.20.1",
"@carbon/motion": "^11.16.1",
"@carbon/themes": "^11.26.1",
"@carbon/themes": "^11.28.0",
"@carbon/type": "^11.25.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,12 @@
.#{variables.$block-class}__row-size__row-settings-trigger--open.#{c4p-settings.$carbon-prefix}--btn--ghost {
background-color: $layer-02;
}

.#{variables.$block-class}
table.#{c4p-settings.$carbon-prefix}--data-table--xl.#{variables.$block-class}__vertical-align-center
td.#{variables.$block-class}__expandable-row-cell,
.#{variables.$block-class}
table.#{c4p-settings.$carbon-prefix}--data-table--xl.#{variables.$block-class}__vertical-align-top
td.#{variables.$block-class}__expandable-row-cell {
padding-top: $spacing-03;
}
4 changes: 2 additions & 2 deletions packages/ibm-products/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
"@carbon/grid": "^11.21.1",
"@carbon/layout": "^11.20.1",
"@carbon/motion": "^11.16.1",
"@carbon/react": "^1.42.1",
"@carbon/themes": "^11.27.1",
"@carbon/react": "^1.44.0",
"@carbon/themes": "^11.28.0",
"@carbon/type": "^11.25.1",
"react": "^16.8.6 || ^17.0.1 || ^18.2.0",
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
Expand Down
57 changes: 33 additions & 24 deletions packages/ibm-products/src/components/Datagrid/Datagrid.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1894,49 +1894,58 @@ describe(componentName, () => {
});

it('Row Size Dropdown', async () => {
render(<RowSizeDropdown data-testid={dataTestId}></RowSizeDropdown>);
const user = userEvent.setup({
advanceTimers: jest.advanceTimersByTime,
});
const { click, keyboard } = user;
render(<RowSizeDropdown data-testid={dataTestId} />);

const alertMock = jest.spyOn(window, 'alert');

// Click select all rows checkbox
const selectAllCheckbox = screen.getByLabelText(
'Select all rows in the table'
);
fireEvent.click(selectAllCheckbox);
await click(selectAllCheckbox);

// Count number of rows
const rowSize = screen.getByTestId(dataTestId).querySelector(`tbody`)
.children.length;
const tableRows = screen.getAllByRole('row');
const bodyRows = tableRows.filter(
(row) => !row.classList.contains(`${blockClass}__head`)
);

//This checks to see if all the rows in the table have been selected.
for (var i = 0; i < rowSize; i++) {
expect(
screen
.getByRole('table')
.getElementsByTagName('tbody')[0]
.getElementsByTagName('tr')[i].classList[1]
).toEqual(`${carbon.prefix}--data-table--selected`);
}
bodyRows.forEach((bodyRow) => {
expect(bodyRow).toHaveClass(`${carbon.prefix}--data-table--selected`);
});

expect(
document
.getElementsByClassName('c4p--datagrid__table-toolbar')[0]
.getElementsByTagName('section')[0]
.getElementsByTagName('div')[0]
.getElementsByTagName('div')[0]
.getElementsByTagName('p')[0]
.getElementsByTagName('span')[0].textContent
).toEqual('10 items selected');
screen.getByText('10 items selected');

// Find and click Refresh button
const actionButton = screen.getByText('Action');
fireEvent.click(actionButton);
await click(actionButton);
expect(alertMock).toHaveBeenCalled();

// Find and click cancel button
const cancelButton = screen.getByText('Cancel');
fireEvent.click(cancelButton);
await click(cancelButton);
expect(alertMock).toHaveBeenCalled();

await click(screen.getByLabelText('Row settings'));
expect(screen.getByLabelText('Row settings')).toHaveClass(
`${blockClass}__row-size__row-settings-trigger--open`
);
await keyboard('[Escape]');
expect(screen.getByLabelText('Row settings')).not.toHaveClass(
`${blockClass}__row-settings-trigger--open`
);
await click(screen.getByLabelText('Row settings'));
await keyboard('[ArrowUp]');
const tableElement = screen.getByRole('table');
expect(tableElement).toHaveClass(`${carbon.prefix}--data-table--md`);
click(screen.getAllByRole('columnheader')[0]);
expect(screen.getByLabelText('Row settings')).not.toHaveClass(
`${blockClass}__row-settings-trigger--open`
);
});

it('Selectable Row', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const useCreateComponentStepChange = ({
useEffect(() => {
const onUnmount = () => {
if (componentName !== 'CreateFullPage') {
setCurrentStep(0);
setCurrentStep(1);
}
setIsSubmitting(false);
onClose();
Expand Down
Loading

0 comments on commit b9cb90b

Please sign in to comment.