-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrade to MUI v7 #200
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
Merged
Merged
Upgrade to MUI v7 #200
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
61bf1c5
Upgrade to MUI v7
carojeandat 860ffa2
Merge remote-tracking branch 'origin' into upgrade-to-mui-v7
carojeandat dbfd318
update package-lock
carojeandat ec6cdd5
Merge branch 'main' into upgrade-to-mui-v7
carojeandat 31dd019
upgrade commons-ui version
carojeandat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: gridsuite/gridadmin-app
Length of output: 50379
🏁 Script executed:
Repository: gridsuite/gridadmin-app
Length of output: 1894
🌐 Web query:
TypeScript module augmentation export reexport error@mui/material/stylesTheme TypeScript💡 Result:
When working with TypeScript module augmentation for Material UI (MUI), "export" or "re-export" errors—or scenarios where augmentations fail to apply—typically stem from how TypeScript handles module resolution and ambient declarations [1][2][3]. Key causes and solutions include: 1. Missing Import in Declaration Files: If your module augmentation resides in a
.d.tsfile or a file that is not directly importing the target module, TypeScript may ignore the declaration [1][2]. You must import the target module (e.g., '@mui/material/styles') within your declaration file to ensure TypeScript recognizes the module for augmentation [1][2]. Example: import '@mui/material/styles'; declare module '@mui/material/styles' { interface Theme { status: { danger: string; }; } } 2. Issues with Re-exports and Overriding: TypeScript can sometimes treat re-exports in a way that overrides existing interfaces rather than merging with them [4]. If you are distributing a library containing theme overrides, ensure your augmentation is correctly targeting the original source module (e.g., '@mui/material/styles') rather than a file that re-exports it [4][3]. 3. Library Distribution Challenges: When isolating a theme into a separate library, downstream applications may not automatically pick up the augmentations defined in your package [5][6]. To ensure these types propagate: - Ensure the file containing thedeclare moduleblock is included in the package's exports or types field inpackage.json. - Consumers may need to reference the declaration file, sometimes by importing an empty type from the package in theirtsconfig.jsonor a global declaration file (e.g.,import type {} from '@your-org/theme-lib/types/mui';) [5][7]. 4. Performance and Circular Dependencies: In newer MUI versions, certain paths (like@mui/material/stylesOptimized) exist to avoid circular dependencies [8]. If you are experiencing persistent issues with type resolution, ensure that your import paths forcreateThemeand module augmentation match consistently throughout your project [8]. General Troubleshooting Steps: - Verify that your augmentation file is actually being included in the TypeScript compilation (check yourtsconfig.jsonincludeproperty). - If using VS Code, restart the TypeScript server (Ctrl/Cmd + Shift + P -> "TypeScript: Restart TS server") to clear cached type definitions. - Always prefer importing the exact module you intend to augment, rather than relying on re-exported paths, to ensure predictable merge behavior [3].Citations:
Remove the self-re-export from the
@mui/material/stylesaugmentation.MUI’s
ThemeandThemeOptionsare already exported from this module. TypeScript module augmentations should merge declarations only; keepexport * from '@mui/material/styles'outside this block if it is needed at all.🤖 Prompt for AI Agents