diff --git a/VERSION b/VERSION index 731b95d7fc..93d4c1ef06 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.35.1 +0.36.0 diff --git a/docs/docs/changelog.md b/docs/docs/changelog.md index 2870bac4a2..88b67c645e 100644 --- a/docs/docs/changelog.md +++ b/docs/docs/changelog.md @@ -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 @@ -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 @@ -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) - diff --git a/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.module.scss b/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.module.scss index e17a01a048..c4c625764f 100644 --- a/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.module.scss +++ b/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.module.scss @@ -106,6 +106,7 @@ align-self: flex-end; cursor: pointer; margin-bottom: 1px; + margin-left: 8px; display: flex; align-items: center; justify-content: center; @@ -176,12 +177,6 @@ } } -.iconContainer { - display: flex; - flex-direction: row; - margin-right: 8px; -} - .smileyIcon { height: 20px; width: 20px; diff --git a/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.tsx b/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.tsx index 91cfe095f8..72fb2f32a8 100644 --- a/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.tsx +++ b/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.tsx @@ -106,7 +106,7 @@ const AiryInputBar = (props: AiryInputBarProps) => { }); }; - const InputOptions = () => { + const EmojiInput = () => { const handleEmojiDrawer = () => { if (isShowingEmojiDrawer) { textInputRef.current && textInputRef.current.focus(); @@ -151,6 +151,24 @@ const AiryInputBar = (props: AiryInputBarProps) => { handleEmojiDrawer(); }; + return ( +
+ {isShowingEmojiDrawer && ( +
+ +
+ )} + {!uploadedFileUrl && ( + + )} +
+ ); + }; + + const AttachmentInput = () => { const openFileSelector = () => { fileRef.current.click(); }; @@ -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 ( -
- {isShowingEmojiDrawer && ( -
- -
- )} + <> {!uploadedFileUrl && ( -
- + <>
+ )} -
+ ); }; @@ -232,7 +252,8 @@ const AiryInputBar = (props: AiryInputBarProps) => { )}
- {!(config.hideEmojis === true) && } + {!(config.hideEmojis === true) && } + {!(config.hideAttachments === true) && } diff --git a/frontend/chat-plugin/lib/src/config.ts b/frontend/chat-plugin/lib/src/config.ts index eaaadbcd2b..e9b2046611 100644 --- a/frontend/chat-plugin/lib/src/config.ts +++ b/frontend/chat-plugin/lib/src/config.ts @@ -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 = { diff --git a/frontend/ui/src/pages/Channels/Providers/Airy/ChatPlugin/sections/CustomiseSection.tsx b/frontend/ui/src/pages/Channels/Providers/Airy/ChatPlugin/sections/CustomiseSection.tsx index 672eb02e81..487c467077 100644 --- a/frontend/ui/src/pages/Channels/Providers/Airy/ChatPlugin/sections/CustomiseSection.tsx +++ b/frontend/ui/src/pages/Channels/Providers/Airy/ChatPlugin/sections/CustomiseSection.tsx @@ -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'; @@ -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('closingOption', CloseOption.full); const [bubbleState, setBubbleState] = useLocalState('bubbleState', BubbleState.expanded); const codeAreaRef = createRef(); + useEffect(() => { + hideImages && hideVideos && hideFiles ? setHideAttachments(true) : setHideAttachments(false); + }, [hideImages, hideVideos, hideFiles]); + const toggleShowHeaderTextColorPicker = () => { setShowHeaderTextColorPicker(!showHeaderTextColorPicker); }; @@ -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 };`; @@ -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}), }, }; @@ -711,6 +727,18 @@ export const CustomiseSection = ({channelId, host}: CustomiseSectionProps) => {
setHideEmojis(value)} />
+
+

Supported file types:

+
+ setHideImages(value)} /> +
+
+ setHideVideos(value)} /> +
+
+ setHideFiles(value)} /> +
+
) => { const addTag = (tag: TagModel) => { addTagToConversation(conversation.id, tag.id); - setShowTagsDialog(false); }; const removeTag = (tag: TagModel) => { @@ -120,6 +119,7 @@ const ConversationMetadata = (props: ConnectedProps) => { createTag({name: tagName.trim(), color}).then((tag: TagModel) => { if (tag) { addTag(tag); + setShowTagsDialog(false); } }); }