microsoft / BotFramework-WebChat

A highly-customizable web-based client for Azure Bot Services.
https://www.botframework.com/
MIT License
1.6k stars 1.55k forks source link

An headless approach to this Library #4073

Open alexanderomnix opened 3 years ago

alexanderomnix commented 3 years ago

Feature Request

Will it be more effective if this WebChat SDK just export Hooks or Redux Dispatches to the logic and all UI Components be created and customized by the developer? Is really a pain to make this WebChat looks good, using CSS is weird because overwrites leads to break in new releases as discussed the classes and html markup changes a lot and the code and stylesheet looks so dirty, the JSS approach leads to limited styling.

I know how important accessibility is and all the efforts from the core members of this project is doing but I think an headless approach will be better, providing logic via hooks and the style leaves to the developer using this lib to build, even handling accessibility.

I love how powerfull is the use of custom components, but I think the standard chat isnt customizible enough, even the sendinputBox is really dificult and weird to style and to add custom features to it.

Keep the great work on this SDK, this is just an idea that I think will make this lib even more powerful.

compulim commented 3 years ago

Thanks for your appreciations.

We refactored headless business logics into the botframework-webchat-api package (which our web UI is based on). It should be good for React Native but we haven't tested it yet.

You will need to bring-your-own UI. Top of my head, there are a few complex logics that are not included in the api package:

You are right. Accessibility is very difficult to get it right. We keep learning and rewriting our DOM tree to make accessibility experience better, but IMO, we are not there yet. Lucky we have good set of E2E visual regression tests, so we are quite confident about our quality when rewriting DOM tree.

CSS is a difficult topic. There are few things in my head that need more thinking/experiments:

Few more things in my head that need more thinking/experiments too: