-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feat(mui): add circular progress to <Show> #5710
Conversation
|
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.
Hey @issa012 thanks for the PR!
It seems we have conflicts, let's fix them and address review comments.
@@ -219,7 +221,19 @@ export const Show: React.FC<ShowProps> = ({ | |||
} | |||
{...(headerProps ?? {})} | |||
/> | |||
<CardContent {...(contentProps ?? {})}>{children}</CardContent> | |||
<CardContent {...(contentProps ?? {})}> |
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.
Let's add tests covering these changes.
sx={{ | ||
position: "absolute", | ||
zIndex: (theme) => theme.zIndex.drawer + 1, | ||
bgcolor: "rgba(255, 255, 255, 0.38)", |
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.
Not sure if the hardcoded color is appropriate here. I think it's best to use the current theme to decide bgColor
. We can do theme.palette.background.paper
(I think this is what the <Card />
use) and use the alpha
method from @mui/material/styles
to adjust the opacity. This way we don't have to worry about light/dark schemes I guess 🤔
Can we try to make this change @issa012? It would be great if you can update this line and test it 🙏
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 tested it. Now it is the same color as in component in light and dark modes. I used theme.palette.action.disabledOpacity. Thanks a lot for reviews!
Hello @aliemir . What tests should I add for this change? Similar Antd component does not have any tests regarding the loading state. Should I update the documentation? |
PR Checklist
Please check if your PR fulfills the following requirements:
Bugs / Features
What is the current behavior?
in MUI doesn't show loading spinner
What is the new behavior?
Added loading spinner.
fixes #5668
Notes for reviewers
Hello. This is my first PR ever. I have added the along with to render a loading spinner. Should I add the possibility to pass props to these components?
Also, what color should they be?