Skip to content

Conversation

@bugnano
Copy link
Collaborator

@bugnano bugnano commented Mar 3, 2022

cc @eteeselink

We have an onLoadingStateChanged callback for the ChatBox and ConversationList, so that users can show a placeholder while the WebView (and the iframe) is loading.

I'm using a MutationObserver to see when the iframe is mounted, and I'm firing the loaded event once the iframe is in the loaded state.

@bugnano bugnano requested review from eteeselink and vickz84259 March 3, 2022 10:36
@bugnano
Copy link
Collaborator Author

bugnano commented Mar 3, 2022

Actually, instead of using MutationObserver, waiting for the mount promise to resolve works as well (maybe the promise is resolved before the load event on the iframe though, but it could still be acceptable)

@bugnano bugnano removed the request for review from eteeselink March 7, 2022 09:22
Copy link
Collaborator

@vickz84259 vickz84259 left a comment

Choose a reason for hiding this comment

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

The only thing I'd note is that we may need to refactor later and have a central place for the type definitions that are referenced from both Chatbox and ConversationList

@bugnano bugnano merged commit 6a90a85 into main Mar 16, 2022
@eteeselink eteeselink deleted the feature/loading-state branch April 1, 2022 11:27
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.

3 participants