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

Add availability-with-info type to the cl-availability-status component #72

Merged
merged 6 commits into from
Jul 4, 2024

Conversation

marcomontalbano
Copy link
Member

@marcomontalbano marcomontalbano commented Jul 2, 2024

What I did

The availability message for products without delivery lead times was broken as below:

Broken availability message


We added the new type availability-with-info to the cl-availability-status component. This will render the inner content only when the product is available and there're availability information.

How to test

  <cl-availability code="5PANECAP000000FFFFFFXXXX">
    <cl-availability-status type="available" style="color: green;">available<br /></cl-availability-status>
-   <cl-availability-status type="available">
+   <cl-availability-status type="available-with-info">
      ready to be shipped in
      <cl-availability-info type="min-days"></cl-availability-info>
      -
      <cl-availability-info type="max-days"></cl-availability-info>
      days
    </cl-availability-status>
    <cl-availability-status type="unavailable" style="color: red;">out of stock</cl-availability-status>
  </cl-availability>

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests).
  • Make sure to add/update documentation regarding your changes.
  • You are NOT deprecating/removing a feature.

Copy link

netlify bot commented Jul 2, 2024

Deploy Preview for commercelayer-drop-in-js ready!

Name Link
🔨 Latest commit edbe4b0
🔍 Latest deploy log https://app.netlify.com/sites/commercelayer-drop-in-js/deploys/66856a00d6805400082af746
😎 Deploy Preview https://deploy-preview-72--commercelayer-drop-in-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@marcomontalbano marcomontalbano changed the title chore: add 'do-not-ship' example Manage cl-availability-status and cl-availability-info when do_not_ship Jul 2, 2024
@marcomontalbano marcomontalbano added the enhancement New feature or request label Jul 3, 2024
@marcomontalbano marcomontalbano self-assigned this Jul 3, 2024
@marcomontalbano marcomontalbano changed the title Manage cl-availability-status and cl-availability-info when do_not_ship Add availability-with-info to the cl-availability-status component Jul 3, 2024
@marcomontalbano marcomontalbano changed the title Add availability-with-info to the cl-availability-status component Add availability-with-info type to the cl-availability-status component Jul 3, 2024
@marcomontalbano marcomontalbano added bug Something isn't working and removed enhancement New feature or request labels Jul 3, 2024
@marcomontalbano marcomontalbano marked this pull request as ready for review July 3, 2024 15:44
@marcomontalbano marcomontalbano merged commit 829fef4 into main Jul 4, 2024
6 checks passed
@marcomontalbano marcomontalbano deleted the fix-do-not-ship branch July 4, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants