-
Notifications
You must be signed in to change notification settings - Fork 33
refactor: Change embed-grid and embed-chart to redirects #1873
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <base href="./" /> | ||
| </head> | ||
| <body> | ||
| <noscript>You need to enable JavaScript to run this app.</noscript> | ||
|
|
||
| <script> | ||
| // Can't be an HTML meta redirect because we need to keep the search params | ||
| const url = new URL('../../iframe/widget/', document.baseURI); | ||
| url.search = window.location.search; | ||
| window.location.replace(url); | ||
| </script> | ||
| </body> | ||
| </html> |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,16 @@ | ||||||
| <!doctype html> | ||||||
| <html lang="en"> | ||||||
| <head> | ||||||
| <base href="./" /> | ||||||
| </head> | ||||||
| <body> | ||||||
| <noscript>You need to enable JavaScript to run this app.</noscript> | ||||||
|
|
||||||
| <script> | ||||||
| // Can't be an HTML meta redirect because we need to keep the search params | ||||||
| const url = new URL('../../iframe/widget/', document.baseURI); | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May as well just do
Suggested change
We could have env vars that you set when building to reference where the new iframe path should be, but this is fine... if you change the path, you'll need to rewrite the path in this index.html file.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ya I figured these were simple enough redirects that adding an env file just adds an unnecessary layer of pass through. Not any gain IMO when we're replacing a single use value with a single use variable instead and we're ultimately trying to remove these separate embed packages |
||||||
| url.search = window.location.search; | ||||||
| window.location.replace(url); | ||||||
| </script> | ||||||
| </body> | ||||||
| </html> | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should still be
BASE_URL.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just trying to make this simple (using Vite default config). I don't see any reason
BASE_URLneeds to be easily changeable at build time as we don't support anything other than./There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea fair