-
Notifications
You must be signed in to change notification settings - Fork 3
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
1700: Refactor and clean up csv import #1765
Conversation
@@ -0,0 +1,6 @@ | |||
<component name="InspectionProjectProfileManager"> |
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.
This appeared after setting the eslint configuration in IntelliJ to automatic, I guess we want this project wide then?
@@ -0,0 +1,7 @@ | |||
import { ProjectConfig } from '../getProjectConfig' | |||
|
|||
export const getCsvHeaders = (projectConfig: ProjectConfig): string[] => [ |
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.
Do you think this is good naming? Or should we change this to columnNames
or similar?
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.
hm for now i think its okay because it serves this particular purpose and can't be reused that easily. But if we combine name, expiry date and extensions into one array to make it more flexible and to enable better reordering of form fields we might not need to explicitly define here the columns names in the array but just loop through and then we could rename it to getColumnNames
2dfb102
to
1a189de
Compare
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.
Looks good!
Nice refactoring 👍
Tested csv import for nuernberg and bavaria
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.
Code looks good, thanks for this improvement.
Tested on Firefox:
Previously a data like this 10.01.25 was valid. Now this is transformed as "10.01.0025" and is invalid. This should be fixed to the previous behavior.
I just tried this on main and the behavior seems to be the same for csv import, seems like this was broken before. I'll create an issue for this: #1805 |
Short description
Refactor and clean up csv import to avoid implicit side effects.
Proposed changes
Side effects
Testing
Make sure that both normal and freinet CSV import still works.
Resolved issues
Fixes: #1700