Edit Microsoft ChatBot UI design - css

I have setup a QnA Bot via the Azue BotService, and I want to use the WebChat channel, but the default MS Design for the chat interface is quite bland; is there a way for me to edit it?
Is it possible to go form the default theme on the left, so something like Air New Zealand's bot on the right in the image below?

It depends on how you want to integrate the webchat in your page but yes it is possible to change the aspect, it's only css and js
All the details are provided on the GitHub account for the Webchat: https://github.com/Microsoft/BotFramework-WebChat
In a few words:
Want to run a custom build of WebChat? Clone this repo, alter it, build it, and reference your built botchat.css and botchat.js files.
And for Styling:
Styling
In the /src/scss/ folder you will find the source files for generating
/botchat.css. Run npm run build-css to compile once you've made your
changes. For basic branding, change colors.scss to match your color
scheme. For advanced styling, change botchat.scss.

Related

How to use own icons in Flet

I can't find how to load my own icons in Flet.
I'm testing Flet with the intention of making a desktop app (pure desktop, not Internet needed), but I'm not able to use my own icons to begin with. I can only use the ones that come inside ft.icons, but I'd rather use my own by loading them from a folder similar to /assets/icons. Can I do that? How?
Thanks.
Currently, I don't see a way of doing this; however, you could use the Image class instead.
I would suggest you create an assets folder under your main project folder.
Let's assume you have the following folder structure on your project:
/assets
/icons/my-icon.png
main.py
When you are running your app, you should provide that folder to the initializer in the following way:
flet.app(target=YourApp(), assets_dir="assets")
Then you can access your images there directly and create an Image instance in the following way:
test_image = flet.Image(src="icons/my-icon.png", width=32, height=32, tooltip="Image Tooltip")
You can nest these Image controls inside of anything you want, so you have a lot of flexibility.
The only downside of doing it this way is if you are using light/dark themes on your app. Compared to the Icon class, you will have to specify the light/dark theme versions yourself and update them manually when you are switching your theme.
Here is the official documentation

How can I reintroduce autocompletion of Gutenberg components in Visual Code?

I have a development environment in Visual Code 1.71.2, in which I have a WordPress Theme, in which a Webpack process is watching my code changes through the integrated terminal.
This process uses #wordpress/dependency-extraction-webpack-plugin as a plugin in the Webpack process.
Until the past few days, typing the initial part of a component like <Inspect... (for <InspectorControls>) would autocomplete and automatically pull in the component reference to the top of the JS file.
import { InspectorControls } from '#wordpress/block-editor';
This would also allow me to hover over InspectorControls to see its attributes.
Now, without knowingly having changed anything, this isn't working. My questions are:
Where does this intelligent autocompletion come from?
How can I reinstate it?
Is an extension providing this functionality? I've reinstalled intelliphense but this seems to have no beneficial effect.

Nativescript: add icon and specify name

How would i add a custom icon with a given name to my nativescript project using the tns resources generate icons-command
$tns resources generate icons ~/myfolder/myspecialicon.png
Say i want the command to place the icon(s) in the correct folders maintaining the name myspecialicon.xxx instead of just overwriting the default icon.png?
Cheers
Lasse
That only generates the app icon. To generate other icons (and other image assets, really) I recommend the online tool http://images.nativescript.rocks/.
It generates assets for both Android and iOS. All you have to do is grab the result and merge it into your project's App_Resources. I know it is not ideal but it's the best workflow I found so far.

To add a Java script file in a customize feature in drupal

i have create a customize feature in open atrium. now i have to implement the a javascript file like mindmap in that customise feature. how can this possible to add in the open atrium feature.
i have completed the feature using the book module of the open atrium. Now i have to change only the text area in to mindmap.how can it implemented in the feature.plz help me.
You are using the open atrium custom feature and want add a js file then you can follow the build a feature link https://community.openatrium.com/documentation-en/node/449
and then read the drupal_add_js function in the link http://drupal.org/node/304255.
You want to use drupal_add_js() in a custom module or theme depending on what you are making. If it is a one off site just add it to your theme. If youre trying to fix the moduel add it directly to the upstream module. If youre augmenting the module for your own purposes add it to a new helper module so that you can upgrade that module in the future without concerns of losig your work.
http://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_add_js/6

How to create a QT plugin that customizes UI?

We would want the users to be able to optionally customize our QT applications. So if they would want to create their own theme for our applications, all they have to do is load their own CSS file.
Do we really need to create a plugin to be able to do that? If yes, could somebody give me the basic steps/ or a jump start on how to do it? If no, are there features in QT that I need to know to be able to do that without creating a plugin?
I have a Jabber instant messenger which is plugin based and written in Qt. It includes a style plugin that does exactly what you describe. The source for that plugin is here:
https://github.com/sje397/saje/tree/master/plugins/styles/
(Note: this is a plugin for my application - not a 'Qt style plugin')
Basically all you need to do is load a style sheet and call QApplication::setStyleSheet:
QFile f("filename");
if(f.open(QIODevice::ReadOnly)) {
qApp->setStyleSheet(f.readAll());
}
An example of a valid style sheet is here. Note that it is for my app, so includes some of my own class names etc.

Resources