Skip to content
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

Point and Click feature #213

Merged
merged 22 commits into from
Jun 12, 2024
Merged

Point and Click feature #213

merged 22 commits into from
Jun 12, 2024

Conversation

KambleSonam
Copy link
Collaborator

@KambleSonam KambleSonam commented May 8, 2024

JIRA Issue: WEB-2848

Implementation

  • Added logic to fetch the overlay and styles file
  • Handle the rendering of the overlay

@@ -0,0 +1,146 @@
export const initialiseCTBuilder = (url, variant, details) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

general review, lets add jsdoc comments to all functions
https://jsdoc.app/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is Done

container.style.position = 'relative' // Ensure relative positioning for absolute positioning of form
container.style.display = 'flex'
document.body.appendChild(container)
const overlayPath = 'https://d2r1yp2w7bby2u.cloudfront.net/js/lib-overlay/overlay.js'
Copy link
Collaborator

Choose a reason for hiding this comment

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

lets remove this hard coded string here. Add a new constants file inside visualBuilder and add this string

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is Done

var link = document.createElement('link')
link.rel = 'stylesheet'
link.type = 'text/css'
link.href = 'https://d2r1yp2w7bby2u.cloudfront.net/js/lib-overlay/style.css'
Copy link
Collaborator

Choose a reason for hiding this comment

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

same comment as above

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is Done

Comment on lines 61 to 70
var d = document
var h = d.documentElement
var t = setTimeout(function () {
h.className = h.className.replace(/\bwf-loading\b/g, '') + ' wf-inactive'
// $(document).trigger("TypeKitReady");
}, config.scriptTimeout)
var tk = d.createElement('script')
var f = false
var s = d.getElementsByTagName('script')[0]
var a
Copy link
Collaborator

Choose a reason for hiding this comment

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

meaningful name of the variables.
Also define them as const

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is Done

src/util/tr.js Outdated
Comment on lines 51 to 53
// msg = {
// arp: {
// j_n: 'Zw==',
Copy link
Collaborator

Choose a reason for hiding this comment

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

no commented code please

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is Done

src/clevertap.js Outdated

if (search === '?ctBuilder') {
// open in visual builder mode
console.log('open in visual builder mode')
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we use our logger class here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is done

@KambleSonam KambleSonam merged commit 5647cd1 into develop Jun 12, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants