-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore(website): [playground] add types tab to playground #6843
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
Thanks for the PR, @armano2! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
(state.showAST === 'types' && astModel?.storedTsAST && ( | ||
<TypesDetails | ||
typeChecker={astModel.typeChecker} | ||
value={astModel.storedTsAST} | ||
onHoverNode={setSelectedRange} | ||
cursorPosition={position} | ||
/> | ||
)) || | ||
(state.showAST && astModel && ( |
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.
i have a feeling that i should extract this to separate component, this and/or
condition chain is getting complex
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.
yeah this is probably getting to the point where we might want to extract the condition into a bit of state machine logic which outputs an enum value so that we can simplify the render logic.
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.
Agreed. I don't personally think of it as a blocker but it would be a nice to have. Maybe a good follow-up good first issue
for a potential contributor?
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.
Filed #7630. On second thought I think it's probably not a good first issue
given it's touching a bunch of code.
in terms of the UX itself - it looks good! |
(state.showAST === 'types' && astModel?.storedTsAST && ( | ||
<TypesDetails | ||
typeChecker={astModel.typeChecker} | ||
value={astModel.storedTsAST} | ||
onHoverNode={setSelectedRange} | ||
cursorPosition={position} | ||
/> | ||
)) || | ||
(state.showAST && astModel && ( |
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.
yeah this is probably getting to the point where we might want to extract the condition into a bit of state machine logic which outputs an enum value so that we can simplify the render logic.
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 is great, thanks!
Just a couple of small questions or comments, nothing blocking.
Whenever you want to merge, I'm happy.
(state.showAST === 'types' && astModel?.storedTsAST && ( | ||
<TypesDetails | ||
typeChecker={astModel.typeChecker} | ||
value={astModel.storedTsAST} | ||
onHoverNode={setSelectedRange} | ||
cursorPosition={position} | ||
/> | ||
)) || | ||
(state.showAST && astModel && ( |
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.
Agreed. I don't personally think of it as a blocker but it would be a nice to have. Maybe a good follow-up good first issue
for a potential contributor?
Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
I've sent the preview link for this to 3 separate people this month already so I'm going to try to get it merged now 😄 |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6843 +/- ##
=======================================
Coverage 87.23% 87.23%
=======================================
Files 387 387
Lines 13401 13404 +3
Branches 3962 3962
=======================================
+ Hits 11690 11693 +3
Misses 1327 1327
Partials 384 384
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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 is wonderful - super useful for testing out types, and will make for easier debugging & sending help playgrounds to devs! Thanks @armano2! 👏
PR Checklist
Overview