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

[EmptyState] Shopify Polaris EmptyState image opacity is always set to 0!!!!!! #13197

Open
shazzadParselab opened this issue Feb 12, 2025 · 4 comments
Labels
Bug Something is broken and not working as intended in the system. untriaged

Comments

@shazzadParselab
Copy link

shazzadParselab commented Feb 12, 2025

Summary

[EmptyState] The Shopify Polaris EmptyState image opacity is always set to 0! When I change it to 1, the image becomes visible

Create a css

polarise css look like---->

.Polaris-EmptyState__Image {
opacity: 0;
z-index: var(--p-z-index-1);
transition: opacity var(--p-motion-duration-150) var(--p-motion-ease);
}

when I change it --->
.Polaris-EmptyState__Image {
opacity: 1 !important;
}
image becomes visible.

image appears and works correctly

<EmptyState
heading="No orders yet"
image="https://cdn.shopify.com/s/files/1/0533/2089/files/empty-state.svg"

{/* Force opacity 1 if needed */} > <style> {`.Polaris-EmptyState__Image { opacity: 1 !important; }`} </style>
@shazzadParselab shazzadParselab added Bug Something is broken and not working as intended in the system. untriaged labels Feb 12, 2025
@eibrahimov
Copy link

I have some issues with Empty-state image opacity

@shazzadParselab
Copy link
Author

shazzadParselab commented Mar 5, 2025 via email

@shazzadParselab
Copy link
Author

shazzadParselab commented Mar 5, 2025 via email

@gordonchanhk
Copy link

The Empty State image is intended to have opacity:0, it has another CSS class Polaris-EmptyState--loaded to make it become visible.
However, it seems there is buggy issue that, when visiting a page by navigation, image load as usual. But if you stay on a page with Empty State, the image would appear due to the missing of such CSS class Polaris-EmptyState--loaded:

ref: https://community.shopify.com/c/shopify-apps/shopify-app-development-with-remix-and-polaris-empty-state-image/m-p/2974517/highlight/true#M90531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken and not working as intended in the system. untriaged
Projects
None yet
Development

No branches or pull requests

3 participants