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

Refactor SynchronizedEditorChannel connect / confirmation #1897

Open
kiragrammel opened this issue Sep 13, 2023 · 0 comments
Open

Refactor SynchronizedEditorChannel connect / confirmation #1897

kiragrammel opened this issue Sep 13, 2023 · 0 comments
Labels
enhancement javascript Pull requests that update Javascript code ruby Pull requests that update Ruby code

Comments

@kiragrammel
Copy link
Contributor

kiragrammel commented Sep 13, 2023

In production, it takes some time for users to be actually connected with a channel through ActionCable. This causes problems, since the synchronized editor relies on an immediate connection to work. Otherwise, the text written by another learner might not get synchronized, and also the online status is not shown correctly.

As a first countermeasure, the ActionCable method ensure_confirmation_sent has been overwritten in 2c46ad2 (channels/application_cable/channel.rb), which is not ideal.

For the specific case of the synchronized editor, we might be able to refactor the code by using the connected() method in assets/javascripts/channels/synchronized_editor_channel.js.

@kiragrammel kiragrammel added enhancement javascript Pull requests that update Javascript code ruby Pull requests that update Ruby code labels Sep 13, 2023
@MrSerth MrSerth changed the title Replace workaround to ensure user connected to channel before sending messages Refactor SynchronizedEditorChannel connect / confirmation Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement javascript Pull requests that update Javascript code ruby Pull requests that update Ruby code
Projects
None yet
Development

No branches or pull requests

1 participant