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

Removing duplicated footer from iframes #17

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

fellyph
Copy link
Collaborator

@fellyph fellyph commented Dec 22, 2023

Description

In the current solution, the footer gets duplicated when third-party content is loaded in an iframe, breaking the expected design. This pull request contains a script to hide the footer when the page is loaded from an iframe.

Relevant Technical Choices

The inline Javascript was a solution that could be reproduced locally, probably with multiple domains; it could be solved with Express JS checking request.headers.referer.

Testing Instructions

  1. Clone the repository and checkout the feature/removing-duplicated-footer-from-iframes branch containing these changes.
  2. Please make sure you have Node.js and npm installed.
  3. Run npm install to install all dependencies.
  4. Set up the .env file.
  5. Start the server using npm start.
  6. You can navigate to the demos "e-commerce" or "payment gateway"
  7. Check if the footer is displayed only in the main content

Screenshots

e-commerce scenario before

e-commerce scenario before

e-commerce scenario after

e-commerce scenario after

@fellyph fellyph merged commit 6011d98 into develop Jan 22, 2024
1 check passed
@fellyph fellyph deleted the feature/removing-duplicated-footer-from-iframes branch January 24, 2024 15:43
@fellyph fellyph mentioned this pull request Jan 24, 2024
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.

None yet

2 participants