tjtanjin / react-chatbotify

A modern React library for creating a flexible and extensible chatbot.
https://react-chatbotify.com
MIT License
135 stars 65 forks source link

[Feat] User Experience Window #16

Closed GivenToFlyCoder closed 5 months ago

GivenToFlyCoder commented 5 months ago

Is your feature request related to a problem? Please describe. Not exactly a problem, instead is related to the Chat Bot user experience (chat bot window behavior minimize, close, maximize / restore).

Describe the solution you'd like I would like that the chat bot window behavior, would be as the classical window explorer:

Describe alternatives you've considered 1) The actual close button, behaves as minimize button, when you click on it, minimizes the chat bot window, so i suggest to change the X close icon, for a - minimize icon. 2) Next to the minimize icon, add a second icon (X close button), when you click on it, should trigger a close function that delete all the chat bot messages, including history and minimize the chat bot window. This could be a re render of the chat bot component. 3) Add a third icon maximize / restore size, as it name suggest, it should maximize - restore the chat bot window size, as a window explorer item.

Also you could add new options, to asign a function to be executed when OnClick over close button.

Just a couples of suggestions.

Best regards, Alberto

tjtanjin commented 5 months ago

Hey again! Thank you for the suggestions. Sharing my thoughts below!

1 & 3) The idea to have a minimize/maximize icon is interesting, though that means appearance wise we may need to style it a little different for a full-screen window on larger devices (looks a little empty/weird if you see below):

image

2) For clearing of chat history and messages, it's actually achievable via the advance useCustomMessages feature (though not directly via a header button). Might need to give this a little more thought because it does feel a little odd to have a clear messages button sitting in the header.

Note: Separately, I have plans down the road to support live chat/allow users to add their own custom buttons within header/footer. These 2 will likely require some work and seeing as we've just had some major updates in the past 1-2 months, I intend to hold back from more updates while we let version 1.4.0 settle. Also gives me more time to work on other projects I've been putting off in the meantime 😝

Though rest assured that there'll be more cool stuffs coming for the chatbot eventually. I'm far from done!

GivenToFlyCoder commented 5 months ago

Great to know your point of view!

About 1 & 3, my suggestion is just maximize - minimize behavior as a classical window item, but full screen appearance, (full screen overlay) to avoid the weird look like.

About 2, not exactly a clear message button, but when you click on actual close button, could be useful that all the conversation be deleted. I'll explore useCustomMessgaes feature.

Thank for all the cool stuff doing by your big effort!