Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
484415d
feat: add Google Sheet URL support in WhatsAppForms and update GraphQ…
akanshaaa19 Dec 5, 2025
7092bac
feat: implement drag-and-drop functionality for form builder screens …
akanshaaa19 Dec 10, 2025
d1bb43f
feat: enhance FormBuilder with content management features including …
akanshaaa19 Dec 11, 2025
989b217
added todo comment
akanshaaa19 Dec 11, 2025
ca52a44
enhance WhatsAppForms configuration with JSON viewer and content mana…
akanshaaa19 Dec 18, 2025
8aeb584
feat: enhance WhatsAppForms configuration with variables management, …
akanshaaa19 Dec 19, 2025
f99e500
feat: implement auto-saving for WhatsApp form revisions and enhance p…
akanshaaa19 Dec 24, 2025
585fe38
feat: update WhatsAppForms configuration and queries to support form …
akanshaaa19 Dec 25, 2025
0cf8342
feat: improve default options for selection content
akanshaaa19 Dec 25, 2025
a9c7000
refactor: Update FormBuilder and related components for improved stat…
akanshaaa19 Dec 25, 2025
b46d7ef
feat: add version history functionality with revert capability for Wh…
akanshaaa19 Dec 26, 2025
7a870bd
feat: enhance media content handling with upload and preview function…
akanshaaa19 Dec 30, 2025
f3b2983
add GET_WHATSAPP_FORM_DEFINITIONS query to retrieve form definitions …
akanshaaa19 Jan 2, 2026
9ada6e2
add validation error handling for form fields and improve user feedba…
akanshaaa19 Jan 2, 2026
a75c708
feat: add confirmation dialog for publishing WhatsApp forms
akanshaaa19 Jan 8, 2026
848506d
update variable handling in WhatsApp forms to support variable names …
akanshaaa19 Jan 12, 2026
b9b357a
Merge branch 'whatsapp-forms-phase-2' of github.com:glific/glific-fro…
akanshaaa19 Jan 13, 2026
55bd1b4
fix: update image source handling to extract base64 data in WhatsApp …
akanshaaa19 Jan 13, 2026
6e12a7a
Fix CSS formatting and add trailing newlines
shijithkjayan Jan 14, 2026
97d56f0
Fix CSS formatting and add missing newlines
shijithkjayan Jan 14, 2026
ce64f02
fix: null check
priyanshu6238 Jan 15, 2026
fb6ced3
test: add test case for configure button
priyanshu6238 Jan 15, 2026
0465185
Merge remote-tracking branch 'origin/whatsapp-forms-phase-2' into wha…
priyanshu6238 Jan 15, 2026
fa0e8e6
test : add test case for preview page
priyanshu6238 Jan 15, 2026
944d379
test: add test case for version file
priyanshu6238 Jan 16, 2026
14f3def
fix: merge conflict
priyanshu6238 Jan 16, 2026
a1139af
fix: revision history +remove meta link
priyanshu6238 Jan 17, 2026
199df50
refactor: flow builder ui + fix: deep scan
priyanshu6238 Jan 17, 2026
0d7a79f
fix: test case
priyanshu6238 Jan 18, 2026
4ab842c
fix: cypress
priyanshu6238 Jan 19, 2026
926a234
Merge remote-tracking branch 'origin/whatsapp-forms-phase-2' into wha…
priyanshu6238 Jan 19, 2026
abb2b77
fix: cypress branch
priyanshu6238 Jan 19, 2026
09361d2
fix: timeout error
priyanshu6238 Jan 19, 2026
96c80c4
add: test case
priyanshu6238 Jan 19, 2026
9c61fef
add: test case + fix: deep scan
priyanshu6238 Jan 19, 2026
10dc37b
fix: test case
priyanshu6238 Jan 19, 2026
e572c71
feat: add view-only mode to form builder components
akanshaaa19 Jan 27, 2026
35d4cf3
fix: update rendering logic for published badge in Configure component
akanshaaa19 Jan 27, 2026
ec07692
fix: format mock revisions for consistency and readability
akanshaaa19 Jan 27, 2026
9bf2553
test: enhance tests for form builder components with improved asserti…
akanshaaa19 Jan 27, 2026
2b7fc3d
test: add tests for screen toggle and content item deletion in Config…
akanshaaa19 Jan 27, 2026
ea4b60b
add tests for image upload and validation in MediaContent component
akanshaaa19 Jan 27, 2026
a39d863
add FileReader mock implementation for image upload tests
akanshaaa19 Jan 27, 2026
b3c40a3
test: update image upload tests to use new file input and improve ass…
akanshaaa19 Jan 27, 2026
9cbdb05
test: add data-testid attributes for file upload and image preview el…
akanshaaa19 Jan 27, 2026
cfb0548
test: enhance Configure component tests with JSON generation and vers…
akanshaaa19 Jan 27, 2026
f6119d2
feat: add validation error indicators for content items and screens i…
akanshaaa19 Jan 27, 2026
38cd752
test: add tests for variable renaming and error notification in Confi…
akanshaaa19 Jan 28, 2026
3369567
refactor: improve JSONViewer and Variables components for better read…
akanshaaa19 Jan 28, 2026
57c7b49
remove unused Dialog imports in JSONViewer component
akanshaaa19 Jan 28, 2026
5b8bb28
minor fixes
akanshaaa19 Jan 29, 2026
9d0d70f
refactor: reorganize imports and improve code structure in Configure,…
akanshaaa19 Jan 29, 2026
8fa3300
delete: remove Preview component test file
akanshaaa19 Jan 29, 2026
f620bed
added test cases and removed unused mocks
akanshaaa19 Jan 29, 2026
6a401c9
fix test cases
akanshaaa19 Jan 30, 2026
45f2818
fix: correct typos and improve error handling in WhatsAppForms and re…
akanshaaa19 Jan 30, 2026
a692d77
Merge branch 'whatsapp-forms-phase-2' of github.com:glific/glific-fro…
akanshaaa19 Jan 30, 2026
150f091
add back navigation button and update tests for WhatsApp Forms
akanshaaa19 Jan 30, 2026
5780ee8
Merge branch 'whatsapp-forms-phase-2' of github.com:glific/glific-fro…
akanshaaa19 Jan 30, 2026
11db481
Merge branch 'whatsapp-forms-phase-2' of github.com:glific/glific-fro…
akanshaaa19 Jan 30, 2026
d74147a
Merge branch 'whatsapp-forms-phase-2' of github.com:glific/glific-fro…
akanshaaa19 Jan 30, 2026
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
2 changes: 2 additions & 0 deletions .github/workflows/cypress-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
git clone https://github.com/glific/glific.git
echo done. go to dir.
cd glific
git checkout whatsapp-forms-phase-2
Copy link

@coderabbitai coderabbitai bot Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Hardcoded feature branch will break CI on master.

This workflow runs on push to master and all PRs. Once merged, CI will fail if whatsapp-forms-phase-2 is deleted or unavailable. This change should either:

  1. Be reverted before merging to master
  2. Use conditional logic to checkout feature branches only when the PR targets them
  3. Add a fallback mechanism
🛠️ Suggested approach using conditional checkout
          cd glific
-          git checkout whatsapp-forms-phase-2
+          # Only checkout feature branch if targeting it; otherwise use master
+          git checkout whatsapp-forms-phase-2 || git checkout master

Or better, parameterize based on the target branch:

          cd glific
          if [[ "${{ github.base_ref }}" == "whatsapp-forms-phase-2" ]]; then
            git checkout whatsapp-forms-phase-2
          fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
git checkout whatsapp-forms-phase-2
cd glific
# Only checkout feature branch if targeting it; otherwise use master
git checkout whatsapp-forms-phase-2 || git checkout master
🤖 Prompt for AI Agents
In @.github/workflows/cypress-testing.yml at line 68, The workflow currently
hardcodes `git checkout whatsapp-forms-phase-2` which will fail on `master`;
update the `.github/workflows/cypress-testing.yml` job to avoid a hardcoded
checkout by adding conditional logic that checks `github.base_ref` or the
current branch before running the checkout, e.g., only run the `git checkout
whatsapp-forms-phase-2` step when the base/target branch equals
`whatsapp-forms-phase-2`, or alternatively remove the hardcoded checkout and use
the default checkout action with a fallback to not fail if the branch is
missing; locate the step containing the literal `git checkout
whatsapp-forms-phase-2` and replace it with the conditional/fallback approach.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

echo done. start dev.secret.exs config
cd priv
mkdir cert
Expand Down Expand Up @@ -96,6 +97,7 @@ jobs:
git clone https://github.com/glific/cypress-testing.git
echo done. go to dir.
cd cypress-testing
git checkout refactor/wa_form
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Same concern: hardcoded cypress feature branch.

The refactor/wa_form branch checkout has the same issue—it will cause CI failures on master and other PRs if the branch is removed.

🛠️ Suggested fix with fallback
          cd cypress-testing
-          git checkout refactor/wa_form
+          git checkout refactor/wa_form || echo "Feature branch not found, using default branch"
          cd ..

Or conditionally:

          cd cypress-testing
          if [[ "${{ github.base_ref }}" == "whatsapp-forms-phase-2" ]]; then
            git checkout refactor/wa_form
          fi
          cd ..
🤖 Prompt for AI Agents
In @.github/workflows/cypress-testing.yml at line 100, The workflow currently
hardcodes a branch with the command git checkout refactor/wa_form which will
break CI if that branch is missing; modify the step that runs git checkout
refactor/wa_form so it only attempts the checkout when the target branch exists
or when the PR/base matches the feature branch (e.g., check GITHUB_BASE_REF or
test for branch existence before checkout), otherwise skip or use a safe
fallback (stay on default branch or fetch the correct ref). Update the
conditional around the git checkout command (the step containing git checkout
refactor/wa_form) to perform this existence/branch check and avoid unconditional
checkout.

cd ..
cp -r cypress-testing/cypress cypress
yarn add [email protected]
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"@appsignal/plugin-window-events": "^1.0.26",
"@appsignal/react": "^1.0.31",
"@date-io/dayjs": "^3.2.0",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@emoji-mart/data": "^1.2.1",
"@emoji-mart/react": "^1.1.1",
"@emotion/react": "^11.14.0",
Expand Down
11 changes: 5 additions & 6 deletions src/containers/TemplateOptions/TemplateOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
import styles from './TemplateOptions.module.css';
import { Fragment, useState } from 'react';
import { useQuery } from '@apollo/client';
import { LIST_WHATSAPP_FORMS } from 'graphql/queries/WhatsAppForm';
import { GET_WHATSAPP_FORM_DEFINITIONS } from 'graphql/queries/WhatsAppForm';
import { getOrganizationServices } from 'services/AuthService';

export interface TemplateOptionsProps {
Expand Down Expand Up @@ -84,16 +84,16 @@ export const TemplateOptions = ({
buttonOptions = BUTTON_OPTIONS.filter((option: any) => option.id !== WHATSAPP_FORM);
}

useQuery(LIST_WHATSAPP_FORMS, {
useQuery(GET_WHATSAPP_FORM_DEFINITIONS, {
variables: {
filter: { status: 'PUBLISHED' },
},
onCompleted: (data) => {
setForms(
data.listWhatsappForms.map((form: any) => ({
label: form.name,
id: form.metaFlowId,
definition: form.revision?.definition,
label: form?.name,
id: form?.metaFlowId,
definition: form?.revision?.definition,
}))
);
},
Expand Down Expand Up @@ -324,7 +324,6 @@ export const TemplateOptions = ({
renderInput={(params) => <TextField {...params} label="Select Form " />}
onChange={(event: any, newValue: any) => {
onInputChange(newValue.id, row, index, 'form_id');

try {
const definition = JSON.parse(newValue.definition);
const screenNames = definition.screens.map((screen: any) => screen.id);
Expand Down
88 changes: 88 additions & 0 deletions src/containers/WhatsAppForms/Configure/Configure.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
.Header {
display: flex;
align-items: center;
padding: 1.5rem;
justify-content: space-between;
background: #f8faf5;
}

.Name {
display: flex;
align-items: center;
gap: 1rem;
}

.BackIcon {
cursor: pointer;
display: flex;
align-items: center;
}

.Header p {
margin: 0;
font-size: 1.2rem;
font-weight: 600;
}

.ConfigureContainer {
display: flex;
height: calc(100vh - 80px);
gap: 20px;
padding: 20px;
background-color: #fff;
position: relative;
}

.FlowBuilder {
flex: 1;
background-color: white;
border-radius: 8px;
border: 1px solid #e0e0e0;
overflow: hidden;
}

.Preview {
width: 400px;
overflow: hidden;
}

.Toggle {
width: 100%;
display: flex;
justify-content: center;
}



.PublishedBadge {
background-color: #d1fae5;
color: #065f46;
padding: 0.25rem 0.5rem;
border-radius: 0.375rem;
font-size: 0.875rem;
font-weight: 500;
margin-left: 1rem;
}

.SavingIndicator {
color: #119656;
font-size: 0.8rem;
font-weight: 500;
margin-right: 1rem;
display: flex;
align-items: center;
gap: 0.4rem;
position: absolute;
right: 0;
}

@media (max-width: 1024px) {
.ConfigureContainer {
flex-direction: column;
}

.Preview {
width: 100%;
height: 600px;
}
}
Loading
Loading