Skip to content

Retrieve iframe url on page load#47

Merged
circlecube merged 12 commits intomainfrom
feature/PRESS10-213
Jun 3, 2025
Merged

Retrieve iframe url on page load#47
circlecube merged 12 commits intomainfrom
feature/PRESS10-213

Conversation

@crodriguezbrito
Copy link
Copy Markdown
Contributor

@crodriguezbrito crodriguezbrito commented May 19, 2025

Proposed changes

The following PR will make an API call to Hiive and retrieve the URL used to render the iframe content on page load and store the full url in a cookie with of 25 minutes expiration.

This will reduce the time it takes to render the iframe, as we only need to replace the id parameter and use the ctb-id. If the urlToken fails for any reason, we will fall back to the previous method to retrieve the URL.

It will also include a listener to update the token URL when the token is refreshed and to update the cookie as well. Additionally, on each page load, the JavaScript will calculate the remaining time until the cookie expires. This way, if for some reason the customer leaves the page open without performing any actions, the cookie will still be refreshed with a new token url.

Type of Change

Production

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update
  • Refactoring / housekeeping (changes to files not directly related to functionality)

Development

  • Tests
  • Dependency update
  • Environment update / refactoring
  • Documentation Update

Video

Grabacion.de.pantalla.2025-05-19.a.las.16.54.57.mov

Checklist

  • I have read the CONTRIBUTING doc
  • I have viewed my change in a web-browser
  • Linting and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@crodriguezbrito crodriguezbrito marked this pull request as draft May 22, 2025 12:45
@crodriguezbrito crodriguezbrito marked this pull request as ready for review June 2, 2025 12:33
@circlecube circlecube merged commit 5816e12 into main Jun 3, 2025
2 of 3 checks passed
@circlecube circlecube deleted the feature/PRESS10-213 branch June 3, 2025 18:41
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