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

Actions resulting in opening a new browser window fail when the dashboard is not mounted on "/" (see generatePath) #2441

Open
4 tasks done
FransGH opened this issue May 30, 2023 · 2 comments
Labels
bounty:$10 Bounty applies for fixing this issue (Parse Bounty Program) type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@FransGH
Copy link
Contributor

FransGH commented May 30, 2023

New Issue Checklist

Issue Description

Doing a Cmd-CLick on a pointer should open the target object in a new browser window.
This works fine if the dashboard is mounted on /
When there is a subpath like /parse or /dashboard the external links fail.

An earlier PR where an external link was 'hacked' by using the current location instead of generatePath worked fine when the dashboard was mounted on / and /parse
Changing to generatePath appeared to work fine but was not tested on /parse.

Looking at generatePath it becomes clear that none of the links that use this function will work when the dashboard is not mounted on /

export default function generatePath(currentApp, path) {
  return `/apps/${currentApp.slug}/${path}`;
}

Steps to reproduce

  • mount the dashboard on /parse
  • cmd-click in a class on pointer
  • a new window opens with a page not found or other error (depending on server)

Actual Outcome

the new window doesn't show the dashboard but an error

Expected Outcome

The same functionality when the dashboard was mounted on /

Environment

Dashboard

  • Parse Dashboard version: 5.2.0 Alpha 1
  • Browser (Safari, Chrome, Firefox, Edge, etc.): n/a
  • Browser version: n/a

Server

  • Parse Server version: n/a
  • Operating system: n/a
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): `linux with docker and nginx' (n/a)

Database

  • System (MongoDB or Postgres): n/a
  • Database version: n/a
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): n/a

Logs

n/a

@parse-github-assistant
Copy link

parse-github-assistant bot commented May 30, 2023

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@FransGH
Copy link
Contributor Author

FransGH commented May 30, 2023

@mtrezza sorry, missed this during testing after changing to generatePath. I'll look into this and fix it with a new PR.

@mtrezza mtrezza added type:bug Impaired feature or lacking behavior that is likely assumed bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) bounty:$10 Bounty applies for fixing this issue (Parse Bounty Program) and removed bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) labels May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty:$10 Bounty applies for fixing this issue (Parse Bounty Program) type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

2 participants