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] Port component #4757

Closed
5 of 6 tasks
nathanmarks opened this issue Jul 20, 2016 · 15 comments
Closed
5 of 6 tasks

[CircularProgress] Port component #4757

nathanmarks opened this issue Jul 20, 2016 · 15 comments
Labels
component: CircularProgress The React component component: progress This is the name of the generic UI component, not the React module!

Comments

@nathanmarks
Copy link
Member

nathanmarks commented Jul 20, 2016

@nathanmarks nathanmarks added this to the 0.16.0 Release milestone Jul 20, 2016
@nathanmarks nathanmarks self-assigned this Jul 20, 2016
@mbrookes
Copy link
Member

There are a few open CircularProgress PRs, but this stands out as worth trying to tackle when migrating: #707

@nathanmarks
Copy link
Member Author

@mbrookes thanks, 100%!!!

@nathanmarks
Copy link
Member Author

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?

@mbrookes
Copy link
Member

I guess it will depend on how cumbersome it becomes... thickness isn't in a released version yet, so worst case if we had to drop it, it wouldn't be completely the end of the world.

@nathanmarks nathanmarks removed their assignment Jul 24, 2016
@oliviertassinari oliviertassinari self-assigned this Jul 24, 2016
@turnerniles
Copy link

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?

@oliviertassinari
Copy link
Member

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

@turnerniles
Copy link

@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:
https://material.angularjs.org/latest/api/directive/mdProgressCircular

What do you think?

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 12, 2016

@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 X ms for at least Y ms. That logic would be better off in another module, as has nothing to do with the rendered component.
Any light?

@nathanmarks
Copy link
Member Author

nathanmarks commented Aug 12, 2016

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.

@turnerniles
Copy link

@oliviertassinari, @nathanmarks ok, makes sense

@slavab89
Copy link
Contributor

Regarding the thickness prop that's currently just a const.
It should be possible to achieve that using jss function-values. However i didnt find a way to access that update method when using jss-theme-reactor, or the ability to use dynamic-rules.

@oliviertassinari
Copy link
Member

@slavab89 I think that we have to upgrade jss first.

@mbrookes
Copy link
Member

That could be useful in a few places we've had to revert to inline styles for dynamic behaviour.

@hoschi
Copy link

hoschi commented Jul 4, 2017

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

@oliviertassinari
Copy link
Member

I'm closing, let's fix #5524 aside

@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

No branches or pull requests

6 participants