Skip to content

Updated the packages to latest version - #436

Merged
HanjoHagemeierHCL merged 58 commits into
HCL-TECH-SOFTWARE:mainfrom
devsatish05:tech-improvement/DXQ-50751
Sep 24, 2026
Merged

HanjoHagemeierHCL merged 58 commits into
HCL-TECH-SOFTWARE:mainfrom
devsatish05:tech-improvement/DXQ-50751

Conversation

@devsatish05

@devsatish05 devsatish05 commented Aug 3, 2026 •

Copy link
Copy Markdown
Collaborator

https://hclsw-jirads.atlassian.net/browse/DXQ-50751
For testing the PR please follow the below steps:

rm -rf node_modules package-lock.json
npm ci
npm run build
npm run lint
npm run test

npm install git+ssh://github:devsatish05/enchanted-icon-dist#32a3171

This PR is blocked by this PR: HCL-TECH-SOFTWARE/enchanted-icons#65

@kmehboob kmehboob left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Any reason for commenting out this code ?

Comment thread src/DataGrid/DataGrid.tsx Outdated
// if (nextFocusableRow) {
// nextFocusableRow.focus();
// } else {
// // If no focusable row is found, move focus to the footer

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

reason for commenting this out ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @devsatish05, what is the reason here?

Comment thread .storybook/main.js Outdated
const generatePdf = resolveCarbonIcon('generate-pdf');
const softwareResource = resolveCarbonIcon('software-resource-resource') || resolveCarbonIcon('software-resource');

config.resolve.alias = {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Since we already have a helper ( resolveCarbonIcon) and multiple icon aliases, would it make sense to store the icon mappings in map/object?
This would reduce repetitive code and make it easier to add new carbon icon aliases in future if there will be any issues with icons ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@kmehboob This function is used inside .storybook folder, it is not needed anywhere else and in storybook there is no file for helper function, so just adding a it here will be enough.

@angelo-asoy angelo-asoy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

data grid, date picker, tree view are broken

@HanjoHagemeierHCL
HanjoHagemeierHCL self-requested a review August 5, 2026 12:19

@HanjoHagemeierHCL HanjoHagemeierHCL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Left a review comment ...

Comment thread src/DataGrid/DataGrid.tsx Outdated
// if (nextFocusableRow) {
// nextFocusableRow.focus();
// } else {
// // If no focusable row is found, move focus to the footer

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @devsatish05, what is the reason here?

Comment thread .storybook/main.js Outdated

config.resolve.alias = {
...config.resolve.alias,
...(changeCatalog && { '@carbon/icons/es/change-catalog/32': changeCatalog }),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @devsatish05, why we have to implement an exception only for 6 icons? That make to me no sense? Could it be that something is odd in the icons package, which is leading to this problem. Other icons from the @carbon/icons/es can be load with out this exception.

Image

{
"patterns": [""],
"max": 294
"max": 380

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @devsatish05, we should check the reason of the increasing of the number here.

@HanjoHagemeierHCL

Copy link
Copy Markdown
Collaborator

@HanjoHagemeierHCL

HanjoHagemeierHCL commented Aug 5, 2026 •

Copy link
Copy Markdown
Collaborator

data grid, date picker, tree view are broken

DataGrid seams to work ...

image

But TreeView and DataPicker is broken ...

image image

@HanjoHagemeierHCL HanjoHagemeierHCL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Left again a comment

Comment thread package.json Outdated
"jest-environment-jsdom": "^29.7.0",
"jest-image-snapshot": "^6.4.0",
"puppeteer": "^24.9.0",
"react": "^19.2.7",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @devsatish05, add of react and react-dom to dependencies is wrong. Should be only added to peerDependencies ...

Comment thread src/DataGrid/DataGrid.tsx Outdated
firstRow.setAttribute('aria-disabled', 'true');
}
};
// const handleOnHeaderFocus = (event: KeyboardEvent) => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @devsatish05, why is this comment out as well?

@devsatish05
devsatish05 marked this pull request as ready for review August 7, 2026 06:36
Copilot AI lite review requested due to automatic review settings August 7, 2026 06:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the component library to newer React/MUI ecosystem versions (DXQ-50751), including MUI v7 API migrations (slots/slotProps, Grid v2 size prop, x-tree-view, x-date-pickers) and refactors across components/stories to align with the new typings and defaults behavior.

Changes:

  • Upgraded MUI packages (material/system/lab/x-*), TypeScript, ESLint tooling, and React typings; adjusted tsconfig output structure.
  • Migrated multiple components to MUI v7 APIs (e.g., DataGrid slots, x-tree-view, x-date-pickers slots, Grid size), and updated Storybook examples accordingly.
  • Reworked component defaults from Component.defaultProps toward exported *DefaultProps objects and explicit prop merging/default parameters.

Reviewed changes

Copilot reviewed 65 out of 67 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tsconfig.json Sets rootDir to src for build output consistency.
src/Typography/Typography.tsx Moves defaults to typographyDefaultProps and merges props.
src/Typography/Typography.stories.tsx Uses typographyDefaultProps for Storybook args.
src/TreeView/TreeView.tsx Migrates from @mui/lab TreeView to @mui/x-tree-view slots API.
src/TreeView/TreeView.stories.tsx Updates TreeView story props to new x-tree-view API.
src/TreeView/TreeItem.tsx Migrates TreeItem to x-tree-view TreeItem2 and slotProps.
src/ToggleButtonGroup/ToggleButtonGroup.stories.tsx Migrates Grid usage to v2 size prop patterns.
src/ToggleButton/ToggleButton.tsx Moves defaults to toggleButtonDefaultProps and merges props.
src/ToggleButton/ToggleButton.stories.tsx Uses toggleButtonDefaultProps and Grid v2 patterns.
src/theme/index.ts Updates MUI theme typings (Typography variants options).
src/TextField/TextField.tsx Exports textFieldDefaultProps and merges props.
src/TextField/TextField.stories.tsx Uses textFieldDefaultProps for Storybook controls/args.
src/Tabs/Tab.tsx Removes empty defaultProps.
src/Snackbar/SnackbarContainer.tsx Adjusts styled component typing for React 19 typings.
src/Snackbar/Snackbar.tsx Replaces JSX.Element with React.ReactElement typings.
src/Select/SelectSingle.stories.tsx Removes reliance on Select.defaultProps in args.
src/Select/SelectMultiple.stories.tsx Removes reliance on Select.defaultProps in args.
src/Select/Select.tsx Switches to unstable_useId, inlines defaults merge, removes defaultProps.
src/Preview/Preview.tsx Converts defaults to parameter defaults; updates React element typings.
src/Preview/Preview.stories.tsx Removes reliance on Preview.defaultProps in args.
src/prerequisite_components/InputLabelAndAction/InputLabelAndAction.tsx Updates styled component typings + Grid v2 size usage; removes empty defaultProps.
src/PickersLocalizationProvider/PickersLocalizationProvider.tsx Updates pickers typings/generics for Dayjs/MUI v7.
src/Paper/Paper.tsx Adds explicit merged defaults (paperDefaultProps) instead of defaultProps.
src/Paper/Paper.stories.tsx Removes reliance on Paper.defaultProps in args.
src/Panel/PanelTabs.tsx Removes empty defaultProps.
src/Panel/PanelTabContent.tsx Migrates Grid props to v2 size; removes empty defaultProps.
src/Panel/Panel.tsx Converts defaults to parameter defaults; updates React element typings.
src/Panel/Panel.stories.tsx Removes reliance on Panel.defaultProps in stories.
src/Pagination/CustomTablePaginationActions.tsx Updates pagination action prop typing via TablePaginationProps.
src/List/ListItemText.tsx Updates Grid child sizing to v2 size prop usage.
src/List/ListItem.tsx Removes defaultProps, merges default hasBorder.
src/List/List.tsx Removes defaultProps, merges default list props.
src/List/List.stories.tsx Removes reliance on List.defaultProps in args.
src/Introduction/IntroductionPage.tsx Removes empty defaultProps.
src/IconButton/IconButton.tsx Replaces defaultProps with merged defaults inside component.
src/Icon/Icon.stories.tsx Updates Grid sizing and JSX element typing.
src/hidden_components/TimePicker/TimePicker.tsx Migrates to pickers v7 slots/slotProps API and Dayjs generics.
src/Header/sampleHeaderConfig.tsx Stops spreading *.defaultProps into sample configs.
src/Header/Header.tsx Migrates Grid layout props to v2 size.
src/DatePicker/DatePicker.tsx Migrates to pickers v7 slots/slotProps and updates calendar styling selectors.
src/DatePicker/DatePicker.stories.tsx Adjusts args parsing typing for updated Storybook/TS.
src/DataGrid/sampleData.tsx Updates valueGetter signature to newer DataGrid API.
src/DataGrid/DataGridColumnMenu.tsx Updates column menu props shape and container to match newer DataGrid patterns.
src/DataGrid/DataGrid.tsx Migrates to DataGrid v7 slots/slotProps and pagination model.
src/composite_components/Tile/TileActionMenu.tsx Updates cloneElement typing for React 19.
src/composite_components/Tile/Tile.tsx Tightens styled Box component typing.
src/composite_components/SearchCriteria/SearchCriteria.tsx Removes empty defaultProps.
src/colors/index.ts Updates MUI palette color typing import.
src/colors/Grey.stories.tsx Adjusts Storybook Meta/StoryFn typing.
src/Chip/Chip.tsx Makes avatar access safer with optional chaining/any cast.
src/Chip/Chip.stories.tsx Migrates Grid usage to v2 patterns.
src/Checkbox/Checkbox.tsx Exports checkboxDefaultProps and merges props.
src/Checkbox/Checkbox.stories.tsx Uses checkboxDefaultProps in args.
src/Button/Button.tsx Exports buttonDefaultProps, merges props, avoids leaking custom props into rest.
src/Button/Button.stories.tsx Uses buttonDefaultProps and Grid v2 patterns.
src/Badge/Badge.tsx Introduces badgeDefaultProps and uses it as defaults.
src/Badge/Badge.stories.tsx Uses badgeDefaultProps in args and Grid v2 patterns.
src/Avatar/Avatar.tsx Updates return type to React.ReactElement.
src/Alert/Alert.stories.tsx Migrates Grid usage to v2 patterns.
src/ActionButton/ActionButton.tsx Exports actionButtonDefaultProps, converts to param defaults.
src/ActionButton/ActionButton.stories.tsx Uses actionButtonDefaultProps in args.
package.json Upgrades dependencies/tooling; switches icons dependency source; updates peer deps.
.storybook/main.js Minor webpack config edits (currently includes a no-op line).
.jest-reporter-log-validator-config.json Updates allowed log count threshold.
Suppressed comments (1)

src/DataGrid/DataGridColumnMenu.tsx:51

  • The hide/manage column actions should also close the column menu after executing. Calling hideMenu?.() after these clicks keeps the menu behavior consistent and avoids leaving the menu open.
  return (
    <Paper elevation={3}>
      <MenuItem onClick={() => { handleSortModelChange('asc'); }}>
        <ArrowUp />
        {' '}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json Outdated
Comment on lines +44 to +46
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@hcl-software/enchanted-icons": "github:devsatish05/enchanted-icon-dist#32a3171",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @devsatish05, this should be than replaced with the new icon package version

Comment thread package.json
Comment on lines 111 to 114
"peerDependencies": {
"react": "^18.2.0 || ^19.0.0"
"react": "^19.2.7",
"react-dom": "^19.2.7"
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @devsatish05, let us discuss this point ...

Comment thread .storybook/main.js Outdated
Comment on lines 61 to 64
config.resolve = config.resolve || {};


return config;
Comment on lines 34 to 38
export const ExtendedGridColumnMenu = ({
currentColumn, onSortModelChange, onColumnVisibilityModelChange, columnVisibilityModel, ...rest
colDef, onSortModelChange, onColumnVisibilityModelChange, columnVisibilityModel,
}: GridColumnMenuProps) => {
const apiContext = useGridApiContext();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @devsatish05, please check this copilot review comment

@HanjoHagemeierHCL HanjoHagemeierHCL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @devsatish05, please add also a changelog entry. You had also forgotten to add this for the icon package ...

Comment thread .storybook/preview.js Outdated
import { ThemeDirectionType, ThemeModeType } from '../src/theme';
import { create } from 'storybook/theming/create';

// const style = document.createElement('style');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @devsatish05, remove this.

Comment thread src/theme/index.ts
root: ({ ownerState }) => {
return {
...(ownerState.container && {
'&.legacy-grid-spacing': {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @devsatish05, I do't rely like this solution. We should search afterwards for better solution ...

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@HanjoHagemeierHCL Sure, I will look for better solution.

@HanjoHagemeierHCL
HanjoHagemeierHCL merged commit de0a92e into HCL-TECH-SOFTWARE:main Sep 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants