-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Plans: add support for client-side currency formatting #6046
Merged
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
763e2ce
Plans: add currency-formatter, simplify data needs of plan-features-h…
gwwar 4649fce
Plans: add tests for plan-features-header prices
gwwar 6489445
Plans: add currency examples for plan-features
gwwar 6627cf9
Plans: override currency formatter thousands separator
gwwar 7f770d7
Plans: export class, and use identity as translate fallback
gwwar cbba94c
Plans: split out price component from plans feature header
gwwar 3d7e4b2
Plans: remove currency-formatter lib, simplify price component
gwwar 33b2463
Plans: update test to use inlined data
gwwar 7d99dde
Plans: multi-line destructure
gwwar 03f0765
Plans: remove credits
gwwar 15da89c
Plans: tweak readme
gwwar cc26f9e
Plans: fix ternary spacing
gwwar d39f5bb
Plans: remove unneeded export
gwwar 3b5a6b6
Plans: fix getPlanRawPrice when price is zero
gwwar 515c222
Plans: rename currency-formatter variables and update signature
gwwar 77cbba5
Plans: remove translate default
gwwar 9bdcc45
Plans: update plan selector
gwwar 96155c8
Plans: rename lib from currency-formatter to format-currency
gwwar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, this looks rather strange and complicated. I liked your previous solution better. It was more readable. But that's just my opinion and this is a minor detail. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think an existential operator would read better, but it basically boils down to fetch plan.raw_price if possible, otherwise default to -1.
https://lodash.com/docs#get
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. My point is that a programmer who didn't read the lodash docs or is not super familiar with
get
won't be able to parse this line quickly. Or to phrase it differently: I did not understand it at first sight, only after going through the lodash docs. :)