Skip to content

Commit

Permalink
Merge branch 'master' into 1948
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurnford authored May 2, 2019
2 parents 7fdf00f + 6f67e58 commit fa81cbc
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 38 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fix [#1934](https://github.com/Microsoft/BotFramework-WebChat/issues/1934). Fix spacing of empty ConnectivityStatus component, by [@corinagum](https://github.com/corinagum) in PR [#1939](https://github.com/Microsoft/BotFramework-WebChat/pull/1939)
- Fix [#1943](https://github.com/Microsoft/BotFramework-WebChat/issues/1943). Fix extra vertical padding in IE11 and Firefox, by [@compulim](https://github.com/compulim) in PR [#1949](https://github.com/Microsoft/BotFramework-WebChat/pull/1949)
- Fix [#1945](https://github.com/Microsoft/BotFramework-WebChat/issues/1945). QA fixes for 4.4, by [@corinagum](https://github.com/johndoe) in PR [#1950](https://github.com/Microsoft/BotFramework-WebChat/pull/1950)
- - Fix [#1948](https://github.com/Microsoft/BotFramework-WebChat/issues/1948). Fixed sample 17.chat-send-history to work with Firefox and Edge, by [@tdurnford](https://github.com/tdurnford) in PR [#1956](https://github.com/Microsoft/BotFramework-WebChat/pull/1956)
- Fix [#1947](https://github.com/Microsoft/BotFramework-WebChat/issues/1947). Fix scrollbar in suggested action should be hidden in Firefox, remove gaps, and use style set for customizing `react-film`, by [@compulim](https://github.com/compulim) in PR [#1953](https://github.com/Microsoft/BotFramework-WebChat/pull/1953)
- Fix [#1948](https://github.com/Microsoft/BotFramework-WebChat/issues/1948). Fixed sample 17.chat-send-history to work with Firefox and Edge, by [@tdurnford](https://github.com/tdurnford) in PR [#1956](https://github.com/Microsoft/BotFramework-WebChat/pull/1956)

### Changed
- Deployment: Bumps to [`blobxfer@1.7.1`](https://github.com/azure/blobxfer/), by [@compulim](https://github.com/compulim), in PR [#1897](https://github.com/Microsoft/BotFramework-WebChat/pull/1897)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 1 addition & 34 deletions packages/component/src/Styles/StyleSet/SuggestedActions.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,4 @@
export default function createSuggestedActionsStyle({
paddingRegular,
transcriptOverlayButtonBackground,
transcriptOverlayButtonBackgroundOnDisabled,
transcriptOverlayButtonBackgroundOnFocus,
transcriptOverlayButtonBackgroundOnHover,
transcriptOverlayButtonColor,
transcriptOverlayButtonColorOnDisabled,
transcriptOverlayButtonColorOnFocus,
transcriptOverlayButtonColorOnHover
}) {
return {
paddingLeft: paddingRegular / 2,
paddingRight: paddingRegular / 2,

'& button > div.slider > div': {
backgroundColor: transcriptOverlayButtonBackground,
color: transcriptOverlayButtonColor,
outline: 0
},

'& button:disabled > div.slider > div': {
backgroundColor: transcriptOverlayButtonBackgroundOnDisabled,
color: transcriptOverlayButtonColorOnDisabled
},

'& button:focus > div.slider > div': {
backgroundColor: transcriptOverlayButtonBackgroundOnFocus,
color: transcriptOverlayButtonColorOnFocus
},

'& button:hover > div.slider > div': {
backgroundColor: transcriptOverlayButtonBackgroundOnHover,
color: transcriptOverlayButtonColorOnHover
}
};
return {};
}
74 changes: 71 additions & 3 deletions packages/component/src/Styles/StyleSet/SuggestedActionsStyleSet.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,80 @@
import { css } from 'glamor';
import { createBasicStyleSet } from 'react-film';

export default function createSuggestedActionsStyleSet() {
// This is not CSS, but options to create style set for react-film
return createBasicStyleSet({
export default function createSuggestedActionsStyleSet({
paddingRegular,
transcriptOverlayButtonBackground,
transcriptOverlayButtonBackgroundOnDisabled,
transcriptOverlayButtonBackgroundOnFocus,
transcriptOverlayButtonBackgroundOnHover,
transcriptOverlayButtonColor,
transcriptOverlayButtonColorOnDisabled,
transcriptOverlayButtonColorOnFocus,
transcriptOverlayButtonColorOnHover
}) {
const originalStyleSet = createBasicStyleSet({
cursor: null,
flipperBoxWidth: 40,
flipperSize: 20,
scrollBarHeight: 6,
scrollBarMargin: 2
});

const flipper = css({
'& > div.slider > div': {
background: transcriptOverlayButtonBackground,
color: transcriptOverlayButtonColor,
outline: 0
},

'&:disabled > div.slider > div': {
backgroundColor: transcriptOverlayButtonBackgroundOnDisabled,
color: transcriptOverlayButtonColorOnDisabled
},

'&:focus > div.slider > div': {
backgroundColor: transcriptOverlayButtonBackgroundOnFocus,
color: transcriptOverlayButtonColorOnFocus
},

'&:hover > div.slider > div': {
backgroundColor: transcriptOverlayButtonBackgroundOnHover,
color: transcriptOverlayButtonColorOnHover
}
});

const leftFlipper = css(originalStyleSet.leftFlipper, flipper);
const rightFlipper = css(originalStyleSet.rightFlipper, flipper);
const carousel = css(originalStyleSet.carousel, {
'&:hover, &.scrolling': {
[`& .${ leftFlipper + '' } > div.slider, & .${ rightFlipper + '' } > div.slider`]: {
transitionDelay: '0s'
},
[`& .${ leftFlipper + '' } > div.slider`]: { left: 0 },
[`& .${ rightFlipper + '' } > div.slider`]: { right: 0 }
},

'& > div': {
scrollbarWidth: 'none',

'& > ul > li': {
'&:first-child': {
paddingLeft: paddingRegular / 2
},

'&:last-child': {
paddingRight: paddingRegular / 2
}
}
}
});

// This is not CSS, but options to create style set for react-film
return {
...originalStyleSet,

carousel,
leftFlipper,
rightFlipper
};
}

0 comments on commit fa81cbc

Please sign in to comment.