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

fix: (CXSPA-7997) - Change "QTY" into "Quantity" #19339

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

petarmarkov9449
Copy link
Contributor

Ticket: CXSPA-7997

Change "QTY" into "Quantity"

@petarmarkov9449 petarmarkov9449 requested a review from a team as a code owner October 4, 2024 14:17
@github-actions github-actions bot marked this pull request as draft October 4, 2024 14:17
@petarmarkov9449 petarmarkov9449 marked this pull request as ready for review October 4, 2024 14:55
Copy link

cypress bot commented Oct 4, 2024

spartacus    Run #45451

Run Properties:  status check passed Passed #45451  •  git commit 0868fc2f9d ℹ️: Merge 097c934d3c1eab018598aa5af6e300cf97a55c52 into c42053bf68bd6fcec3c819cd2f53...
Project spartacus
Branch Review feature/CXSPA-7997
Run status status check passed Passed #45451
Run duration 04m 18s
Commit git commit 0868fc2f9d ℹ️: Merge 097c934d3c1eab018598aa5af6e300cf97a55c52 into c42053bf68bd6fcec3c819cd2f53...
Committer petarmarkov9449
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 4
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 125
View all changes introduced in this branch ↗︎

Pio-Bar
Pio-Bar previously approved these changes Oct 7, 2024
@@ -9,7 +9,7 @@
"description": "Description",
"item": "Item",
"itemPrice": "Item price",
"quantity": "Qty",
"quantity": "Quantity",
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be careful about changing or removing properties already in use due to breaking changes (even translations).

Lets create a new property for "Quantity" to avoid making the breaking change and hide any use of the translation behind a feature toggle. You can do this in either the template or the service. It is similar to how you have already done with styles.

In template example:

// feature off
<ng-container *cxFeature="'!a11yQTY2Quantity'">
// show old content or translation
...
// feature on
<ng-container *cxFeature="'a11yQTY2Quantity'">
// show new

In service:

someMethod() {
  ...
  if( this.featureConfigService.isEnabled('a11yQTY2Quantity') {
    // Do something when feature flag is enabled
  }
  ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated it.

@github-actions github-actions bot marked this pull request as draft October 9, 2024 09:42
@petarmarkov9449 petarmarkov9449 marked this pull request as ready for review October 9, 2024 10:07
Zeyber
Zeyber previously approved these changes Oct 10, 2024
@developpeurweb
Copy link
Contributor

Hey @petarmarkov9449, I still see "Qty", can you please make sure the Feature Flag is enabled. Thanks!

@petarmarkov9449 petarmarkov9449 marked this pull request as ready for review October 17, 2024 12:55
{{ 'cartItems.quantityFull' | cxTranslate }}
</div>
<div
*cxFeature=""
Copy link
Contributor

Choose a reason for hiding this comment

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

Feature flag name is missing here ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated it.

Comment on lines 69 to 72
"quantityFull": "Quantity",
"itemPrice": "Item price",
"qty": "Qty",
"qtyFull": "Quantity",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need copies of the same string?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated it.

@github-actions github-actions bot marked this pull request as draft October 22, 2024 11:49
@petarmarkov9449 petarmarkov9449 marked this pull request as ready for review October 22, 2024 12:25
{{ 'savedCartList.quantityFull' | cxTranslate }}
</th>
<th
*cxFeature="'a11yQTY2Quantity'"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
*cxFeature="'a11yQTY2Quantity'"
*cxFeature="'!a11yQTY2Quantity'"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, there was a typo. ;)
I've just fixed it.

@github-actions github-actions bot marked this pull request as draft October 23, 2024 09:25
@petarmarkov9449 petarmarkov9449 marked this pull request as ready for review October 23, 2024 10:29
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.

4 participants