Skip to content

Conversation

@frehner
Copy link
Contributor

@frehner frehner commented May 5, 2022

Description

Closes #1164

Additional context

I figured that since useMoney really is the source of truth for <Money />, then it also makes sense to add these options to the useMoney hook.

Tests for both were updated.

Pinging @mcvinci for docs feedback.


Before submitting the PR, please make sure you do the following:

  • Read the Contributing Guidelines
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123)
  • Update docs in this repository according to your change
  • Run yarn changeset add if this PR cause a version bump based on Keep a Changelog and adheres to Semantic Versioning

@frehner frehner requested a review from a team May 5, 2022 23:11
Copy link
Contributor

@mcvinci mcvinci left a comment

Choose a reason for hiding this comment

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

Thanks so much, @frehner! Just added a few minor suggestions for the docs. 🚀

Base automatically changed from 2022-07 to v1.x-2022-07 May 6, 2022 14:50
@frehner frehner requested review from a team and removed request for a team May 6, 2022 16:12
@frehner frehner merged commit a0ed7c0 into v1.x-2022-07 May 6, 2022
@frehner frehner deleted the money-updates branch May 6, 2022 21:50
<Money data={money} withoutTrailingZeros />
);

expect(component).not.toContainReactText(`€${money.amount}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just hard code the 19.00 here.

expect(component).toContainReactComponent(Link, {to: '/test'});
});

it(`removes trailing zeros when the prop is passed`, () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I know it is verbose, but I suggest specifying the prop (ie: when the withoutTrailingZeros prop is passed)

blittle added a commit that referenced this pull request May 9, 2022
* v1.x-2022-07:
  Fix stale product options (#1210)
  Upgrade body-parser in hydrogen package (#1232)
  Add new options to Money and useMoney (#1215)
  fix links (#1229)
  Update turbo and instructions for developing `dev` (#1225)
  Heck - deploy all branches to Oxygen
  add context for initialvariantid (#1217)
  Build chunks are inside assets folder (#1211)
  Upgraded to SFAPI 2022-07 (#1214)
  [ci] release v1.x-2022-07 (#1205)
  Make this a patch instead of minor
  add references to video in file_reference block (#1197)
  Laying the foundation for building components in isolation (#1188)
  Make metafields optional within the ProductProvider. Fixes #1127 (#1209)
  Add README to /templates directory (#1163)
  fix perf tracking and make it optional from developer's end (#1096)
  docs fixes (#1204)
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.

Update <Money> for parity with Liquid Money filters

3 participants