Skip to content

Conversation

@sfc-gh-lwilby
Copy link
Collaborator

@sfc-gh-lwilby sfc-gh-lwilby commented Jan 13, 2025

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.

@sfc-gh-lwilby sfc-gh-lwilby added the security-assessment-completed Security assessment has been completed for PR label Jan 13, 2025
@sfc-gh-lwilby sfc-gh-lwilby added change:chore PR contains maintenance or housekeeping change impact:internal PR changes only affect internal code labels Jan 13, 2025
@sfc-gh-lwilby sfc-gh-lwilby marked this pull request as ready for review January 13, 2025 17:32
Copy link
Collaborator

@sfc-gh-bnisco sfc-gh-bnisco left a 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

Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

@sfc-gh-lwilby sfc-gh-lwilby merged commit cac837a into develop Jan 14, 2025
33 checks passed
edegp pushed a commit to edegp/streamlit that referenced this pull request Jan 19, 2025
## 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.
@lukasmasuch lukasmasuch deleted the chore/websocket-connection-export-components-lint-rule branch March 13, 2025 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:chore PR contains maintenance or housekeeping change impact:internal PR changes only affect internal code security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants