issues
search
jcheng5
/
shinychat
Chat UI component for Shiny for R
Other
25
stars
1
forks
source link
Fix dynamic UI
#5
Open
cpsievert
opened
2 weeks ago
cpsievert
commented
2 weeks ago
Closes #4
Note that:
3fe1f93
is mainly for sanity reasons -- to make sure the way in which
chat.js
gets executed
is the same as py-shiny
8e5671c
is the heart of the fix (wait until flush to send messages)
https://github.com/jcheng5/shinychat/pull/5/commits/d38e5e2de648cc8dcdd4bd267d74df7a1445e9b0
(which pulls in
https://github.com/posit-dev/py-shiny/commit/e8d1e2c357fec0798c7559a7c14dbd8aba5335c0
) makes it so chat.js immediately subscribes to the custom messages. For some reason, I was noticing that (sometimes?!) starting messages wouldn't get handled without this, since the message would get processed before the handler was registered. The only reason that
$(function() {})
was there in the 1st place was that I was following
what data-frame does
, but it seems unnecessary/better to subscribe immediately
Closes #4
Note that:
chat.js
gets executed is the same as py-shiny$(function() {})
was there in the 1st place was that I was following what data-frame does, but it seems unnecessary/better to subscribe immediately