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

Implement prechat timer pop up #52

Merged
merged 2 commits into from
Oct 9, 2023
Merged

Conversation

tuseto
Copy link
Contributor

@tuseto tuseto commented Oct 3, 2023

No description provided.

@tuseto tuseto requested a review from MiroslavKisov October 3, 2023 14:50

if (popUpHtml) {
this.elements.chatbotContainer.appendChild(popUpHtml);
setTimeout(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

@tuseto
Can't you just use the delay function and omit the setTimeout?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can, but I don't want to. I even want to remove the delay function.

@@ -126,6 +126,11 @@ export const extractStringWithBrackets = (message) => {
};
};

export function removeTextBetweenHashtags(input) {
Copy link
Contributor

@MiroslavKisov MiroslavKisov Oct 4, 2023

Choose a reason for hiding this comment

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

@tuseto
There is a function called "clearButtonCodes" in the action-service.js that does the same, maybe we can use move it here in the helpers.js and remove "removeTextBetweenHashtags".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved the function into action-service, but cannot use the old one, they both are doing different things.

Copy link
Contributor

Choose a reason for hiding this comment

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

@tuseto

I was suppose to be the other way around, use the already existing function in the from the action service called (clearButtonCodes) and move it into helpers.js and then remove the function you wrote.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can't clear all codes before the message is loaded (when all codes are cleared). It will result in more changes.

@spont4e spont4e merged commit cc5a0e9 into master Oct 9, 2023
1 check passed
@spont4e spont4e deleted the prechat-timer-pop-up-active branch October 9, 2023 12:40
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.

3 participants