-
-
Notifications
You must be signed in to change notification settings - Fork 22
Advanced Websocket Features #17
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
if I don't complete this PR by Thursday, I likely won't be available to pick it back up until October 4th. |
Reconnecting WS has been developed. Currently works on client side disconnect. There are some caveats...
|
If approved, the last limb of Conreq blocking factors is Unfortunately I'm too much of a ReactJS scrub to PR that into IDOM Core, so I'll need your support on that. Side noteBefore we actually start getting repos with What are your thoughts? |
Let me know what additional changes are needed in this PR. |
Been really busy lately. Will try to get to this next week. |
I updated the PR description. Let me know if you need me to split this PR into separate parts to be more easily digestible. |
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 - just minor nits.
Once I implement the use_context
hook I think we'll be able to get rid of this websocket parameter and just allow the user to access the socket from anywhere:
@component
def MyComponent():
socket = use_context(WebSocketContext)
...
With everything else that needs to happen that's probably a ways off though so this should be fine for the time being.
Side note... We should also consider adding You can just take my extensive pre-commit.ci configuration file and add it in. |
All comments have been resolved. |
From my experience, pre-commit has been most helpful in resolving issues that can be fixed automatically (e.g. black, sorting imports) which is why I've kept it fairly minimal. Linters like A longer-term solution to this would be to make an |
I recommend using the repo-file-sync GitHub action to automate standardized configurations across That's what we use at Jazzband alongside our template repository. |
New Features
settings.py:IDOM_WS_RECONNECT_TIMEOUT
)"idom-client-react": "^0.33.3"
websocket
as a component parameterrender
shortcut instead ofHttpResponse
ALLOWED_HOSTS = ["*"]
in tests to allow LAN accessIdomAsyncWebSocketConsumer
->IdomAsyncWebsocketConsumer