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 target parameter to link() function #791

Merged
merged 1 commit into from
Aug 15, 2019
Merged

Add target parameter to link() function #791

merged 1 commit into from
Aug 15, 2019

Conversation

acicovic
Copy link
Collaborator

This PR adds the ability to specify a target attribute within the link() function, which allows the opening of the page in a new tab.

Note: This shouldn't break any existing code as the argument is optional.

For example:

// Open in new tab
$app->add(['Label', 'Open page in a new tab'])->link(['my-page'], '_blank');

// Open in same tab as before
$app->add(['Label', 'Open page in a new tab'])->link(['my-page']);

@codecov
Copy link

codecov bot commented Aug 11, 2019

Codecov Report

Merging #791 into develop will decrease coverage by 0.01%.
The diff coverage is 50%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #791      +/-   ##
=============================================
- Coverage      71.26%   71.25%   -0.02%     
- Complexity      2242     2243       +1     
=============================================
  Files            119      119              
  Lines           5325     5326       +1     
=============================================
  Hits            3795     3795              
- Misses          1530     1531       +1
Impacted Files Coverage Δ Complexity Δ
src/jsSearch.php 85% <0%> (ø) 5 <1> (ø) ⬇️
src/View.php 85.25% <75%> (-0.26%) 143 <3> (+1)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 56e6843...0538a98. Read the comment docs.

Copy link
Member

@romaninsh romaninsh left a comment

Choose a reason for hiding this comment

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

makes sense..

@romaninsh romaninsh merged commit 95e9943 into atk4:develop Aug 15, 2019
@acicovic acicovic deleted the feature/add-link-target branch October 7, 2019 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants