-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Show "Unavailable" status for products with a future Available On
date
#5734
Show "Unavailable" status for products with a future Available On
date
#5734
Conversation
Currently if a product has the `available_on` date in the future, it will still show a status of Available, even though it is not available for purchase on the store. This change proposes a new status of `Unavailable` for scheduled products. Co-authored-by: Harmony Bouvier <[email protected]>
This change fixes an issue where certain browsers (namely Firefox) will not render the date field correctly when it contains the full date and time format as the value. This change just truncates the available_on and discontinue_on values to match the precision expected, rather switch to the datetime-local input which is not fully supported in all browsers, but also maintains the old admin behaviour. Co-authored-by: Andrew Stewart <[email protected]>
69504bd
to
1fdb686
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5734 +/- ##
=======================================
Coverage 88.84% 88.84%
=======================================
Files 704 704
Lines 16762 16764 +2
=======================================
+ Hits 14892 14894 +2
Misses 1870 1870 ☔ View full report in Codecov by Sentry. |
Amazing. Thanks |
This is actually a bug fix. I would like to back port this to 3.4 @kennyadsl wdyt? |
@tvdeyen I'm good with that, please add the appropriate tags. 🙏 |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
Summary
This change addresses two issues in the new Solidus admin
Available
status - this is resolved by adding a new status asUnavailable
, but I am open to suggestions on this. The issue is that currently products with a futureAvailable On
date still show asAvailable
which is misleading.Field
UI component - This resolves an issue where the values passed to theField
component contained the full date and time, which is not valid given we're using an input of typedate
. This change ensures that the date is formatted correctly before being passed to the component.Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: