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 /
🚀 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.
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 /
Steps to reproduce
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
5.2.0 Alpha 1
n/a
n/a
Server
n/a
n/a
Database
n/a
n/a
n/a
Logs
n/a