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

Attachments background and fonts handled when WC will be bumped to 4.8 #2088

Merged
merged 4 commits into from
Mar 3, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
//

:export { bubbleContentColor: var(--bubble-text-color); }
:export { bubbleBackground: var(--webchat-user-bubble-bg); }

.chat {
background-color: white;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This is a generated file. Changes are likely to result in being overwritten
export const bubbleContentColor: string;
export const bubbleBackground: string;
export const chat: string;
export const disconnected: string;
export const chatActivity: string;
Expand Down
21 changes: 13 additions & 8 deletions packages/app/client/src/ui/editor/emulator/parts/chat/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,22 @@ export class Chat extends PureComponent<ChatProps, ChatState> {
const styleSet = createStyleSet({ ...webChatStyleOptions, hideSendBox: isDisabled });

// Overriding default styles of webchat as these properties are not exposed directly
styleSet.uploadButton = {
...styleSet.uploadButton,
padding: '1px',
};
styleSet.uploadAttachment = {
...styleSet.uploadAttachment,
'& > .name, & > .size': {
styleSet.fileContent = {
...styleSet.fileContent,
background: styles.bubbleBackground,
'& .webchat__fileContent__fileName': {
color: styles.bubbleContentColor,
},
'& .webchat__fileContent__size': {
color: styles.bubbleContentColor,
},
'& .webchat__fileContent__downloadIcon': {
fill: styles.bubbleContentColor,
},
'& .webchat__fileContent__badge': {
padding: '4px',
},
};
styleSet.downloadAttachment = updateDownloadAttachmentStyle(styleSet.downloadAttachment);
srinaath marked this conversation as resolved.
Show resolved Hide resolved

if (directLine) {
const bot = {
Expand Down