Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Conversation

@mallexxx
Copy link
Collaborator

@mallexxx mallexxx commented Aug 21, 2023

Original PR: #1503
Task/Issue URL: https://app.asana.com/0/1177771139624306/1204176861755199/f
CC: @SabrinaTardio

Description: When navigating back after using a back it gets stuck in a redirection loop. As a hack fix it checks wether the URL we are about to navigate to is a search with bang, if so navigates 2 positions back. The same happens forward.
Also it removes search with bang items from the context menu of the back/forward buttons.

Steps to test this PR:

  1. Do a bank search from the home page. Check backwards button is disabled.
  2. navigate somewhere and then do a search with a bang. Check going back goes to the original site. Check going forward doesn’t go through the redirection.
  3. Do multiple bang navigation consecutively and check it behaves correctly.
  4. check the context menus on the back and forward button show all the website but don’t show redirect searches.
  5. Validate SERP headers are correctly added to search requests and the SERP navigation history saving is not broken otherwise
  6. Validate when navigating with !bang from a new tab - no back item is created

Internal references:

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

Copy link
Collaborator

@SabrinaTardio SabrinaTardio left a comment

Choose a reason for hiding this comment

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

Thank you so much for fixing this… Works great beside one case… if you do the search from the home page it will still try to navigate back to the search while the back button should be disabled.

@mallexxx
Copy link
Collaborator Author

@SabrinaTardio this is an old known issue.. should be fixed now, please check (TBD: add a new private API to the "used" list)

@mallexxx mallexxx requested a review from SabrinaTardio August 21, 2023 14:14
Copy link
Collaborator

@SabrinaTardio SabrinaTardio left a comment

Choose a reason for hiding this comment

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

Amazing! 🥇

@mallexxx mallexxx merged commit 5319caa into develop Aug 21, 2023
@mallexxx mallexxx deleted the alex/back-forward-navigation-bug branch August 21, 2023 14:40
samsymons added a commit that referenced this pull request Aug 22, 2023
# By Diego Rey Mendez (3) and others
# Via Diego Rey Mendez (1) and GitHub (1)
* develop:
  Require Duck Player scheme URL to be passed from YouTube Overlay User Script (#1519)
  extend valid urls to include IPv6 (#1492)
  Fix bug where Back navigation doesn't work properly with bangs (#1510)
  remove logic to keep previous search mode (#1500)
  Bump version to 1.53.0 (52)
  Update embedded files
  Adds a file that's generated when the unit tests are run (#1511)

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants