marigold-ui / marigold

Design System based on react-aria and Tailwind CSS
https://marigold-ui.io
MIT License
101 stars 7 forks source link

[DST-259]: Adding Helpers for percentage, date and currency #3596

Closed OsamaAbdellateef closed 4 months ago

OsamaAbdellateef commented 4 months ago

Creating helpers for currency , percentage & date with an option to have them in equal digit width

changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: 12f8fe5e043d9b9d01340636614945f6b251283d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages | Name | Type | | -------------------------- | ----- | | @marigold/components | Minor | | @marigold/system | Minor | | @marigold/storybook-config | Patch | | @marigold/docs | Minor | | @marigold/theme-b2b | Patch | | @marigold/theme-core | Patch | | @marigold/icons | Patch | | @marigold/theme-preset | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marigold-docs ✅ Ready (Inspect) Visit Preview 💬 1 unresolved
✅ 1 resolved
Jan 15, 2024 3:39pm
marigold-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 15, 2024 3:39pm
1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **marigold-production** | ⬜️ Ignored ([Inspect](https://vercel.com/marigold/marigold-production/2wiYuCNfHvSFcLnnSPSE3PHiFn3Q)) | [Visit Preview](https://marigold-production-git-formatters-marigold.vercel.app) | | Jan 15, 2024 3:39pm |
codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (b511dbd) 99.82% compared to head (72cf836) 99.83%. Report is 9 commits behind head on main.

:exclamation: Current head 72cf836 differs from pull request most recent head 12f8fe5. Consider uploading reports for the commit 12f8fe5 to get more accurate results

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/marigold-ui/marigold/pull/3596/graphs/tree.svg?width=650&height=150&src=pr&token=YIIcKX7TZu&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marigold-ui)](https://app.codecov.io/gh/marigold-ui/marigold/pull/3596?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marigold-ui) ```diff @@ Coverage Diff @@ ## main #3596 +/- ## ========================================== + Coverage 99.82% 99.83% +0.01% ========================================== Files 117 118 +1 Lines 6287 6241 -46 Branches 297 291 -6 ========================================== - Hits 6276 6231 -45 + Misses 10 9 -1 Partials 1 1 ``` | [Files](https://app.codecov.io/gh/marigold-ui/marigold/pull/3596?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marigold-ui) | Coverage Δ | | |---|---|---| | [packages/components/src/Table/Table.tsx](https://app.codecov.io/gh/marigold-ui/marigold/pull/3596?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marigold-ui#diff-cGFja2FnZXMvY29tcG9uZW50cy9zcmMvVGFibGUvVGFibGUudHN4) | `100.00% <100.00%> (ø)` | | | [packages/components/src/Table/TableCell.tsx](https://app.codecov.io/gh/marigold-ui/marigold/pull/3596?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marigold-ui#diff-cGFja2FnZXMvY29tcG9uZW50cy9zcmMvVGFibGUvVGFibGVDZWxsLnRzeA==) | `100.00% <100.00%> (ø)` | | | [...ackages/components/src/Table/TableCheckboxCell.tsx](https://app.codecov.io/gh/marigold-ui/marigold/pull/3596?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marigold-ui#diff-cGFja2FnZXMvY29tcG9uZW50cy9zcmMvVGFibGUvVGFibGVDaGVja2JveENlbGwudHN4) | `100.00% <100.00%> (ø)` | | | [...ackages/components/src/Table/TableColumnHeader.tsx](https://app.codecov.io/gh/marigold-ui/marigold/pull/3596?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marigold-ui#diff-cGFja2FnZXMvY29tcG9uZW50cy9zcmMvVGFibGUvVGFibGVDb2x1bW5IZWFkZXIudHN4) | `100.00% <100.00%> (ø)` | | | [...es/system/src/components/Formatters/DateFormat.tsx](https://app.codecov.io/gh/marigold-ui/marigold/pull/3596?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marigold-ui#diff-cGFja2FnZXMvc3lzdGVtL3NyYy9jb21wb25lbnRzL0Zvcm1hdHRlcnMvRGF0ZUZvcm1hdC50c3g=) | `100.00% <100.00%> (ø)` | | | [...system/src/components/Formatters/NumericFormat.tsx](https://app.codecov.io/gh/marigold-ui/marigold/pull/3596?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marigold-ui#diff-cGFja2FnZXMvc3lzdGVtL3NyYy9jb21wb25lbnRzL0Zvcm1hdHRlcnMvTnVtZXJpY0Zvcm1hdC50c3g=) | `100.00% <100.00%> (ø)` | | ... and [10 files with indirect coverage changes](https://app.codecov.io/gh/marigold-ui/marigold/pull/3596/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=marigold-ui)
sebald commented 4 months ago

@OsamaAbdellateef needs docs! :)

OsamaAbdellateef commented 4 months ago

i am thinking about why don't we collect Percentage, Currency and Numeric in on single component and we can call it Formatter, because from what you see , they the same a little bit, the only diff is style, or should we keep them as it is because it is more expressive and makes it clear and reusable @sebald @sarahgm

sebald commented 4 months ago

i am thinking about why don't we collect Percentage, Currency and Numeric in on single component and we can call it Formatter, because from what you see , they the same a little bit, the only diff is style, or should we keep them as it is because it is more expressive and makes it clear and reusable @sebald @sarahgm

I really like the idea! Then we can also make one page for all the formatting

sarahgm commented 4 months ago

i am thinking about why don't we collect Percentage, Currency and Numeric in on single component and we can call it Formatter, because from what you see , they the same a little bit, the only diff is style, or should we keep them as it is because it is more expressive and makes it clear and reusable @sebald @sarahgm

I really like the idea! Then we can also make one page for all the formatting

I agree :)

OsamaAbdellateef commented 4 months ago

i am thinking about why don't we collect Percentage, Currency and Numeric in on single component and we can call it Formatter, because from what you see , they the same a little bit, the only diff is style, or should we keep them as it is because it is more expressive and makes it clear and reusable @sebald @sarahgm

I really like the idea! Then we can also make one page for all the formatting

yesss ofc :heavy_check_mark:

sebald commented 4 months ago

@OsamaAbdellateef maybe the component then goes under "content"?

sebald commented 4 months ago

i am thinking about why don't we collect Percentage, Currency and Numeric in on single component and we can call it Formatter, because from what you see , they the same a little bit, the only diff is style, or should we keep them as it is because it is more expressive and makes it clear and reusable @sebald @sarahgm

I really like the idea! Then we can also make one page for all the formatting

yesss ofc ✔️

Reviewed the PR. I thought we move it to a single component like we did with Table (Table.Row, etc). But this is also fine :)

CC @sarahgm

sarahgm commented 4 months ago

@OsamaAbdellateef conflicts

OsamaAbdellateef commented 4 months ago

@OsamaAbdellateef conflicts

resolved :heavy_check_mark: