-
-
Notifications
You must be signed in to change notification settings - Fork 8.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
fix : hide checkbox in upload modal by default #22093
fix : hide checkbox in upload modal by default #22093
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…ukulpadwal/strapi into fix/hide-checkbox-upload-modal
Hey @mukulpadwal thank you for another contribution 🔥 👏 we'll take a look asap |
@mukulpadwal all good on the design side, thanks! |
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.
Looks good to me, tested locally
@mukulpadwal thanks for the contribution. Just a heads up your commits have these spaces that I think are making the commitlint unhappy
I will fix it when I squash and merge the PR |
@mukulpadwal It looks like your changes had an impact on the FE unit tests. Could you please update them? https://github.com/strapi/strapi/actions/runs/12141762514/job/33898382420?pr=22093 |
…ukulpadwal/strapi into fix/hide-checkbox-upload-modal
Hi @mukulpadwal just a ping in case you didn't see my last comment, could you update the unit tests 🙏 ? |
Hi @markkaylor , Apologies for the delay in responding; I might have missed your last comment. I've updated the test cases as per your request. Please take a look, and let me know if there’s anything else you need or if any further changes are required. Thanks! 😊 |
…ukulpadwal/strapi into fix/hide-checkbox-upload-modal
@mukulpadwal there is still just one snapshot failing in a unit test 🤦♂️. You should just need to run this to fix it 🙏
|
Hi, @markkaylor Yes working on it. Will test thoroughly this time locally before pushing new changes. 🫡 |
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.
tested again locally
@mukulpadwal thanks again for the contribution, see y'a on the next one ✌️ |
What does it do?
This change addresses the unintended display of
checkboxes
in the upload modal by setting theisSelectable
prop in theAssetCardBase
component tofalse
by default. Previously,isSelectable
was set totrue
, which led to checkboxes being shown alongside each asset even though users could not select them.To resolve this, I updated the
default value
of theisSelectable
property in theAssetCardBase
component tofalse
. With this change, the checkbox only appears when isSelectable is explicitly set to true, allowing the upload modal to display assets without checkboxes by default.This ensures that assets in the upload modal are listed solely for preview, not selection, resulting in a cleaner and more intuitive user experience.
Why is it needed?
The checkbox is currently shown for assets listed in the upload modal, despite the fact that these assets are not selectable. This can create confusion for users, as it implies that they can select or deselect assets in this context. By hiding the checkbox, we clarify the purpose of the modal and improve the user experience.
How to test it?
A demo video showing the expected behavior after this fix has also been uploaded with this pull request for reference.
FIX VIDEO
Related issue(s)/PR(s)
This PR addresses #22083 by hiding the checkbox in the upload modal where asset selection is not applicable.