parse-community / parse-community/parse-dashboard

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

Open
#2,441 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
JavaScript
Stars
3.8k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate generatePath and the dashboard links that call it, then reproduce the issue with the dashboard mounted at /parse and Cmd-click a pointer. Done means the target object opens in a new window correctly when the dashboard is mounted at both / and a subpath.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.