Repository navigation
Advanced Websocket Features - #17
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. |
rmorshea
left a comment
There was a problem hiding this comment.
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"websocketas a component parameterrendershortcut instead ofHttpResponseALLOWED_HOSTS = ["*"]in tests to allow LAN accessIdomAsyncWebSocketConsumer->IdomAsyncWebsocketConsumer