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

Add newTab option to linkManager #2190

Merged
merged 8 commits into from
Aug 23, 2021

Conversation

ndricimrr
Copy link
Contributor

@ndricimrr ndricimrr commented Aug 9, 2021

Description

Changes proposed in this pull request:

  • add new client option to allow opening paths in new window through Luigi Client linkManager option.
   LuigiClient.linkManager()
  .newTab()
  .navigate('/projects/xy/foobar');

Related issue(s)

Resolves #2188

@ndricimrr ndricimrr added the enhancement New feature or request label Aug 9, 2021
@ndricimrr ndricimrr added this to the Sprint 21 milestone Aug 9, 2021
@ndricimrr ndricimrr self-assigned this Aug 9, 2021
@ndricimrr ndricimrr removed their assignment Aug 9, 2021
@ndricimrr ndricimrr added the question Further information is requested label Aug 10, 2021
Comment on lines 390 to 404
* **since**: 0.7.7

#### newTab

Enables navigating to a new tab.

##### Examples

```javascript
LuigiClient.linkManager().newTab().navigate('/projects/xy/foobar');
```

**Meta**

* **since**: NEXT_RELEASE
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Added documentation that might need review.

Comment on lines +1247 to +1251
if (e.data.params.newTab) {
let path = buildPath(e.data.params);
path = GenericHelpers.addLeadingSlash(path);
openViewInNewTab(path);
} else if (e.data.params.modal !== undefined) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Added if clause that checks if newTab is activated.

@ndricimrr ndricimrr changed the title Add openInNewTab option to linkManager Add newTab option to linkManager Aug 12, 2021
@ndricimrr ndricimrr removed the question Further information is requested label Aug 12, 2021
@stanleychh stanleychh self-assigned this Aug 13, 2021
Copy link
Contributor

@stanleychh stanleychh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, well done 👍.
Left a minor comment only.

@ndricimrr ndricimrr added the documentation documentation tasks label Aug 16, 2021
Copy link
Contributor

@stanleychh stanleychh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍
Please resolve file conflicts.

Co-authored-by: Stanley Hsu <stanleyhsu1984@gmail.com>
@ndricimrr ndricimrr merged commit 71060de into SAP:master Aug 23, 2021
@ndricimrr ndricimrr deleted the 2188-add-open-in-new-tab branch August 23, 2021 09:08
@JohannesDoberer JohannesDoberer mentioned this pull request Aug 27, 2021
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
Enables opening paths in a new tab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation documentation tasks dxp enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add linkManager option to navigate to new tab
4 participants