-
Notifications
You must be signed in to change notification settings - Fork 4k
split up WebsocketConnection.tsx to pass lint rule #10177
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
split up WebsocketConnection.tsx to pass lint rule #10177
Conversation
sfc-gh-bnisco
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.
LGTM! One non-blocking suggestion around directory structure inline
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.
suggestion (non-blocking): I see that there are other files in https://github.com/streamlit/streamlit/tree/develop/frontend/app/src/connection, but this file seems scoped to "types for WebsocketConnection." It might be clearer the intention of these files to move this and related files into a new directory frontend/app/src/connection/WebsocketConnection to make it clearer.
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 looked through the other files but didn't see types in them. To me, it looks like all these files are fairly closely related to the websocket connection and if we add more types they could be in this top-level file. But I'm open to changing the structure if you feel strongly. I will leave it for now.
## Describe your changes In preparation for adding the [react-refresh rule](https://github.com/ArnaudBarre/eslint-plugin-react-refresh), this PR splits up WebsocketConnection.tsx . Further PRs are in the works for fixing other violations of this linter rule and then adding the linter rule. Note, this file should not break fast refresh, so the linting rule is a false positive here, but I thought it could still be good to take the opportunity to reduce the file size a bit. ## GitHub Issue Link (if applicable) ## Testing Plan Does not change any functionality so this is covered by existing tests. --- **Contribution License Agreement** By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
Describe your changes
In preparation for adding the react-refresh rule, this PR splits up WebsocketConnection.tsx .
Further PRs are in the works for fixing other violations of this linter rule and then adding the linter rule.
Note, this file should not break fast refresh, so the linting rule is a false positive here, but I thought it could still be good to take the opportunity to reduce the file size a bit.
GitHub Issue Link (if applicable)
Testing Plan
Does not change any functionality so this is covered by existing tests.
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.