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

prevent target=_blank links in duckplayer #2617

Merged

Conversation

shakyShane
Copy link
Collaborator

@shakyShane shakyShane commented Apr 12, 2024

Task/Issue URL: https://app.asana.com/0/1199230911884351/1206957893781167/f
Tech Design URL:
CC:

Description:

The goal of this PR is to alter how URLs are handled within DuckPlayer, especially those opening in a new tab like video recommendations. Now, instead of being opened in a new tab, these URLs will be loaded within DuckPlayer itself. The changes mainly involve adding a new case 'preventTargetBlank' to the NavigationDecision enum and implementing it in decideNewWindowPolicy method in DuckPlayerTabExtension.

Steps to test this PR:

  1. watch a video in duck player
  2. at the end, click a recommended link
  3. it should load in the same tab

Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@shakyShane
Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @shakyShane and the rest of your teammates on Graphite Graphite

@shakyShane shakyShane marked this pull request as ready for review April 12, 2024 14:02
@github-actions github-actions bot added the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Apr 12, 2024
@shakyShane shakyShane force-pushed the 04-12-poc_prevent_target__blank_links_in_duckplayer branch from 1ef6021 to f14e449 Compare April 16, 2024 06:49
@shakyShane
Copy link
Collaborator Author

@mallexxx - I updated the PR as requested, could you give it a review please :)

Copy link
Collaborator

@mallexxx mallexxx left a comment

Choose a reason for hiding this comment

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

Works like a charm 👍

@shakyShane shakyShane changed the title POC: prevent target=_blank links in duckplayer prevent target=_blank links in duckplayer Apr 16, 2024
@github-actions github-actions bot removed the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Apr 16, 2024
@shakyShane shakyShane merged commit 32422b0 into main Apr 16, 2024
36 of 39 checks passed
@shakyShane shakyShane deleted the 04-12-poc_prevent_target__blank_links_in_duckplayer branch April 16, 2024 14:10
diegoreymendez pushed a commit that referenced this pull request Apr 18, 2024
Task/Issue URL:
https://app.asana.com/0/1199230911884351/1206957893781167/f
Tech Design URL:
CC:

**Description**:

The goal of this PR is to alter how URLs are handled within DuckPlayer,
especially those opening in a new tab like video recommendations. Now,
instead of being opened in a new tab, these URLs will be loaded within
DuckPlayer itself. The changes mainly involve adding a new case
'preventTargetBlank' to the NavigationDecision enum and implementing it
in decideNewWindowPolicy method in DuckPlayerTabExtension.

**Steps to test this PR**:
1. watch a video in duck player 
2. at the end, click a recommended link
3. it should load in the same tab

<!--
Tagging instructions
If this PR isn't ready to be merged for whatever reason it should be
marked with the `DO NOT MERGE` label (particularly if it's a draft)
If it's pending Product Review/PFR, please add the `Pending Product
Review` label.

If at any point it isn't actively being worked on/ready for
review/otherwise moving forward (besides the above PR/PFR exception)
strongly consider closing it (or not opening it in the first place). If
you decide not to close it, make sure it's labelled to make it clear the
PRs state and comment with more information.
-->

---
###### Internal references:
[Pull Request Review
Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f)
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
[Pull Request
Documentation](https://app.asana.com/0/1202500774821704/1204012835277482/f)

Co-authored-by: Shane Osbourne <[email protected]>
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.

3 participants