feat: introduce exporting CSV module
This PR is about introducing exportAsCSV func (#2456) and minor bug fix
Feature
- Create the
exportAsCSVfunction- I didn't use any other libraries to avoid increasing the size of the package, as it's a simple behavior that just needs to be extracted to CSV.
- property
columns (string<array>): The title of each column in the CSV file.content (string<array>): The data from the CSV file, divided by the length of the columns, which must be the same order as columns.filename (string)The name of the CSV file. Do not include the extension.
BugFix
- Fixed an issue where changing table columns in
userResourcePolicyListandprojectResourcePolicyListwas not possible because the key of the column was not given.
Checklist: (if applicable)
- [ ] Mention to the original issue
- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after
Your org requires the Graphite merge queue for merging into main
Add the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix.
You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @ironAiken2 and the rest of your teammates on
Graphite
Coverage report for ./react
St.:grey_question: |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 2.63% (-0.02% 🔻) |
143/5430 |
| 🔴 | Branches | 2.81% (-0.05% 🔻) |
101/3593 |
| 🔴 | Functions | 1.51% (-0.02% 🔻) |
27/1792 |
| 🔴 | Lines | 2.52% (-0.02% 🔻) |
134/5321 |
Show files with reduced coverage 🔻
St.:grey_question: |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| 🔴 | helper/index.tsx | 50.32% (-2.78% 🔻) |
45.83% (-1.31% 🔻) |
38.89% (-2.29% 🔻) |
51.49% (-3.35% 🔻) |
Test suite run success
51 tests passing in 5 suites.
Report generated by 🧪jest coverage report action from d4b38701596adee1b2d9a9d7e2b6935c49dbc975
Coverage report for ./react
St.:grey_question: |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 3.13% (-0% 🔻) |
180/5751 |
| 🔴 | Branches | 3.2% (-0.03% 🔻) |
123/3841 |
| 🔴 | Functions | 1.89% (-0.03% 🔻) |
36/1903 |
| 🔴 | Lines | 3% (-0% 🔻) |
169/5634 |
Show files with reduced coverage 🔻
St.:grey_question: |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| 🔴 | helper/index.tsx | 45.61% (-6.8% 🔻) |
43.92% (-2.51% 🔻) |
33.33% (-6.67% 🔻) |
46% (-8.03% 🔻) |
Test suite run success
64 tests passing in 6 suites.
Report generated by 🧪jest coverage report action from ab202d9ca714717c9de6d7952d96d92075fc7e0e
Since the empty value has different rules for indicating empty for each field (e.g., the _.isEmpty function treats the number 0 or '', {} as empty), we decided to keep the existing structure so that we can set rules for each field.
Since the empty value has different rules for indicating empty for each field (e.g., the _.isEmpty function treats the number 0 or '', {} as empty), we decided to keep the existing structure so that we can set rules for each field.
I initially thought of using _.isEmpty as the default and overriding it with other empty detection functions when needed. However, as you pointed out, this could lead to unintended situations such as treating the number 0 as empty. Let's keep it as it is then.
Merge activity
- Aug 6, 1:00 AM EDT:
agatha197added this pull request to the Graphite merge queue. - Aug 6, 1:02 AM EDT:
agatha197merged this pull request with the Graphite merge queue.