-
Notifications
You must be signed in to change notification settings - Fork 27
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
hide chat is not working #62
Comments
Hi @chaitanya71998 , Do you want to hide only the composer or minimize the whole bot? |
Hi @bassamtantawi-botpress yeah wanted to hide composer |
The conditions are used to make sure that if the chat is restored (user opens and closes window), and there are more than one component in the message list, just the one from the last group gets executed (race condition). This is due to the component executes code onMount. We aren't sure why it's not working for you sometimes. You might want to put a bunch of console.logs and try it out with different screen sizes in your browser. If the problem only happens on mobile, you can create an api endpoint using https://requestbin.com/ and call the endpoint when the state changes in the component. If you manage to write code that reproduces the issue reliably, let us know. |
Hi @ptrckbp can you explain more clearly i didn't understand the use of condition, |
The conditions are used to prevent a race condition, so if you remove them, you will occasionally encounter issues. Are they the ones causing issues with mobile? |
No, before removing condition this issue is coming. |
Greetings,
I was using hide-chat in a botpress project. I created a flow to make composer hide and should be visible only when required.
Sometimes its working fine but and not working sometimes, especially when I am using for mobiles. Not knowing why is this happening. Can I know what is the issue here and how to solve it
here is the link to the flow I created with hide-chat module https://drive.google.com/drive/folders/1a1uCL-gvzlbgWwnpfg8qZmKWVJtr366Y?usp=sharing
also what are these conditions
isBotMessage && isLastGroup
we are using for, can we remove these conditions, if removed will they cause any issue?Thanks in advance
The text was updated successfully, but these errors were encountered: