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

Fix carousel layout #1561

Merged
merged 3 commits into from
Jan 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `connectCarouselFilmStrip`: Fixed `botAvatarInitials` and `userAvatarInitials` functionality from [recent name change](https://github.com/Microsoft/BotFramework-WebChat/pull/1486),
- `BasicTranscript`: Fixed user activity should not be recreated after receive ACK from Direct Line,
- by [@corinagum](https://github.com/corinagum) in PR [#1528](https://github.com/Microsoft/BotFramework-WebChat/pull/1528)
- Fix [#1560](https://github.com/Microsoft/BotFramework-WebChat/issues/1560). Fixed carousel layout did not show date and alignment issues, by [@compulim](https://github.com/compulim) in PR [#1561](https://github.com/Microsoft/BotFramework-WebChat/pull/1561)

### Removed
- `botAvatarImage` and `userAvatarImage` props, as they are moved inside `styleOptions`, in PR [#1486](https://github.com/Microsoft/BotFramework-WebChat/pull/1486)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion __tests__/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ test('setup', async () => {

const base64PNG = await driver.takeScreenshot();

expect(base64PNG).toMatchImageSnapshot();
expect(base64PNG).toMatchImageSnapshot({
failureThreshold: 10,
failureThresholdType: 'pixel'
});
}, 60000);
35 changes: 25 additions & 10 deletions packages/component/src/Styles/StyleSet/CarouselFilmStrip.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,38 @@ export default function ({
return {
// Browser quirks: Firefox has no way to hide scrollbar and while keeping it in function
// https://developer.mozilla.org/en-US/docs/Web/CSS/overflow
marginBottom: -17,
paddingLeft: paddingRegular,
paddingRight: paddingRegular,
'@supports (-moz-appearance: none)': {
marginBottom: -17
},

'& > .avatar': {
marginRight: paddingRegular
},

'& > .content > ul': {
'&:not(:first-child)': {
marginTop: paddingRegular
'& > .content': {
'& > .message': {
marginLeft: paddingRegular
},

'& > ul': {
'&:not(:first-child)': {
marginLeft: paddingRegular,
marginRight: paddingRegular,
marginTop: paddingRegular
},

'& > li': {
maxWidth: bubbleMaxWidth,
minWidth: bubbleMinWidth,

'&:not(:last-child)': {
marginRight: paddingRegular
}
}
},

'& > li': {
marginRight: paddingRegular,
maxWidth: bubbleMaxWidth,
minWidth: bubbleMinWidth
'& > .row': {
marginLeft: paddingRegular
}
}
};
Expand Down