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

Formatting Pipes: Make amount pipes amountServiceConfiguration optional #3789

Merged
merged 2 commits into from
Feb 26, 2025

Conversation

cpoulsen
Copy link
Collaborator

@cpoulsen cpoulsen commented Feb 13, 2025

What is the new behavior?

The pipe can now be used like this {{ myAmount | amount }} instead of {{ myAmount | amount: { showCurrencyCode: '' } }}.

Does this PR introduce a breaking change?

  • Yes
  • No

The method signature of AmountService.formatAmount() has changed, from

formatAmount(
  amount: Amount,
  amountServiceConfiguration: AmountServiceConfiguration,
  locale: string,
  nativeCurrency: string
)

to

formatAmount(
  amount: Amount,
  locale: string,
  nativeCurrency: string,
  amountServiceConfiguration?: AmountServiceConfiguration
)

Are there any additional context?

Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Reminders

  • Make sure you have implemented tests following the guidelines in: "The good: Test".
  • Make sure you have updated the cookbook with examples and showcases (for bug fixes, enhancements & new components).

Review

  • Determine if your changes are a fix, feature or breaking-change, and add the matching label to your PR. If it is tooling, dependency updates or similar, add ignore-for-release.
  • Do a self-review.
  • Request that the changes are code-reviewed
  • Request that the changes are UX reviewed (only necessary if your PR introduces visual changes)

When the pull request has been approved it will be merged to develop by Team Kirby.

@RasmusKjeldgaard RasmusKjeldgaard added the breaking-change Add this PR to the changelog as a breaking change label Feb 18, 2025
@RasmusKjeldgaard RasmusKjeldgaard changed the title Make amount configuration optional Formatting Pipes: Make amounts amountConfiguration optional Feb 18, 2025
@RasmusKjeldgaard RasmusKjeldgaard changed the title Formatting Pipes: Make amounts amountConfiguration optional Formatting Pipes: Make amount pipes amountServiceConfiguration optional Feb 18, 2025
@RasmusKjeldgaard RasmusKjeldgaard marked this pull request as ready for review February 26, 2025 08:46
@RasmusKjeldgaard RasmusKjeldgaard enabled auto-merge (squash) February 26, 2025 08:46
@RasmusKjeldgaard RasmusKjeldgaard merged commit 4e32616 into develop Feb 26, 2025
8 of 9 checks passed
@RasmusKjeldgaard RasmusKjeldgaard deleted the feat/amount-pipe-optional-config branch February 26, 2025 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Add this PR to the changelog as a breaking change
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants