Skip to content
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

feat(websocket-plugin): add WebSocketDisconnected, WebsocketMessageError actions #825

Merged
merged 11 commits into from
Feb 9, 2019

Conversation

kwalski
Copy link
Contributor

@kwalski kwalski commented Feb 8, 2019

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

  • Dispatches WebSocketDisconnected action upon disconnect to allow user write a reducer/effect to track websocket connection state and retry if required. Note that this is plugin dispatched and hence different to DisconnectWebSocket which can be programatically dispatched
  • WebsocketMessageError was not dispatched because this._socket in websocket-subject.ts is not handling error and complete functions in subscribe

Issue Number: N/A

What is the new behaviour?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

#820

@splincode splincode changed the title feat(websocket-plugin): dispatch WebSocketDisconnected Action upon socket disconnect; dispatch WebsocketMessageError on received message error feat(websocket-plugin): add WebSocketDisconnected, WebsocketMessageError actions Feb 8, 2019
Copy link
Member

@eranshmil eranshmil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked and there is a lot of inconsistency all over, not related to your PR.
The main issue is that the plugin's module and options are written with lower s. (ie NgxsWebsocketPluginModule)

If we want to deal with it, it should be fixed for the next major version.

@markwhitfeld @splincode @arturovt Any thoughts?

@arturovt
Copy link
Member

arturovt commented Feb 8, 2019

@eranshmil my opinion is we have to release the next version as soon as we can, because there a lot of features awaited by people. What do you think?

@eranshmil
Copy link
Member

@eranshmil my opinion is we have to release the next version as soon as we can, because there a lot of features awaited by people. What do you think?

We could merge this PR without the WebSocketMessageError, and release the minor version.
For the major version, all this inconsistency should be resolved.

@arturovt
Copy link
Member

arturovt commented Feb 8, 2019

@eranshmil Yeah, probably, also could you please look with Mark at the edited markdown file, maybe there is some inconsistency in descriptions?

@markwhitfeld
Copy link
Member

I agree, this PR is good to go other than the rename.
So the WebSocketMessageError should be named back to WebsocketMessageError.
It is tempting to make a concession but we need to follow semantic versioning.
In the next major release we will rename all occurences of Websocket to WebSocket to make it consistent

@kwalski
Copy link
Contributor Author

kwalski commented Feb 8, 2019

So the WebSocketMessageError should be named back to WebsocketMessageError.

@markwhitfeld this is reverted

@splincode
Copy link
Member

image

Copy link
Member

@markwhitfeld markwhitfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic! Thanks so much for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants