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
channel-web: override basic css #381
Comments
@xavierbriole , I think overriding basic css feature makes sense! 👍 |
@epaminond cool! we have to be able to pass a link of a stylesheet or the css properties directly (witch is not a good idea if there's a lot of rules) ? and can we do something for the "get started" button ? like enable it only if there is the getStartedButton setting in the snippet (and not enabled true/false like the screenshot above) or maybe you want something more "out of the box" ? |
@xavierbriole That looks great!! Injecting an optional CSS file would be great. What do you think about the following API? window.botpressWebChat.init({
host: '',
// ....
customStylesheet: 'https://..../style.css',
greetingScreen: {
type: 'get_started' // can also be 'blank_chat'
options: {
// get_started specific options here
}
}
}) For custom styling, we will need to instrument all the chat elements with user-friendly classes. |
Hey there, Would be great to be able to inject custom stylesheet like you suggest @slvnperron ! |
Hi guys, Xavier's suggestion is definitely a great idea ! Xavier and i will be happy to complete that task and open a PR. GreetingScreen can be usefull to so we will try to move forward on this as well. Also we think a custom Context object could be a very handy solution in order to be able to pass some contextualization infos to the BOT.
and check that info and do some related actions the point is to have sort of "open" object in which we can pass extra infos to proceed some custom actions. What do you think of this proposal? |
@samail , I'd suggest not to mix these suggestions and implement them separately. window.botpressWebChat.sendEvent({
type: 'some-context-action',
platform: 'web',
text: 'smth'
}) |
Closing this since botpress/botpress#870 was merged. |
Hello everyone,
We would like to introduce the ability to pass some arguments / settings inside the init snippet of botpress-channel-web so we can add a "Get started" button with customizable labels.
Here a demo :
How would you want this feature integrated to start a PR ?
What about passing a custom stylesheet inside this parameters to override the basic css ?
Thanks!
The text was updated successfully, but these errors were encountered: