-
Notifications
You must be signed in to change notification settings - Fork 4
🤖 Bip Bop - Fusion React Components Pre-Release (preview) #2847
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
odinr
merged 1 commit into
styles/react-19-compatibility
from
changeset-release/styles/react-19-compatibility
Nov 2, 2025
Merged
🤖 Bip Bop - Fusion React Components Pre-Release (preview) #2847
odinr
merged 1 commit into
styles/react-19-compatibility
from
changeset-release/styles/react-19-compatibility
Nov 2, 2025
Conversation
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
odinr
added a commit
that referenced
this pull request
Nov 3, 2025
#2845) * feat(styles): remove Material-UI dependency for React 19 compatibility - Remove @material-ui/styles dependency and replace with custom JSS implementation - Add comprehensive test suite with Vitest (52 tests, 100% coverage) - Add TSDoc documentation for all exported APIs - Update README with comprehensive documentation - Add utility modules for JSS setup, class name generation, and sheet management - Enhance StylesProvider with seed-based scope isolation - Improve TypeScript types with better inference BREAKING CHANGE: Removed @material-ui/styles dependency Signed-off-by: Odin Thomas Rochmann <odin.rochmann@gmail.com> * feat(storybook): add comprehensive styles documentation and stories - Add MDX documentation page for styles package - Organize stories into logical groups (Basic Usage, Scope Isolation, Advanced Features, Theme System, Utilities) - Add visual demonstrations of class name isolation for micro-frontends - Update Storybook port to 3000 - Remove @material-ui/styles dependency from Storybook ref: equinor/fusion-framework#3698 * chore: add pre-release workflow for next branch * chore: add pre-release configuration * chore: update pnpm-lock.yaml * Version Packages (preview) (#2846) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: ignore .changeset directory in biome * chore: add changeset:publish:pre-release script * fix: forward arguments to changeset:publish:pre-release script * fix: remove incorrect -- flag from changeset:publish:pre-release * chore: update packageManager to pnpm@10.20.0 * feat(styles): add theme extension support and improve nested theme composition - Add support for extending FusionTheme with custom properties using generics - Enhance createTheme to accept optional baseTheme parameter for nested themes - Improve deep merging to properly handle StyleProperty instances and Record types - Export ThemeProviderProps and StylesProviderProps interfaces for better TypeScript support - Add explicit exports for createTheme, FusionTheme, and StyleDefinition - Update tests to use createTheme instead of plain objects - Fix theme merging in nested ThemeProvider scenarios All changes are backward compatible. Signed-off-by: Odin Thomas Rochmann <odin.rochmann@gmail.com> * docs: add TSDoc documentation and update Storybook stories - Add comprehensive TSDoc comments to all exported functions, types, and interfaces in styles package - Update all Storybook stories to use theme CSS values instead of custom CSS - Add ThemeExtension story demonstrating how to extend FusionTheme - Update changesets to reflect documentation improvements - Clear pre.json changesets array for re-release * Version Packages (preview) (#2847) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: update changeset:publish:pre-release script to use dynamic NPM tag - Modify the changeset:publish:pre-release script in package.json to include a dynamic NPM tag using the environment variable. - Update GitHub Actions workflow to pass the NPM tag as an environment variable for the publish step. Signed-off-by: Odin Thomas Rochmann <odin.rochmann@gmail.com> * chore: configure npm authentication in GitHub Actions workflow - Add a step to the GitHub Actions workflow to set up npm authentication using the NPM_AUTH_TOKEN secret. - Ensure the changeset:publish:pre-release script in package.json uses the correct NPM tag format. Signed-off-by: Odin Thomas Rochmann <odin.rochmann@gmail.com> * chore: update changesets and add TypeScript definitions - Remove unused changeset reference from pre.json. - Add TypeScript definitions path to package.json for better type support. Signed-off-by: Odin Thomas Rochmann <odin.rochmann@gmail.com> * Version Packages (preview) (#2848) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: update version and enhance makeStyles functionality - Bump version to 2.0.0-preview.3 in package.json. - Introduce unique identifier generation for makeStyles instances to ensure stylesheet isolation. - Implement a simple hash function for generating shorter class names in production. - Update makeStyles to utilize the new unique name generation logic. - Remove outdated create-styles test file and replace it with a comprehensive test suite in create-styles.test.tsx. Signed-off-by: Odin Thomas Rochmann <odin.rochmann@gmail.com> * fix(styles): update theme API usage to getVariable() and improve type safety - Replace incorrect .css and getAttribute() usage with getVariable() API - Update all storybook stories to use correct theme property access patterns - Enhance makeStyles type inference to return Record<ClassKey, string> - Improve createStyles to preserve literal key types for better type safety - Update README with comprehensive documentation on theme property access - Update changesets to reflect correct API usage - Fix test files to match new API signatures BREAKING CHANGE: Theme properties now require getVariable() method instead of .css property: - Colors: theme.colors.*.getVariable('color') - Spacing: theme.spacing.*.getVariable('padding') - Typography: theme.typography.*.style.* (unchanged) The return type of makeStyles is now Record<ClassKey, string> where ClassKey is inferred from style rules when using createStyles, providing compile-time type safety for class name access. * feat(styles): add hot-reload support and improve sheet management - Add hot-reload detection using style hashing (dev only) - Implement shared sheet detection to prevent premature detachment - Simplify scopeId generation and instance naming - Add warning when name option is missing from makeStyles - Improve sheet cleanup logic to handle shared sheets correctly - Update tsconfig to exclude test files from build - Bump version to 2.0.0-preview.5 * docs(styles): enhance TSDoc comments and inline documentation - Add comprehensive TSDoc comments to all source files - Fix all TSDoc examples to use correct theme API (getVariable) - Add inline maintainer comments explaining complex logic - Add Biome ignore comments for all explicit 'any' types with proper reasoning - Update README with validated examples and comprehensive documentation - Remove ESLint comments (project uses Biome) - Improve code comments throughout the package for better maintainability * fix(styles): make Props optional in makeStyles when not specified Changed default Props type from Record<string, unknown> to {} in makeStyles overloads. This ensures keyof Props evaluates to never when Props is empty, making the conditional type return (props?: Props) instead of requiring props. Fixes build errors where useStyles() was called without arguments but TypeScript required props parameter. * Update .changeset/react-styles-theme-extensions.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: exit pre-release mode * chore: reset package versions and changelogs to main * chore: regen lockfile Signed-off-by: Odin Thomas Rochmann <odin.rochmann@gmail.com> --------- Signed-off-by: Odin Thomas Rochmann <odin.rochmann@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to styles/react-19-compatibility, this PR will be updated.
styles/react-19-compatibilityis currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, runchangeset pre exitonstyles/react-19-compatibility.Releases
@equinor/fusion-react-styles@2.0.0-preview.1
Major Changes
07a06d2: Remove
@material-ui/stylesdependency and replace with custom JSS-based implementation for React 19 compatibility.ref: React 19: Remove Material-UI from @equinor/fusion-react-styles (v1.0.0) fusion-framework#3698
Breaking Changes
@material-ui/stylesdependency - replaced with direct JSS integrationAdded
makeStylesimplementation using JSS directlyStylesProviderwith enhanced scope isolation via seed prefixesThemeProviderwith React 19 compatibilitysrc/utils/:jss-setup.ts- JSS instance configurationclass-name-generator.ts- Class name generation logicsheet-manager.ts- Stylesheet caching and managementcontexts.ts- React context definitionsChanged
Technical Details
Minor Changes
0a1bf8d: Enhanced theme system with support for extending
FusionThemewith custom properties, improved nested theme composition, and comprehensive documentation.Added
FusionThemenow supports extending with custom properties using generics:createThemenow accepts an optionalbaseThemeparameter for merging with custom base themes:deepMergefunction properly handles nested theme properties,Recordtypes, andStylePropertyinstancesThemeProviderProps,StylesProviderProps,FusionTheme,StyleDefinition, andcreateThemefor better TypeScript supportThemeExtensionstory demonstrating how to extend themes with custom properties, including step-by-step examples for type definition, theme creation, and usage withuseThemeandmakeStylesChanged
createThemesignature now accepts optionalbaseThemeparameter (backward compatible)ThemeProvider,useTheme, andmakeStylesThemeProvidercomponentstheme.colors.*.css,theme.spacing.*.css,theme.typography.*.style.*) instead of hardcoded custom CSS, ensuring proper integration with Fusion design system tokensTechnical Details
StylePropertyinstances (replaces instead of merging)ThemeProvidercomponents.style.fontSize,.style.fontWeight, etc. for proper CSS value extraction.cssproperty for CSS variable or value string@equinor/fusion-react-components-stories@5.0.1-preview.1
Patch Changes
f9c381b: Add comprehensive Storybook documentation and stories for
@equinor/fusion-react-stylespackage.ref: React 19: Remove Material-UI from @equinor/fusion-react-styles (v1.0.0) fusion-framework#3698
Added
styles.mdx): Comprehensive MDX documentation page showcasing all styling featuresStylesProviderexamplesuseThemehook examples, and Theme Extension guidecreateStyleshelper examplesFusionThemewith custom propertiesChanged
@material-ui/stylesdependency from Storybook packagetheme.colors.*.css,theme.spacing.*.css,theme.typography.*.style.*) for consistent design system integrationUpdated dependencies [07a06d2]
Updated dependencies [0a1bf8d]