- Issue created by @pdureau
- 🇫🇷France pdureau Paris
It would be nice to show in the toolbar the ID of other connected users.
Will be done in ✨ Add an ActiveUsers island Active
- 🇫🇷France pdureau Paris
HTMX seems ready:
afaik the PR was actually not needed, I did some more testing and hx-swap-oob seems to work properly with hx-sse (using htmx 2.0.2 and htmx-ext-sse 2.2.2)
https://github.com/bigskysoftware/htmx-extensions/pull/94
Symfony has a nice API for this: https://symfony.com/blog/new-in-symfony-7-3-simpler-server-event-streaming
Le's do it
- Merge request !46Issue #3534137 by grimreaper, pdureau: Add real-time collaboration → (Merged) created by pdureau
- 🇫🇷France pdureau Paris
Careful:
One thing to note about the HTMX SSE extension that I spent a full day troubleshooting is it doesn't handle multiline strings very well. This becomes a problem when the fragment you want to swap in has multiline hyperscript. I usually have to move it to the parent or convert to single line.
https://www.reddit.com/r/htmx/comments/1mjhzl1/gohtmx_server_sent_events...
- 🇫🇷France Grimreaper France 🇫🇷
I am checking why the lib is loaded twice on pages.
In the meantime there are questions in the MR.
- 🇫🇷France Grimreaper France 🇫🇷
I found how to update to latest SSE extension version. But still 2 calls to the SSE endpoint.
Maybe a bug in the extension. I have not found related stuff in https://github.com/bigskysoftware/htmx-extensions/issues
- 🇫🇷France Grimreaper France 🇫🇷
The MR also fix 2 bugs: one in history panel and the other in active users panels.
- 🇫🇷France pdureau Paris
For information, we have some moment where drag and/or drops from and/or to the root dropzone are not synched properly. After investigation, it seems this may not be related to this change.
However, by pushing the limit of the display builder events management, this change may help us to find already existing issues.
- 🇫🇷France pdureau Paris
I need to talk with Grimreaper about 2 subjects:
- on my tests, sync works only from one user to the other one. Even when the second one init the builder.
- also, the HTTP endpoitn is disconnected and the request is resent at every cycle, instead of keeping a loooong connection. We may lose events because of that. It may be because of the
return
statemenst
- 🇫🇷France Grimreaper France 🇫🇷
As discussed, point 1 is OK.
I will check point 2 tomorrow.
- 🇫🇷France pdureau Paris
Resolved some MR threads.
Only 2 left: https://git.drupalcode.org/project/display_builder/-/merge_requests/46/d...
- htmx_sse_local VS htmx_sse_cdn
- dependencies must be in /libraries for tests, so should be in .gitlab-ci.yml playwright test script.
- First commit to issue fork.
-
mogtofu33 →
committed 7bf54078 on 1.0.x authored by
pdureau →
#3534137 feat: add real-time collaboration
-
mogtofu33 →
committed 7bf54078 on 1.0.x authored by
pdureau →
- 🇫🇷France mogtofu33
Nice work, looking great.
There is the follow up with 2 sse connection to fix.