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

[COM-28756]: update scarcity #45

Merged
merged 2 commits into from
Jul 31, 2023
Merged

Conversation

sizhang12
Copy link
Collaborator

Updating scarcity to include rendering the total scarcity amount when scarcityShownByDefault is true but also rendering the scarcity with attributes after.

If scarcityShownByDefault is true, then that means the first index of scarcityTemplateViews is the total stock. Everything after that are by variants with attributes.

@sizhang12 sizhang12 requested a review from phensley as a code owner July 28, 2023 19:58
<div class="product-scarcity" data-variant-attributes="{&quot;Color&quot;:&quot;Red&quot;}" hidden>
Only 3 left!
</div>
<div class="product-scarcity" data-variant-attributes="{&quot;Color&quot;:&quot;Red&quot;}" hidden>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure why spacing matters. Some tests are failing and I am not sure why. There might be extra spacing or invisible character I am missing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The language is whitespace-sensitive, so the output needs to match whitespace as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phensley I am not sure what I'm missing here. Appreciate any help with this!

Screen Shot 2023-07-31 at 10 56 46 AM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sizhang12 I'll take a look shortly

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phensley thank you! I will be making the same changes into template-engine as well.

@phensley
Copy link
Contributor

@sizhang12 Please update the commit message to include the full description of the change.

@phensley phensley force-pushed the om/COM-28756-product-scarcity-update branch from d2d95a6 to daae93e Compare July 31, 2023 16:38
@phensley phensley merged commit 458f5bd into main Jul 31, 2023
1 check passed
@phensley
Copy link
Contributor

This change is released in version 2.8.42 which should hit Maven Central in 15-20 minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants