-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[CircularProgress] Custom variant #22174
Conversation
@@ -42,12 +40,7 @@ addPropertyControls(CircularProgress, { | |||
type: ControlType.Number, | |||
title: 'Value', | |||
hidden: function hidden(props) { | |||
return props.variant === 'indeterminate'; | |||
return true; |
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.
Is this fine? The default for variant is 'indeterminate'
, that's why I returned true
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.
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.
I reverted this as it was before, but now that we do not have variant select, this will always be hidden, maybe it's better to just show it always (return true
)?
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.
Why do we need to change it? Let's say we solve the variant issue, it seems that we will want to keep the same logic.
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.
I tried adding @ts-ignore, as well as casting the props as any but anyway the build was failing: https://app.circleci.com/pipelines/github/mui-org/material-ui/16727/workflows/124e27b3-cad3-4e12-b186-301c2e423caa/jobs/169125 :\
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.
Locally yarn workspace framer build
is failing for me:
$ cross-env BABEL_ENV=test babel-node --config-file ../babel.config.js ./scripts/buildFramer.js ../packages/material-ui-styles/src ./Material-UI.framerfx/code
$ prettier --write --config ../prettier.config.js './**/*.{js,tsx}'
[error] No files matching the pattern were found: "'./**/*.{js,tsx}'".
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 2
Command: C:\Program Files\nodejs\node.exe
Arguments: D:\workspace\material-ui\.yarn\releases\yarn-1.22.4.js build
Directory: D:\workspace\material-ui\framer
Output:
info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
Any idea how we can fix this?
I wonder if a different variant make sense for the circular progress. What about we skip it? |
It seems that if we want to make the variant work, we would need to isolate the current variant, to the new ones with two different props. It seems that "determinate" vs "indeterminate" is a different concern to the different styles the component might receive. |
Ok, let's skip it for now, we can come back to this one once we decide on the API for the different variants |
One of #21749