-
-
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] Port component #4757
Comments
There are a few open CircularProgress PRs, but this stands out as worth trying to tackle when migrating: #707 |
@mbrookes thanks, 100%!!! |
I've managed to reproduce this component with keyframes, maintaining all flexibility except thickness. FFS. I have an idea for thickness -- but it would involve creating multiple sets of keyframes (for each thickness). Any opinions? |
I guess it will depend on how cumbersome it becomes... |
Would it be possible to add a "loaded" prop to the progress components such that when loaded is false the progress component shows and loaded is true the progress component hides? |
@turnerniles What the advantage of having this logic in the component instead of in userland? What you described seems pretty common to every component. Wouldn't it be better to use composition. Does it involve a transition? |
@oliviertassinari I think it is specifically applicable to the linear and circular progress components since anyone who is using a progress component will most likely want to hide or remove the component once a load is complete. Yes it is easily done in composition; however it would be convenient to have the logic in the component. In the angular material progress component there is the attribute ng-disabled which hides the component when true: What do you think? |
@turnerniles Sounds like what you proposed is to allow the following pattern: <CircularProgress opened={opened} /> Instead of the following one opened && <CircularProgress /> I can't see any advantage here. Actually, you probably want some more logic. E.g. Displaying the loader after |
Yeah, I don't think that having an opened/loading state is a good idea, it is unnecessary given the simplicity of implementing it in userland. It's also not uncommon to have a lot more than just the loader hiding/showing when the loading state in your app changes, so I don't see a huge benefit anyways. |
@oliviertassinari, @nathanmarks ok, makes sense |
Regarding the thickness prop that's currently just a const. |
@slavab89 I think that we have to upgrade jss first. |
That could be useful in a few places we've had to revert to inline styles for dynamic behaviour. |
CircularProcess is in the docs page of current alpha docs https://material-ui-1dab0.firebaseapp.com/component-demos/progress Probably "Component", "Docs", "Demo" can be checked |
I'm closing, let's fix #5524 aside |
The text was updated successfully, but these errors were encountered: