-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
TASK: rewrite react-ui-components in TypeScript #2128
TASK: rewrite react-ui-components in TypeScript #2128
Conversation
Wow, great work! I currently don't have time atm to look at it a little bit in depth but hope @dimaip can. |
eb5f029
to
c313e61
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.
Wow, James, I hope you know you are amazing!
Looks good to me by reading, besides two comments.
What I think our plan should be regarding TS support: gradually convert components and make sure the UI keeps on working in between. E.g. I think this PR could be merged once we have tested it extensively.
The bigger change would be converting the redux state, as it would probably involve dropping immutablejs, so that would have to be done in one big PR, but other changes than that could be done gradually, in smaller PRs.
Btw, see the discussion regarding interface naming: microsoft/TypeScript-Handbook#121 |
So we can not benefit from intellisense and automatic type checking in defaultProps.
c313e61
to
ad29d4d
Compare
|
I'm not sure if this extra work is necessary in this case. If we can give this PR some extra testing, I think it makes sense to merge it, as it looks rather straightforward. But do as you see fit. |
… to type defaultProps, minor fixes
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.
These things should be discussed.
@mstruebing @dimaip
How can we test this apart from jest and storybook?
@mstruebing @dimaip I feel like this PR is ready. Can you test this or tell me how to test this PR?
|
Just do another commit or close and reopen the PR ;)
|
1b97d5c
to
ac94ccb
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.
Really impressive change! I did not test it in practice, but really looks awesome 👍 👍 👍
Some questions just to ensure it did not get lost:
- does React Storybook still work for the components?
- do the Jest Test Cases still work for the components?
@skurfuerst Storybook stories and Jest tests work 😉 I updated two Jest snapshots, but only for the better 🙂 |
perfect, thanks :) |
So, who wants to press the button ?:D |
I could try to test the change, but not earlier then the end of the week (project going live...). Feel free to merge without my review, looks good by reading. |
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.
By reading
What I did
I started to rewrite the
react-ui-components
with TypeScript. This is done in preparation for the Neos Sprint in November 2018 where we are going to rewrite the containers and redux store in TypeScript. (That's an assumption not a fact, so correct me if I'm wrong)It also helps me to get in touch with the code base prior to the Sprint.
I'm not sure whether a single PR or multiple PRs (one for each component) is the best way to go, so just I start with a single PR and we can discuss this later.
There is a lot of discussion needed! (See further below)
Some things I did:
react-ui-components
in TypeScriptHow I did it
I did it with VSCode 🚀 an I suggest you do the same! 😆
How to verify it
make storybook
make build-watch
TODO
upgrade dependencies (most wanted: webpack to v4.x)make lint
should also run tslintfix storybook styles (seem broken and some API's are used flat out wrong (e.g. in Icon component)make test
) doesn't seem to workNo tests found
I'm exited and looking forward to work with you on this slightly major step in the right direction 😃.