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

Fix dynamic UI #5

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Fix dynamic UI #5

wants to merge 3 commits into from

Conversation

cpsievert
Copy link
Collaborator

@cpsievert cpsievert commented Oct 10, 2024

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)
  • jcheng5/shinychat@d38e5e2 (which pulls in posit-dev/py-shiny@e8d1e2c) 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

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.

Can't easily append to a chat_ui() that is dynamically rendered
1 participant