Skip to content

Commit

Permalink
Merge branch 'release/0.36.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Holy committed Nov 30, 2021
2 parents 635f120 + ad786e8 commit 85c4aeb
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 99 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.35.1
0.36.0
93 changes: 21 additions & 72 deletions docs/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@ title: Changelog
sidebar_label: 📝 Changelog
---

## 0.36.0

#### Changes

#### 🚀 Features

- [[#2604](https://github.com/airyhq/airy/issues/2604)] Added attachment toggle for chatplugin [[#2609](https://github.com/airyhq/airy/pull/2609)]

#### 🐛 Bug Fixes

- [[#2154](https://github.com/airyhq/airy/issues/2154)] Fixed add tag behaviour [[#2613](https://github.com/airyhq/airy/pull/2613)]

#### Airy CLI

You can download the Airy CLI for your operating system from the following links:

[MacOS](https://airy-core-binaries.s3.amazonaws.com/0.35.2/darwin/amd64/airy)
[Linux](https://airy-core-binaries.s3.amazonaws.com/0.35.2/linux/amd64/airy)
[Windows](https://airy-core-binaries.s3.amazonaws.com/0.35.2/windows/amd64/airy.exe)

## 0.35.1

#### 🚀 Features
Expand All @@ -13,8 +33,8 @@ sidebar_label: 📝 Changelog
#### 🐛 Bug Fixes

- [[#2605](https://github.com/airyhq/airy/issues/2605)] Fix predefined cli version [[#2607](https://github.com/airyhq/airy/pull/2607)]
- [[#2591](https://github.com/airyhq/airy/issues/2591)] Inbox counter not updating properly [[#2606](https://github.com/airyhq/airy/pull/2606)]
- [[#2536](https://github.com/airyhq/airy/issues/2536)] Fix chatplugin customization bug [[#2592](https://github.com/airyhq/airy/pull/2592)]
- [[#2591](https://github.com/airyhq/airy/issues/2591)] Inbox counter not updating properly [[#2606](https://github.com/airyhq/airy/pull/2606)]

#### 📚 Documentation

Expand Down Expand Up @@ -1143,74 +1163,3 @@ You can download the Airy CLI for your operating system from the following links
[Linux](https://airy-core-binaries.s3.amazonaws.com/0.15.0/linux/amd64/airy)
[Windows](https://airy-core-binaries.s3.amazonaws.com/0.15.0/windows/amd64/airy.exe)

## 0.14.0

#### Changes

- Docs/1301 add docs for twilio sources [[#1332](https://github.com/airyhq/airy/pull/1332)]
- Bump webpack-cli from 3.3.12 to 4.5.0 [[#1287](https://github.com/airyhq/airy/pull/1287)]
- Bump css-loader from 3.6.0 to 5.1.3 [[#1320](https://github.com/airyhq/airy/pull/1320)]
- Bump react-window from 1.8.5 to 1.8.6 [[#1309](https://github.com/airyhq/airy/pull/1309)]
- Bump react-window-infinite-loader from 1.0.5 to 1.0.7 [[#1286](https://github.com/airyhq/airy/pull/1286)]
- [[#1235](https://github.com/airyhq/airy/issues/1235)] Add test to connect a chatplugin channel [[#1269](https://github.com/airyhq/airy/pull/1269)]

#### 🚀 Features

- [[#1312](https://github.com/airyhq/airy/issues/1312)] Add users.list [[#1333](https://github.com/airyhq/airy/pull/1333)]
- [[#1049](https://github.com/airyhq/airy/issues/1049)] Script that executes all integration tests [[#1344](https://github.com/airyhq/airy/pull/1344)]
- [[#970](https://github.com/airyhq/airy/issues/970)] Improved ui components docs [[#1341](https://github.com/airyhq/airy/pull/1341)]
- [[#1272](https://github.com/airyhq/airy/issues/1272)] Make cypress tests independent from each other [[#1317](https://github.com/airyhq/airy/pull/1317)]
- [[#1328](https://github.com/airyhq/airy/issues/1328)] Develop version of airy CLI is not… [[#1330](https://github.com/airyhq/airy/pull/1330)]
- [[#1267](https://github.com/airyhq/airy/issues/1267)] Created generic logo component [[#1329](https://github.com/airyhq/airy/pull/1329)]
- [[#677](https://github.com/airyhq/airy/issues/677)] Render Suggested Replies [[#1324](https://github.com/airyhq/airy/pull/1324)]
- [[#1036](https://github.com/airyhq/airy/issues/1036)] API key authentication [[#1316](https://github.com/airyhq/airy/pull/1316)]
- [[#968](https://github.com/airyhq/airy/issues/968)] Improve UI/Inbox docs [[#1280](https://github.com/airyhq/airy/pull/1280)]
- [[#1041](https://github.com/airyhq/airy/issues/1041)] Minikube provider [[#1179](https://github.com/airyhq/airy/pull/1179)]
- [[#1278](https://github.com/airyhq/airy/issues/1278)] GIFs in docs are too large [[#1295](https://github.com/airyhq/airy/pull/1295)]
- [[#1281](https://github.com/airyhq/airy/issues/1281)] Added RichCard and RichCardCarousel to google [[#1288](https://github.com/airyhq/airy/pull/1288)]
- [[#1222](https://github.com/airyhq/airy/issues/1222)] Improved structure in channels pages [[#1271](https://github.com/airyhq/airy/pull/1271)]
- [[#1270](https://github.com/airyhq/airy/issues/1270)] Installation: Toggle broken \& Update for… [[#1273](https://github.com/airyhq/airy/pull/1273)]
- [[#1050](https://github.com/airyhq/airy/issues/1050)] Add test for filtering and creating a tag [[#1252](https://github.com/airyhq/airy/pull/1252)]

#### 🐛 Bug Fixes

- [[#1239](https://github.com/airyhq/airy/issues/1239)] Fix message wrapper for render library [[#1297](https://github.com/airyhq/airy/pull/1297)]
- [[#1306](https://github.com/airyhq/airy/issues/1306)] Fix contact metadata problem [[#1349](https://github.com/airyhq/airy/pull/1349)]
- [[#1343](https://github.com/airyhq/airy/issues/1343)] Save button doesn't work for adding a… [[#1347](https://github.com/airyhq/airy/pull/1347)]
- [[#1298](https://github.com/airyhq/airy/issues/1298)] MessageTextArea in inbox doesn't shrink… [[#1340](https://github.com/airyhq/airy/pull/1340)]
- [[#1303](https://github.com/airyhq/airy/issues/1303)] Long messages from contacts shrink the… [[#1334](https://github.com/airyhq/airy/pull/1334)]
- [[#1267](https://github.com/airyhq/airy/issues/1267)] Updated sourceLogo component [[#1331](https://github.com/airyhq/airy/pull/1331)]
- [[#1041](https://github.com/airyhq/airy/issues/1041)] follow up fix: missing quotes in web dev script [[#1311](https://github.com/airyhq/airy/pull/1311)]
- [[#1090](https://github.com/airyhq/airy/issues/1090)] Add fallback image to channels [[#1254](https://github.com/airyhq/airy/pull/1254)]

#### 📚 Documentation

- [[#1323](https://github.com/airyhq/airy/issues/1323)] Fix minikube command [[#1327](https://github.com/airyhq/airy/pull/1327)]
- [[#1314](https://github.com/airyhq/airy/issues/1314)] Have one TLDR [[#1315](https://github.com/airyhq/airy/pull/1315)]
- [[#1264](https://github.com/airyhq/airy/issues/1264)] Prepare config page for the new milestone [[#1308](https://github.com/airyhq/airy/pull/1308)]
- [[#1265](https://github.com/airyhq/airy/issues/1265)] Merge cheatsheet from introduction into reference [[#1277](https://github.com/airyhq/airy/pull/1277)]
- [[#969](https://github.com/airyhq/airy/issues/969)] Cleanup tag docs [[#1275](https://github.com/airyhq/airy/pull/1275)]
- [[#1263](https://github.com/airyhq/airy/issues/1263)] Airy Core Components: Move to own page [[#1276](https://github.com/airyhq/airy/pull/1276)]

#### 🧰 Maintenance

- Fix build [[#1346](https://github.com/airyhq/airy/pull/1346)]
- Bump react-redux from 7.2.2 to 7.2.3 [[#1335](https://github.com/airyhq/airy/pull/1335)]
- Bump @babel/preset-env from 7.13.10 to 7.13.12 [[#1336](https://github.com/airyhq/airy/pull/1336)]
- Bump @typescript-eslint/parser from 4.18.0 to 4.19.0 [[#1337](https://github.com/airyhq/airy/pull/1337)]
- Remove ejs compiled loader [[#1322](https://github.com/airyhq/airy/pull/1322)]
- Invert icons on darkTheme [[#1319](https://github.com/airyhq/airy/pull/1319)]
- Bump style-loader from 1.3.0 to 2.0.0 [[#1313](https://github.com/airyhq/airy/pull/1313)]
- Bump redux-starter-kit from 0.8.1 to 2.0.0 [[#1296](https://github.com/airyhq/airy/pull/1296)]
- Bump node-sass from 4.14.0 to 5.0.0 [[#1226](https://github.com/airyhq/airy/pull/1226)]
- Bump @svgr/webpack from 5.4.0 to 5.5.0 [[#1257](https://github.com/airyhq/airy/pull/1257)]
- Bump @types/node from 12.11.1 to 14.14.35 [[#1258](https://github.com/airyhq/airy/pull/1258)]

#### Airy CLI

You can download the Airy CLI for your operating system from the following links:

[MacOS](https://airy-core-binaries.s3.amazonaws.com/0.14.0/darwin/amd64/airy)
[Linux](https://airy-core-binaries.s3.amazonaws.com/0.14.0/linux/amd64/airy)
[Windows](https://airy-core-binaries.s3.amazonaws.com/0.14.0/windows/amd64/airy.exe)

Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
align-self: flex-end;
cursor: pointer;
margin-bottom: 1px;
margin-left: 8px;
display: flex;
align-items: center;
justify-content: center;
Expand Down Expand Up @@ -176,12 +177,6 @@
}
}

.iconContainer {
display: flex;
flex-direction: row;
margin-right: 8px;
}

.smileyIcon {
height: 20px;
width: 20px;
Expand Down
55 changes: 38 additions & 17 deletions frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const AiryInputBar = (props: AiryInputBarProps) => {
});
};

const InputOptions = () => {
const EmojiInput = () => {
const handleEmojiDrawer = () => {
if (isShowingEmojiDrawer) {
textInputRef.current && textInputRef.current.focus();
Expand Down Expand Up @@ -151,6 +151,24 @@ const AiryInputBar = (props: AiryInputBarProps) => {
handleEmojiDrawer();
};

return (
<div>
{isShowingEmojiDrawer && (
<div ref={emojiDiv} className={style.emojiDrawer}>
<EmojiPickerWrapper addEmoji={addEmoji} />
</div>
)}
{!uploadedFileUrl && (
<button className={style.iconButton} type="button" onClick={handleEmojiDrawer}>
<div className={style.actionToolTip}>Emojis</div>
<Smiley aria-hidden className={style.smileyIcon} />
</button>
)}
</div>
);
};

const AttachmentInput = () => {
const openFileSelector = () => {
fileRef.current.click();
};
Expand All @@ -161,19 +179,22 @@ const AiryInputBar = (props: AiryInputBarProps) => {
uploadFile(file);
};

const acceptedFileTypes = (): string => {
const supportedTypes = [''];
const supportedImageTypes = '.jpg, .jpeg, .png, .webp, .heic, ';
const supportedVideoTypes = '.mp4, .MOV, ';
const supportedFileTypes = '.pdf, .svg, ';
!config.hideImages && supportedTypes.push(supportedImageTypes);
!config.hideVideos && supportedTypes.push(supportedVideoTypes);
!config.hideFiles && supportedTypes.push(supportedFileTypes);

return supportedTypes.join();
};

return (
<div>
{isShowingEmojiDrawer && (
<div ref={emojiDiv} className={style.emojiDrawer}>
<EmojiPickerWrapper addEmoji={addEmoji} />
</div>
)}
<>
{!uploadedFileUrl && (
<div className={style.iconContainer}>
<button className={style.iconButton} type="button" onClick={handleEmojiDrawer}>
<div className={style.actionToolTip}>Emojis</div>
<Smiley aria-hidden className={style.smileyIcon} />
</button>
<>
<button className={style.iconButton} type="button" onClick={openFileSelector}>
<div className={style.actionToolTip}>Files</div>
<PaperClip aria-hidden className={style.paperclipIcon} />
Expand All @@ -186,12 +207,11 @@ const AiryInputBar = (props: AiryInputBarProps) => {
name="file"
onChange={selectedFile}
className={style.fileInput}
// accept=".png, .jpg, .jpeg, .mp4, .pdf, .vcf"
accept=".jpeg, .jpg, .gif, .png, .webp, .heic, .svg, .pdf"
accept={acceptedFileTypes()}
/>
</div>
</>
)}
</div>
</>
);
};

Expand Down Expand Up @@ -232,7 +252,8 @@ const AiryInputBar = (props: AiryInputBarProps) => {
)}

<div className={style.buttonContainer}>
{!(config.hideEmojis === true) && <InputOptions />}
{!(config.hideEmojis === true) && <EmojiInput />}
{!(config.hideAttachments === true) && <AttachmentInput />}
<button className={style.sendButton} type="submit" data-cy={dataCyButtonId}>
{config?.sendMessageIcon ? <img src={config.sendMessageIcon} alt={'send message'} /> : <Paperplane />}
</button>
Expand Down
4 changes: 4 additions & 0 deletions frontend/chat-plugin/lib/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ export type Config = {
closeMode?: 'basic' | 'medium' | 'full';
hideInputBar?: boolean;
hideEmojis?: boolean;
hideAttachments?: boolean;
hideImages?: boolean;
hideVideos?: boolean;
hideFiles?: boolean;
};

export type AuthConfiguration = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {createRef} from 'react';
import React, {createRef, useEffect} from 'react';
import {Button, Dropdown, Input, ListenOutsideClick, Toggle} from 'components';
import styles from './CustomiseSection.module.scss';
import {SketchPicker} from 'react-color';
Expand Down Expand Up @@ -79,11 +79,19 @@ export const CustomiseSection = ({channelId, host}: CustomiseSectionProps) => {
const [disableMobile, setDisableMobile] = useLocalState('disableMobile', false);
const [hideInputBar, setHideInputBar] = useLocalState('hideInputBar', false);
const [hideEmojis, setHideEmojis] = useLocalState('hideEmojis', false);
const [hideAttachments, setHideAttachments] = useLocalState('hideAttachments', false);
const [hideImages, setHideImages] = useLocalState('hideImages', false);
const [hideVideos, setHideVideos] = useLocalState('hideVideos', false);
const [hideFiles, setHideFiles] = useLocalState('hideFiles', false);
const [closingOption, setClosingOption] = useLocalState<CloseOption>('closingOption', CloseOption.full);
const [bubbleState, setBubbleState] = useLocalState<BubbleState>('bubbleState', BubbleState.expanded);

const codeAreaRef = createRef<HTMLTextAreaElement>();

useEffect(() => {
hideImages && hideVideos && hideFiles ? setHideAttachments(true) : setHideAttachments(false);
}, [hideImages, hideVideos, hideFiles]);

const toggleShowHeaderTextColorPicker = () => {
setShowHeaderTextColorPicker(!showHeaderTextColorPicker);
};
Expand Down Expand Up @@ -143,6 +151,10 @@ export const CustomiseSection = ({channelId, host}: CustomiseSectionProps) => {
`disableMobile: '${disableMobile}'`,
`hideInputBar: '${hideInputBar}'`,
`hideEmojis: '${hideEmojis}'`,
`hideAttachments: '${hideAttachments}'`,
`hideImages: '${hideImages}'`,
`hideVideos: '${hideVideos}'`,
`hideFiles: '${hideFiles}'`,
];

return `w[n].config = {${'\n '}${config.filter(it => it !== '').join(',\n ')}\n };`;
Expand Down Expand Up @@ -174,6 +186,10 @@ export const CustomiseSection = ({channelId, host}: CustomiseSectionProps) => {
...(disableMobile && {disableMobile: disableMobile}),
...(hideInputBar && {hideInputBar: hideInputBar}),
...(hideEmojis && {hideEmojis: hideEmojis}),
...(hideAttachments && {hideAttachments: hideAttachments}),
...(hideImages && {hideImages: hideImages}),
...(hideVideos && {hideVideos: hideVideos}),
...(hideFiles && {hideFiles: hideFiles}),
},
};

Expand Down Expand Up @@ -711,6 +727,18 @@ export const CustomiseSection = ({channelId, host}: CustomiseSectionProps) => {
<div className={styles.extraOptions}>
<Toggle value={hideEmojis} text="Disable Emojis" updateValue={(value: boolean) => setHideEmojis(value)} />
</div>
<div>
<p>Supported file types:</p>
<div className={styles.extraOptions}>
<Toggle value={hideImages} text="Disable Images" updateValue={(value: boolean) => setHideImages(value)} />
</div>
<div className={styles.extraOptions}>
<Toggle value={hideVideos} text="Disable Videos" updateValue={(value: boolean) => setHideVideos(value)} />
</div>
<div className={styles.extraOptions}>
<Toggle value={hideFiles} text="Disable Files" updateValue={(value: boolean) => setHideFiles(value)} />
</div>
</div>
</div>
<div
className={styles.pluginWrapper}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
width: 290px;
height: auto;
flex-direction: column;
overflow: hidden;
overflow: auto;
background-color: #fff;
margin: 0 0 0 8px;
padding: 16px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ const ConversationMetadata = (props: ConnectedProps<typeof connector>) => {

const addTag = (tag: TagModel) => {
addTagToConversation(conversation.id, tag.id);
setShowTagsDialog(false);
};

const removeTag = (tag: TagModel) => {
Expand Down Expand Up @@ -120,6 +119,7 @@ const ConversationMetadata = (props: ConnectedProps<typeof connector>) => {
createTag({name: tagName.trim(), color}).then((tag: TagModel) => {
if (tag) {
addTag(tag);
setShowTagsDialog(false);
}
});
}
Expand Down

0 comments on commit 85c4aeb

Please sign in to comment.