Skip to content
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

Add Backgroundcolor for SendBoxButton to defaultStyleOptions #3038

Closed
psaeuerl opened this issue Mar 25, 2020 · 10 comments
Closed

Add Backgroundcolor for SendBoxButton to defaultStyleOptions #3038

psaeuerl opened this issue Mar 25, 2020 · 10 comments
Assignees
Labels
backlog Out of scope for the current iteration but it will be evaluated in a future release. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. community-help-wanted This is a good issue for a contributor to take on and submit a solution customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete.

Comments

@psaeuerl
Copy link

Feature Request

My requirement is to set the BackgroundColor of the sendBoxButton.
Currently, the defaultStyleOptions.js does not support this and i had to fall back to using css selectors.
defaultStyleOptions.js seems to be the natural place for this.

Current solution:
#webchat > div > div > div.main > div > button{ background-color: aqua; }

Desired solution:
const styleOptions = { sendBoxButtonsendBoxBackgroundColor: "aqua" };

@congysu congysu added the customer-reported Required for internal Azure reporting. Do not delete. label Mar 25, 2020
@congysu congysu added the Bot Services Required for internal Azure reporting. Do not delete. Do not change color. label Mar 25, 2020
@congysu
Copy link
Member

congysu commented Mar 25, 2020

@compulim can you please take a look on this issue? thanks.

@cleemullins cleemullins assigned tdurnford and unassigned compulim Apr 1, 2020
@tdurnford
Copy link
Contributor

@congysu You can currently accomplish this by overriding the sendBoxButton styles set. Take a look at the code snippet below and the Manual Styling Web Chat Sample for more details.

@compulim @corinagum @cwhitten What are your thoughts on adding sendBoxButtonsBackgroundColor to the default style option and having it default to the sendBoxBackground if it's undefined?

Web Chat v4

const styleSet = window.WebChat.createStyleSet();
styleSet.sendBoxButton = {
  ...styleSet.sendBoxButton,
  backgroundColor: 'aqua',
};

window.WebChat.renderWebChat(
  {
    directLine: window.WebChat.createDirectLine({ token }),
    styleSet,
  },
  document.getElementById('webchat')
);

Screenshot

image

@tdurnford tdurnford added customer-replied-to Required for internal reporting. Do not delete. Enhancement labels Apr 2, 2020
@corinagum
Copy link
Contributor

@tdurnford I don't see a problem adding this style option

@tdurnford tdurnford added backlog Out of scope for the current iteration but it will be evaluated in a future release. community-help-wanted This is a good issue for a contributor to take on and submit a solution and removed Pending labels Apr 3, 2020
@psaeuerl
Copy link
Author

psaeuerl commented Apr 7, 2020

Thank you for your reply!

Our UX Designer also requested to have a change in the send button when hovering.
Do you recommend implementing this via css or via the idosyncratic manual styling (overriding createstylesets)?
Which one is less likely to break?

@tdurnford
Copy link
Contributor

I'd recommend the idosyncratic manual styling - it is the least likely to break of the two options.

@psaeuerl
Copy link
Author

psaeuerl commented Apr 7, 2020

Thanks!

@psaeuerl psaeuerl closed this as completed Apr 7, 2020
@CHuijsman
Copy link

@tdurnford I don't see a problem adding this style option

We are also interested in style options for the sendboxbutton background and on hover effect. Besides we were wondering if an option like sendboximage can be added for full user experience customization

@corinagum
Copy link
Contributor

@CHuijsman This customization is available by creating your own sendboxbutton component. Please take a look at customizing the UI.

@felixvanleeuwen
Copy link

felixvanleeuwen commented Oct 8, 2020

@corinagum None of the examples specify how to pass a custom renderer. I've been digging through some javascript files in the NPM packages to try to find out how this would be possible (FullReactWebChat.js in botframework-webchat & BasicWebChat.js
in botframework-webchat-component).
It looks like the only control we have over this part of the UI is what we can send down to it through the styleOptions object.

Am I missing something or is it not possible without forking the repo?

@corinagum
Copy link
Contributor

corinagum commented Oct 8, 2020

#3526 (comment) Listed in our FAQ

Our custom components samples also teach how to use middleware https://github.com/microsoft/BotFramework-WebChat/tree/master/samples/05.custom-components/c.user-highlighting

@felixvanleeuwen felixvanleeuwen mentioned this issue Oct 12, 2020
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Out of scope for the current iteration but it will be evaluated in a future release. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. community-help-wanted This is a good issue for a contributor to take on and submit a solution customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants