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

fix: HS-123: created separate iframe for full screen #111

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions public/fullscreenIndexTemplate.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- <link rel="icon" href="/orca/elements/favicon.ico" /> -->
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1"
/>
<meta name="theme-color" content="#000000" />
<!-- <link
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;600;700;800&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Qwitcher+Grypen:wght@400;700&display=swap"
rel="stylesheet"
/> -->
<link href="<%= publicPath%>/app.css" rel="stylesheet" />

<!-- <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> -->
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.

Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Hyperswitch</title>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="app"></div>
<script src="<%= publicPath%>/app.js"></script>

<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
22 changes: 11 additions & 11 deletions src/orca-loader/LoaderPaymentElement.res
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ let make = (componentType, options, setIframeRef, iframeRef, mountPostMessage) =
)
let iframeURL =
fullscreenParam.contents != ""
? `${ApiEndpoint.sdkDomainUrl}/index.html?fullscreenType=${fullscreenParam.contents}`
: `${ApiEndpoint.sdkDomainUrl}/index.html?fullscreenType=fullscreen`
? `${ApiEndpoint.sdkDomainUrl}/fullscreenIndex.html?fullscreenType=${fullscreenParam.contents}`
: `${ApiEndpoint.sdkDomainUrl}/fullscreenIndex.html?fullscreenType=fullscreen`
fullscreen.contents
? {
if iframeID == localSelectorString {
Expand Down Expand Up @@ -333,15 +333,15 @@ let make = (componentType, options, setIframeRef, iframeRef, mountPostMessage) =
}

{
on: on,
collapse: collapse,
blur: blur,
focus: focus,
clear: clear,
unmount: unmount,
destroy: destroy,
update: update,
mount: mount,
on,
collapse,
blur,
focus,
clear,
unmount,
destroy,
update,
mount,
}
} catch {
| e => {
Expand Down
10 changes: 10 additions & 0 deletions webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ module.exports = (publicPath = "auto") => {
inject: false,
template: "./public/build.html",
}),
new HtmlWebpackPlugin({
inject: false,
template: "./public/build.html",
}),
new HtmlWebpackPlugin({
// Also generate a test.html
inject: false,
filename: "fullscreenIndex.html",
template: "./public/fullscreenIndexTemplate.html",
}),
new BundleAnalyzerPlugin({
analyzerMode: "static",
reportFilename: "bundle-report.html",
Expand Down