twenty
twenty copied to clipboard
[wip] Improve currency field
wip #4127
Hello @anoopw3bdev,
Thanks a lot for your contribution, do you need guidance or help to finish it ?
Hey @magrinj I was little occupied with work after this draft PR.
I think some of the files mentioned in the issue is not exist in codebase/ renamed already. I will resume the work probably by tomorrow, will definitely reach out if I need help.
@anoopw3bdev Hi, you can pick up from here, I renamed amoutFormat to formatAmount. Could you please have a unique function for formatting and another that just uses the first one and prepends the currency unit ?
~~Hi @lucasbordeau I have some confusion about your ask here "have a unique function for formatting and another that just uses the first one and prepends the currency unit". Could you please confirm if we are currently following this approach?~~
@anoopw3bdev It's ok for me, should you proceed with the other points in the original issue ?
Yes @lucasbordeau I am working on it.
Can we ignore the point 4 in the original issue now? because RecordBoardDeprecatedColumnHeader and recordBoardColumnTotalsFamilySelector have already renamed/ removed from the codebase. Sorry I took more time on this one.
I will work on remaining points (3 and 5) of the issue now.
@anoopw3bdev Sure !
Hi @lucasbordeau currently we are rendering the icon inside the currency field from CurrencyDisplay component, do we still need to pass down a currency type to formatCurrency (previously formatAmount) function to return the currency icon? And remove the logic to render the icon from CurrencyDisplay to formatCurrency?
That's ok like that, let's keep UI related things separate from the utils for now.
@anoopw3bdev I'm going to close this PR for now to keep the history clean. We are still interested in the feature, feel free to re-open it and we will review it!