-
Notifications
You must be signed in to change notification settings - Fork 47
CSV Import: Support datetime import #513
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
Conversation
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.
Pull request overview
This pull request adds support for distinguishing between date-only and datetime (date+time) fields during CSV import, leveraging a new displayTime flag available on date fields in the updated framer-plugin SDK.
Changes:
- Introduces a virtual type system that treats "datetime" as a distinct type from "date" for UI purposes while mapping both to the SDK's date type with different
displayTimevalues - Updates type inference to detect time components in date strings and infer "datetime" vs "date" accordingly
- Adds compatibility logic to allow date and datetime fields to be mapped to each other during import
Reviewed changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updates framer-plugin dependency from 3.10.0-alpha.1 to 3.10.0-alpha.2 |
| package.json | Updates framer-plugin dependency to 3.10.0-alpha.2 |
| virtualTypes.ts | New file defining VirtualFieldType and conversion logic from SDK types to virtual types |
| typeInference.ts | Adds hasTimeComponent function and updates inference to distinguish date from datetime |
| typeCompatibility.ts | Adds compatibility between date and datetime types for field mapping |
| fieldReconciliation.ts | Updates field creation to set displayTime property based on virtual type |
| fieldLabels.ts | Adds "DateTime" label for the datetime virtual type |
| FieldMapper.tsx | Updates to use virtual types for type compatibility checking |
| FieldMapperRow.tsx | Updates to display virtual types correctly in the UI |
| .yarn/cache/* | Updated yarn cache for new framer-plugin version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
triozer
left a comment
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.
Pre-approving, left one comment!
Description
Adds support for the new displayTime flag on date fields, adds inference for times in JS/ISO format.
Rather than trying to support arbitrary flags across the system, we now map the field.type to a "virtual" type which splits date fields by displayTime into a datetime type. This simplifies things a lot
Testing
people.csv