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

Set window.org and window.app without requiring the app Index.cshtml to do so #2777

Open
olemartinorg opened this issue Dec 2, 2024 · 0 comments
Labels
Milestone

Comments

@olemartinorg
Copy link
Contributor

olemartinorg commented Dec 2, 2024

Description

In all apps today, the following lines of javascript are present:

<script>
  const appId = window.location.pathname.split('/');
  window.org = appId[1];
  window.app = appId[2];
</script>

It's silly, we could do this in app-frontend instead, and save apps these lines of code.

We could likely do this today, at least setting the values if they're not set yet, but in v5 we could remove this from the index file altogether as well.

Also, we'd have to talk to Studio when doing this, to make sure their frontend preview solution still works.

Additional Information

@olemartinorg olemartinorg added the kind/feature-request New feature or request label Dec 2, 2024
@olemartinorg olemartinorg added this to the v5 milestone Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant