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

[CircularProgress] Custom variant #22174

Closed

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova commented Aug 13, 2020

One of #21749

@@ -42,12 +40,7 @@ addPropertyControls(CircularProgress, {
type: ControlType.Number,
title: 'Value',
hidden: function hidden(props) {
return props.variant === 'indeterminate';
return true;
Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure, notice how the value widget is gone when the variant is changed:

Capture d’écran 2020-08-13 à 15 27 31

Capture d’écran 2020-08-13 à 15 27 38

Copy link
Member Author

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)?

Copy link
Member

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.

Copy link
Member Author

@mnajdova mnajdova Aug 14, 2020

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 :\

Copy link
Member Author

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?

@mui-pr-bot
Copy link

mui-pr-bot commented Aug 13, 2020

Details of bundle changes

Generated by 🚫 dangerJS against d1c481b

@oliviertassinari oliviertassinari added the component: CircularProgress The React component label Aug 13, 2020
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Aug 14, 2020
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Aug 14, 2020
@oliviertassinari
Copy link
Member

I wonder if a different variant make sense for the circular progress. What about we skip it?

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 14, 2020

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.

@mnajdova
Copy link
Member Author

Ok, let's skip it for now, we can come back to this one once we decide on the API for the different variants

@mnajdova mnajdova closed this Aug 14, 2020
@oliviertassinari oliviertassinari added the component: progress This is the name of the generic UI component, not the React module! label Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: CircularProgress The React component component: progress This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants