Skip to content
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

PigmentCSS createTheme. Invalid typings in styleOverrides #44114

Open
o-alexandrov opened this issue Oct 15, 2024 · 7 comments
Open

PigmentCSS createTheme. Invalid typings in styleOverrides #44114

o-alexandrov opened this issue Oct 15, 2024 · 7 comments
Assignees
Labels
package: pigment-css Specific to @pigment-css/* typescript

Comments

@o-alexandrov
Copy link
Contributor

o-alexandrov commented Oct 15, 2024

Steps to reproduce

Link to live example

Steps:

  1. Clone
  2. Refer to vite.config.ts

Current behavior

components[string].styleOverrides has invalid typings.
No typings errors are presented to the user.

Expected behavior

There should be an error for styleOverrides.extended usage in vite.config.ts file from the repro.

Context

Your environment

npx @mui/envinfo
  System:
    OS: macOS 15.0.1
  Binaries:
    Node: 22.9.0 - /opt/homebrew/bin/node
    npm: 10.8.3 - /opt/homebrew/bin/npm
    pnpm: 9.9.0 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 129.0.6668.91
    Edge: 112.0.1722.39
    Safari: 18.0.1
  npmPackages:
    @emotion/react:  11.13.3 
    @emotion/styled:  11.13.0 
    @mui/core-downloads-tracker:  6.1.3 
    @mui/material: latest => 6.1.3 
    @mui/material-pigment-css: latest => 6.1.3 
    @mui/private-theming:  6.1.3 
    @mui/styled-engine:  6.1.3 
    @mui/system:  6.1.3 
    @mui/types:  7.2.18 
    @mui/utils:  6.1.3 
    @pigment-css/react:  0.0.24 
    @pigment-css/vite-plugin: latest => 0.0.24 
    @types/react: latest => 18.3.11 
    react: latest => 18.3.1 
    react-dom: latest => 18.3.1 
    typescript: latest => 5.6.3 

Search keywords: pigment, styleOverrides, typings, invalid, createTheme

@o-alexandrov o-alexandrov added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 15, 2024
@zannager zannager added the package: pigment-css Specific to @pigment-css/* label Oct 16, 2024
@siriwatknp siriwatknp moved this to Selected in Material UI Oct 21, 2024
@sai6855

This comment was marked as outdated.

@o-alexandrov
Copy link
Contributor Author

o-alexandrov commented Oct 29, 2024

@sai6855 you misunderstood the highlighted problem. In your repro, you are not using PigmentCSS. Please refer to breaking changes when migrating to PigmentCSS, the variants part of the migration guide.

You could also consider to review the linked issue. That’ll give more details

@brijeshb42
Copy link
Contributor

I just cloned and tried to repro the typing error from your repo but all the typechecks passed. Could you post a screenshot or cli command or something else that shows the error ?
I might be missing something in the repro.

@brijeshb42 brijeshb42 added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 5, 2024
@o-alexandrov
Copy link
Contributor Author

@brijeshb42 type check shouldn't be passing.
Please refer to the description of this issue:

There should be an error for styleOverrides.extended usage in vite.config.ts file from the repro.

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Nov 5, 2024
@brijeshb42
Copy link
Contributor

I ran typecheck through cli -

tsc -p tsconfig.node.json

and

tsc -p tsconfig.app.json

Both passed without any error. 2nd one logged unused React error but that seems unrelated.

@o-alexandrov
Copy link
Contributor Author

@siriwatknp siriwatknp assigned siriwatknp and unassigned brijeshb42 Jan 9, 2025
@siriwatknp siriwatknp added typescript and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 9, 2025
@siriwatknp
Copy link
Member

I will try to reproduce it tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: pigment-css Specific to @pigment-css/* typescript
Projects
Status: Selected
Development

No branches or pull requests

5 participants