-
Notifications
You must be signed in to change notification settings - Fork 19
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
Preview web custom html #358
base: develop
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…k into preview-web-custom-html
) | ||
} | ||
break | ||
default: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a debug log to trace the default case with the payload details, will help in debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are made by @ThisIsRaghavGupta . I just took a pull from his branch.
if (parentWindow) { | ||
parentWindow.postMessage({ message: 'builder', originUrl: window.location.href }, '*') | ||
} | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add break after each case and return in the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are made by @ThisIsRaghavGupta . I just took a pull from his branch
@@ -43,8 +43,9 @@ import NotificationHandler from './modules/notification' | |||
import { hasWebInboxSettingsInLS, checkAndRegisterWebInboxElements, initializeWebInbox, getInboxMessages, saveInboxMessages } from './modules/web-inbox/helper' | |||
import { Variable } from './modules/variables/variable' | |||
import VariableStore from './modules/variables/variableStore' | |||
import { checkBuilder, addAntiFlicker } from './modules/visualBuilder/pageBuilder' | |||
import { addAntiFlicker, handleActionMode } from './modules/visualBuilder/pageBuilder' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the details about the changes in PR Template.
Changelog and version bump is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please squash the commits into 2-3 meaningful commits to avoid rebasing issues for fellow collaborators.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will squash the commits and add change log and version bump before merging the PR to develop as I don't know when to merge this
… preview-web-custom-html
PR review changes
04890c3
to
98ab394
Compare
Changes
Added support to preview custom html for custom html template for web native display.
We use post message proxy to implement this. When user enters the url I add a search param ctActionMode with value ctCustomHtmlPreview and open it using window.open() and I add an event listener for message event.
Clevertap SDK on the customer's website sends a "ready" message using post message proxy and our dashboard listens to that once. Once dashboard get's the ready message, it sends the preview["inapp_notifs"] value using post message proxy and SDK which also attaches a listener on "message" event recieves this data and renders the custom html.
Before we open the url into a new tab, we wait for an api request to custom html default values.
Changes to Public Facing API if any
Please list the impact on the public facing API if any
How Has This Been Tested?
Describe the testing approach and any relevant configurations (e.g., environment, platform)

Tested locally by overrrideing clevertap.js file
Checklist