[FEATURE-13546] Menu Tree - target not opening in new tab properly

I’m currently using version: 8.0.0-beta0 (b2019032902)

I noticed that the Menu Tree works fine when opening the target on the same tab (with a slash). But I’m having trouble when opening in a new tab in a few situations.
In our project, the views/folders and URLs are organized as follows:
Group1/Page1
Group1/PageN

GroupN/Page1
GroupN/PageN

Here’s the issue:
1 - The target will replace the last part of the URL if it doesn’t end with a slash. Example:
Home page with no slash:
http://GWY_IP:8088/data/perspective/client/PROJECT
When I try to open the target “Group1/Page1”, I would expect:
http://GWY_IP:8088/data/perspective/client/PROJECT/Group1/Page1
But this is what it becomes:
http://GWY_IP:8088/data/perspective/client/Group1/Page1

*It does work fine if the home page’s URL end with a slash, but that’s not even the default when I launch the project.

2 - If I’m already with a page open, let’s say:
http://GWY_IP:8088/data/perspective/client/PROJECT/Group1/Page1
When I try to open the target “Group2/Page2”, I would expect:
http://GWY_IP:8088/data/perspective/client/PROJECT/Group2/Page2
But this is what happens:
http://GWY_IP:8088/data/perspective/client/PROJECT/Group1/Group2/Page2
Which doesn’t exist. Or even worse, if there’s a slash:
http://GWY_IP:8088/data/perspective/client/PROJECT/Group1/Page1/
It would turn into:
http://GWY_IP:8088/data/perspective/client/PROJECT/Group1/Page1/Group2/Page2

It would all work fine IF the URLs were not organized like the folders, i.e. no slashes but the first one.
But it would be nice to keep it organized like the folders for many reasons.
Am I missing something here? Or is it currently a limitation? Maybe a bug?

Hi,

At the moment, it’s certainly a limitation since we only resolve URL’s that begin with a leading slash in the context of the current mounted page (i.e. PROJECT). URL’s without a leading slash are presumed to be full path external URL’s are opened in a new browser context. You should definitely provide a leading slash if the intention is to append the URL in the context of the current mounted page. We could provide options in which you might specify the target context, similar to the Link component. I will create a feature request to add this functionality.

-Yousuf

Thank you.

I renamed all the URLs with dashes (Group1-Page1) for now.