From 5f71f61fae9c2781f852354826bdacc3afc2564c Mon Sep 17 00:00:00 2001 From: mdshamoon Date: Thu, 14 Mar 2024 15:19:52 +0530 Subject: [PATCH 1/5] few fixes --- src/containers/Auth/Promotion/Promotion.tsx | 20 ++++++------------- .../ConversationList/ConversationList.tsx | 2 +- .../Chat/ChatInterface/ChatInterface.tsx | 18 ++++++++++++----- .../ChatMessage/ChatMessage.module.css | 2 +- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/containers/Auth/Promotion/Promotion.tsx b/src/containers/Auth/Promotion/Promotion.tsx index d29c3f441..9294dbcad 100644 --- a/src/containers/Auth/Promotion/Promotion.tsx +++ b/src/containers/Auth/Promotion/Promotion.tsx @@ -15,7 +15,7 @@ export const Promotion = () => {
NEW!
{minimized ? ( <> -
New Website Address!
+
New Look Alert!
setMinimized(!minimized)} @@ -34,27 +34,19 @@ export const Promotion = () => {
{1}
- We're Moving: tides.coloredcow.com is changing to{' '} - glific.com! To access your Glific account use{' '} - {hostname}.glific.com - instead of{' '} - - {hostname} - .tides.coloredcow.com - + Big News: Glific gets a fresh interface starting March 12th! We've + improved our design for a better experience.
2
- What this means? {hostname}.tides.coloredcow.com - page will become inactive on 31st March. Bookmark the new Glific address right away + What It Means: From March 12th, enjoy Glific's sleek, modern look, + making navigation smoother.
-
- Note: Please ignore if you already have a glific.com account -
+
Discover the new Glific. We're excited for you to see the updates!
{/* diff --git a/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx b/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx index 1a9e3b69b..d616fff95 100644 --- a/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx +++ b/src/containers/Chat/ChatConversations/ConversationList/ConversationList.tsx @@ -264,7 +264,7 @@ export const ConversationList = ({ } return ( - + {index === 0 ? header : null} { + const currentTab = tabs.filter((tab) => location.pathname === tab.link); + if (currentTab && currentTab.length) { + setValue(currentTab[0].link); + } + }, [location]); + if (loading) return ; if (error) { setErrorMessage(error); diff --git a/src/containers/Chat/ChatMessages/ChatMessage/ChatMessage.module.css b/src/containers/Chat/ChatMessages/ChatMessage/ChatMessage.module.css index 050f05c36..e0867a47d 100644 --- a/src/containers/Chat/ChatMessages/ChatMessage/ChatMessage.module.css +++ b/src/containers/Chat/ChatMessages/ChatMessage/ChatMessage.module.css @@ -73,7 +73,7 @@ } .Content { - font-size: 16px; + font-size: 14px; font-weight: 400; line-height: 20px; color: #073f24; From b8a0d3e26259b91187942925664257347c206d46 Mon Sep 17 00:00:00 2001 From: mdshamoon Date: Thu, 14 Mar 2024 15:27:49 +0530 Subject: [PATCH 2/5] deepscan fixes --- src/containers/Auth/Promotion/Promotion.tsx | 2 -- src/containers/Chat/ChatInterface/ChatInterface.tsx | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/containers/Auth/Promotion/Promotion.tsx b/src/containers/Auth/Promotion/Promotion.tsx index 9294dbcad..102c26987 100644 --- a/src/containers/Auth/Promotion/Promotion.tsx +++ b/src/containers/Auth/Promotion/Promotion.tsx @@ -3,8 +3,6 @@ import MinimizeIcon from 'assets/images/icons/Minimize.svg?react'; import MaximizeIcon from 'assets/images/icons/Maximize.svg?react'; import styles from './Promotion.module.css'; -const hostname = location.hostname.replace('.glific.com', ''); - export const Promotion = () => { const [minimized, setMinimized] = useState(false); diff --git a/src/containers/Chat/ChatInterface/ChatInterface.tsx b/src/containers/Chat/ChatInterface/ChatInterface.tsx index 9601f572a..dbcae0ff7 100644 --- a/src/containers/Chat/ChatInterface/ChatInterface.tsx +++ b/src/containers/Chat/ChatInterface/ChatInterface.tsx @@ -73,7 +73,7 @@ export const ChatInterface = ({ savedSearches, collectionType }: ChatInterfacePr useEffect(() => { const currentTab = tabs.filter((tab) => location.pathname === tab.link); - if (currentTab && currentTab.length) { + if (currentTab.length) { setValue(currentTab[0].link); } }, [location]); From 341e6b8d8811e223927dbc39240fc8afb5e96791 Mon Sep 17 00:00:00 2001 From: mdshamoon Date: Thu, 14 Mar 2024 15:52:04 +0530 Subject: [PATCH 3/5] few more fixes --- src/components/UI/Heading/Heading.module.css | 9 +++- src/components/UI/Heading/Heading.tsx | 13 +++++- src/containers/List/List.tsx | 42 ++++++++++--------- .../Profile/Contact/ContactProfile.tsx | 6 ++- static.json | 2 +- vite.config.ts | 2 +- 6 files changed, 48 insertions(+), 26 deletions(-) diff --git a/src/components/UI/Heading/Heading.module.css b/src/components/UI/Heading/Heading.module.css index 21edd3575..03fbb8e55 100644 --- a/src/components/UI/Heading/Heading.module.css +++ b/src/components/UI/Heading/Heading.module.css @@ -12,10 +12,9 @@ } .HeadingTitle { - vertical-align: middle; color: #191c1a; display: flex; - align-items: first baseline; + align-items: center; font-weight: 700; font-size: 38px; } @@ -33,3 +32,9 @@ .TitleText { margin-right: 8px; } + +.BackIcon { + margin-left: -10px; + margin-right: 10px; + cursor: pointer; +} diff --git a/src/components/UI/Heading/Heading.tsx b/src/components/UI/Heading/Heading.tsx index 645ac9c53..b60f587a7 100644 --- a/src/components/UI/Heading/Heading.tsx +++ b/src/components/UI/Heading/Heading.tsx @@ -1,17 +1,28 @@ +import { useNavigate } from 'react-router-dom'; import HelpIcon from '../HelpIcon/HelpIcon'; import styles from './Heading.module.css'; +import BackIcon from 'assets/images/icons/BackIconFlow.svg?react'; export interface HeadingProps { formTitle: string; helpData?: any; showHeaderHelp?: boolean; + backLink?: string; } -export const Heading = ({ formTitle, helpData, showHeaderHelp = true }: HeadingProps) => { +export const Heading = ({ formTitle, helpData, showHeaderHelp = true, backLink }: HeadingProps) => { + const navigate = useNavigate(); return (
+ {backLink && ( + navigate(backLink)} + className={styles.BackIcon} + data-testid="back-button" + /> + )}
{formTitle}
{helpData ? : ''}
diff --git a/src/containers/List/List.tsx b/src/containers/List/List.tsx index dede20a25..0de97de38 100644 --- a/src/containers/List/List.tsx +++ b/src/containers/List/List.tsx @@ -62,27 +62,27 @@ const actionListMap = (item: any, actionList: any, hasMoreOption: boolean) => { if (action.link) { return ( - - + + {action.icon} - - + + ); } if (action.dialog) { return ( - action.dialog(additionalActionParameter, item)} - key={key} - > - + + action.dialog(additionalActionParameter, item)} + key={key} + > {action.icon} - - + {' '} + ); } return null; @@ -485,13 +485,15 @@ export const List = ({ if (editSupport) { editButton = allowedAction.edit && ( - -
-
- + + +
+
+ +
-
- + + ); } diff --git a/src/containers/Profile/Contact/ContactProfile.tsx b/src/containers/Profile/Contact/ContactProfile.tsx index af4d138f9..5aab87a2c 100644 --- a/src/containers/Profile/Contact/ContactProfile.tsx +++ b/src/containers/Profile/Contact/ContactProfile.tsx @@ -201,7 +201,11 @@ export const ContactProfile = () => { return ( <> - + {drawer} {profileBodyContent} diff --git a/static.json b/static.json index 87d79f663..717cc26ed 100644 --- a/static.json +++ b/static.json @@ -9,7 +9,7 @@ "X-Content-Type-Options": "nosniff", "X-XSS-Protection": "1; mode=block", "X-Frame-Options": "deny", - "Content-Security-Policy": "default-src * data:; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:; script-src-elem 'self' 'unsafe-inline' https://www.google.com https://www.gstatic.com; frame-src 'self' https://www.google.com https://www.gstatic.com data:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' data: https://fonts.gstatic.com; connect-src *;", + "Content-Security-Policy": "default-src * data:; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:; script-src-elem 'self' 'unsafe-inline' https://www.google.com https://www.gstatic.com https://js.stripe.com; frame-src 'self' https://js.stripe.com https://www.google.com https://www.gstatic.com data:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' data: https://fonts.gstatic.com; connect-src *;", "Strict-Transport-Security": "max-age=63072000; includeSubdomains; preload" } } diff --git a/vite.config.ts b/vite.config.ts index 729920e45..94f94900e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -65,7 +65,7 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => { 'X-XSS-Protection': '1; mode=block', 'X-Frame-Options': 'deny', 'Content-Security-Policy': - "default-src * data:; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:; script-src-elem 'self' 'unsafe-inline' https://www.google.com https://www.gstatic.com; frame-src 'self' https://www.google.com https://www.gstatic.com data:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' data: https://fonts.gstatic.com; connect-src *;", + "default-src * data:; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:; script-src-elem 'self' 'unsafe-inline' https://www.google.com https://www.gstatic.com https://js.stripe.com ; frame-src 'self' https://js.stripe.com/ https://www.google.com https://www.gstatic.com data:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' data: https://fonts.gstatic.com; connect-src *;", 'Strict-Transport-Security': 'max-age=63072000; includeSubdomains; preload', }, }, From 82d392f63bbf178eff97448eb013a2532d2569f1 Mon Sep 17 00:00:00 2001 From: mdshamoon Date: Thu, 14 Mar 2024 16:02:52 +0530 Subject: [PATCH 4/5] some more issues --- .../UI/Form/WhatsAppEditor/WhatsAppEditor.tsx | 4 +--- .../ChatMessages/AddVariables/AddVariables.module.css | 4 ++++ .../Chat/ChatMessages/AddVariables/AddVariables.tsx | 5 ++++- .../Chat/ChatMessages/ChatInput/ChatInput.tsx | 10 ++++------ 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/components/UI/Form/WhatsAppEditor/WhatsAppEditor.tsx b/src/components/UI/Form/WhatsAppEditor/WhatsAppEditor.tsx index b82ec7e23..3f4f34e05 100644 --- a/src/components/UI/Form/WhatsAppEditor/WhatsAppEditor.tsx +++ b/src/components/UI/Form/WhatsAppEditor/WhatsAppEditor.tsx @@ -44,9 +44,7 @@ export const WhatsAppEditor = ({ }; useEffect(() => { - if (readOnly) { - editor.setEditable(false); - } + editor.setEditable(!readOnly); }, [readOnly]); useEffect(() => { diff --git a/src/containers/Chat/ChatMessages/AddVariables/AddVariables.module.css b/src/containers/Chat/ChatMessages/AddVariables/AddVariables.module.css index e05594a37..5ccbf111d 100644 --- a/src/containers/Chat/ChatMessages/AddVariables/AddVariables.module.css +++ b/src/containers/Chat/ChatMessages/AddVariables/AddVariables.module.css @@ -1,3 +1,7 @@ .TemplateText { margin-bottom: 8px; } + +.Field { + margin-top: 16px; +} diff --git a/src/containers/Chat/ChatMessages/AddVariables/AddVariables.tsx b/src/containers/Chat/ChatMessages/AddVariables/AddVariables.tsx index 1e1a1e62a..96a1efdea 100644 --- a/src/containers/Chat/ChatMessages/AddVariables/AddVariables.tsx +++ b/src/containers/Chat/ChatMessages/AddVariables/AddVariables.tsx @@ -95,6 +95,7 @@ export const AddVariables = ({ syncInitialValuesWithFormik(newInputValue, index); }, label: `Variable ${index}`, + placeholder: `Variable ${index}`, }); } @@ -143,7 +144,9 @@ export const AddVariables = ({
{template?.body}
{formFieldItems.map((field: any) => ( - +
+ +
))}
diff --git a/src/containers/Chat/ChatMessages/ChatInput/ChatInput.tsx b/src/containers/Chat/ChatMessages/ChatInput/ChatInput.tsx index 0468c8ea0..f5f7723c8 100644 --- a/src/containers/Chat/ChatMessages/ChatInput/ChatInput.tsx +++ b/src/containers/Chat/ChatMessages/ChatInput/ChatInput.tsx @@ -416,9 +416,8 @@ export const ChatInput = ({ > {dialog} - - {open ? ( -