Skip to content
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

TypeScript: Serialize date property #226

Closed
matthewchigira opened this issue Jan 12, 2021 · 4 comments
Closed

TypeScript: Serialize date property #226

matthewchigira opened this issue Jan 12, 2021 · 4 comments
Assignees

Comments

@matthewchigira
Copy link
Contributor

Build in support for the TypeScript date property type.

@mzah
Copy link
Contributor

mzah commented Feb 10, 2021

@matthewchigira
Can you describe me in extended way what your expectations are? i do see that atm we treat (and serialize/export) PropTypes.date as "custom" type which later, on UXPin UI side is floating textarea which expect JSON as content

thoughts:

  • I can assume that on merge-cli I should introduce new const/type -> date
  • but what about UI on UXPin side? should we build new control (or use existing one if any exists; i can ask about existing one later)?
  • any additional requirements like validation, maybe various date/datetime format support or anything about i didnt think yet?

I do need basics as i do not have experince with missing support for prop types in merge.
And i was not part of the team which put this task in the old backlog (fresh thought: maybe orginal backlog entry have additional info?)

@matthewchigira
Copy link
Contributor Author

@mzah

For all the TypeScript tickets, the aim is that the merge-cli is able to recognise and serialise every type available. Currently, if a customer has a prop in one of their components that was a date, then it would not be available in UXPin.

but what about UI on UXPin side? should we build new control (or use existing one if any exists; i can ask about existing one later)?

My priority is more the serialisation, so I don't mind so much if we don't have a special date control in the UI. For now, it can be just a textfield or a floating text area. So long as the designer can interact with it and it update the component.

any additional requirements like validation, maybe various date/datetime format support or anything about i didnt think yet?

It might be a good idea to take a look at an existing TypeScript type (e.g. nunber, string) and see how it was implemented in the merge-cli. There are tests written and example components in the test directory for TypeScript features.

Hope that helps! Let me know if you have any more questions.

@mzah
Copy link
Contributor

mzah commented Mar 3, 2021

#239
its worth to look on comment as UI can require some tweaking

@matthewchigira
Copy link
Contributor Author

Closed by 239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants