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

Navigation failure handled in navigation bar buttons and their menus #540

Merged
merged 4 commits into from
May 2, 2022

Conversation

tomasstrba
Copy link
Contributor

Task/Issue URL: https://app.asana.com/0/1177771139624306/1201217438689718/f

Description:
Making back/forward navigation buttons and their menus able to cope with navigation error.

Steps to test this PR:
Test back/forward buttons and their menus in regular usage

  1. Visit a few urls
  2. Test back and forward buttons
  3. Display back or forward button menus
  4. Navigate to a website using the menu

Test closing back to the parent tab using the back button

  1. Open a website with CMD + SHIFT + click on a link
  2. Make sure the back button menu contains current website and parent website
  3. Close the tab by clicking on the back button
  4. Repeat the test and close the tab by selecting "Close and return to ..." menu item

Test going back after navigation error

  1. Visit https://badssl.com/
  2. Click on "Expired"
  3. Make sure back button menu contains error page as the current item + badssl.com as a previous item
  4. Go back to badssl.com: 1) by clicking on back, 2) by selecting the menu item

Testing checklist:

  • Test with Release configuration
  • Test proper deallocation of tabs
  • Make sure committed submodule changes are desired

Internal references:

Software Engineering Expectations
Technical Design Template
When ready for review, remember to post the PR in MM

@mallexxx mallexxx self-assigned this Apr 14, 2022
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.

Great, very long awaited fix, @tomasstrba!
Couple of issues I found though:

  1. Search for "a"
  2. Search for "b"
  3. Go back
  4. Paste&go to https://expired.badssl.com/
  • When error displayed the Forward button is still enabled and Forward menu shows "✅ Oops, a, b". It shouldn't be shown or at least don‘t diplay the "a" item

Another one:

  1. Search for "a"
  2. Paste&go to https://expired.badssl.com/
  3. Without waiting for error screen to display paste&go to https://expired.badssl.com/ again

Also if you don‘t mind could you fix another annoying bug:

  1. Open new tab
  2. Navigate to https://expired.badssl.com/
  3. Progress is not hidden when error appears and keeps going
  • this can be fixed by...
    Wrapping ProgressView.swift:182 into DispatchQueue.main.async! Ba-dum-tss 🥁

@mallexxx mallexxx assigned tomasstrba and unassigned mallexxx Apr 15, 2022
@mallexxx
Copy link
Collaborator

Also something not related: the error description doesn‘t respect the view size
Screenshot 2022-04-15 at 16 30 09

@tomasstrba
Copy link
Contributor Author

Thanks Alex! 👍 I will address all issues tomorrow.

@tomasstrba
Copy link
Contributor Author

Alex, please, do you have any idea why the textfield isn't breaking the text into multiple lines when I try to resize the window to smaller? Instead it forces the minimum width.

Screen Shot 2022-04-25 at 22 10 45

Screen Shot 2022-04-25 at 22 10 17

@tomasstrba
Copy link
Contributor Author

@mallexxx I wasn't able to resolve issues 2 and 4 in a reasonable time. Since they aren't the scope of this PR, can we move on and land the back/forward button improvement?

@tomasstrba tomasstrba assigned mallexxx and unassigned tomasstrba Apr 28, 2022
@mallexxx
Copy link
Collaborator

Sorry, @tomasstrba , didn‘t notice your comment, will review today!

@mallexxx
Copy link
Collaborator

mallexxx commented Apr 29, 2022

Alex, please, do you have any idea why the textfield isn't breaking the text into multiple lines when I try to resize the window to smaller? Instead it forces the minimum width.

These settings (+ align center) work for me (feel free to merge in):
Screenshot 2022-04-29 at 18 09 38
Screenshot 2022-04-29 at 18 11 17

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.

Looks better now :)
There's still the "b" search in the forward menu if you go back from the error screen but I suppose we can live with it for now. Would you please set up a follow-up task for making a custom wrapper for the back-forward stack and feel free to merge after resolving the conflict

@tomasstrba tomasstrba assigned tomasstrba and unassigned mallexxx May 2, 2022
@tomasstrba
Copy link
Contributor Author

Alex, wow thanks a lot for the layout settings! 🙏 I merged those, resolved the conflict and re-tested again and scoped next steps in https://app.asana.com/0/1177771139624306/1202210923581858/f

@tomasstrba tomasstrba merged commit 8802742 into develop May 2, 2022
@tomasstrba tomasstrba deleted the tom/back-forward-list branch May 2, 2022 15:26
samsymons added a commit that referenced this pull request May 4, 2022
# By Sam Symons (2) and others
# Via Sam Symons (2) and GitHub (1)
* develop:
  Autoconsent: prompt only when if an actual cookie popup is found (#565)
  Fix incorrect action name for selfTest (#561)
  BSK: Check array items for surrogate methods (#563)
  BSK: Check array items for surrogate methods (#563)
  Navigation failure handled in navigation bar buttons and their menus (#540)
  Version 0.23.1
  Ensure that we don’t trip an assertion failure when Fireproofing. (#559)
  Tweak autoconsent events (#554)
  Remove Punycode reference after recent bump of BSK (#560)
  If navigationAction does not target main frame open in new tab (#557)
  Use macos-12 environment in GitHub Actions workflows (#556)
  Version 0.23.0

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
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