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

Hiding the favicon view when favicon is nil #326

Merged
merged 4 commits into from
Nov 19, 2021
Merged

Conversation

tomasstrba
Copy link
Contributor

Task/Issue URL: https://app.asana.com/0/1199178362774117/1200960449542470/f

Description:
It is hard to navigate between tabs when a website has no favicon.

Steps to test this PR:

  1. Please make sure the browser replaces favicon view with title when no favicon is provided. Especially when tabs are shrunk to their smallest size

Internal references:

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

@brindy brindy self-assigned this Nov 16, 2021
@brindy
Copy link
Contributor

brindy commented Nov 17, 2021

This is looking good, but can we fix this bug as part of this? Testing this was problematic otherwise.

  1. Open a new tab
  2. Paste in https://www.bbc.co.uk
  3. Then paste in https://www.synergylabs.org/yuvraj/pubs.html

Expected: No Favicon
Actual: No Favicon ✅

  1. Open a new tab and paste in https://www.synergylabs.org/yuvraj/pubs.html

Expected: No Favicon
Actual: DDG Favicon 😭

Edit: Looks like updateFavicon never gets called when loading that URL which has no Favicon from a new tab
Edit: Setting favicon to nil in Tab.update(url:userEntered) when the content is homepage seems to fix it, but you might have a better solution.

    func update(url: URL?, userEntered: Bool = true) {
        if content == .homepage {
            favicon = nil
        }

        self.content = url == .homePage ? .homepage : .url(url ?? .blankPage)

        // This function is called when the user has manually typed in a new address, which should reset the login detection flow.
        userEnteredUrl = userEntered
     }

@tomasstrba tomasstrba assigned tomasstrba and unassigned brindy Nov 18, 2021
@tomasstrba
Copy link
Contributor Author

@brindy, thanks for you review! Agree the bug is annoying, unfortunately favicons are going to be completely reimplemented soon - Fixing favicons - (my next TP). Do you think we could land this fix of the view layer?

@tomasstrba tomasstrba assigned brindy and unassigned tomasstrba Nov 19, 2021
@tomasstrba tomasstrba requested a review from brindy November 19, 2021 12:41
Copy link
Contributor

@brindy brindy left a comment

Choose a reason for hiding this comment

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

LGTM!

@brindy brindy assigned tomasstrba and unassigned brindy Nov 19, 2021
@tomasstrba tomasstrba merged commit 69ca18a into develop Nov 19, 2021
@tomasstrba tomasstrba deleted the tom/unreadable-tabs branch November 19, 2021 14:04
samsymons added a commit that referenced this pull request Nov 22, 2021
* develop:
  Avoid using a specific browser as the default. (#341)
  Closing animation duration changed to 0.15 (#333)
  Hiding the favicon view when favicon is nil (#326)
  export bookmarks (#339)
  Ensure ITP database is cleared (#328)
  Execute print user script in page content world (#238)
  move the next/previous handlers to the main view controller (#331)
  Search with DuckDuckGo in PDF Context Menu (#323)
  Fix  Back button takes to r.duckduckgo.com (#321)
  Track the existing print handler to avoid DoS attacks. (#330)
  Minor copy fixes (#325)
  support cmd-option-left/right for navigating tabs (#324)
  Version 0.17.5
  Debounce privacy entry point update (#309)
  Change major tracker network threshold (#319)
  Check for click handler on printing user script (#318)
  Fix Homepage navigation (#322)
samsymons added a commit that referenced this pull request Nov 25, 2021
* develop: (23 commits)
  Update the credit card model + UI tweaks (#342)
  0.17.6
  Add Usage Pixel (#336)
  Bump find-in-page to latest version (#337)
  Forward delete collision with suffix resolved (#334)
  Avoid using a specific browser as the default. (#341)
  Closing animation duration changed to 0.15 (#333)
  Hiding the favicon view when favicon is nil (#326)
  export bookmarks (#339)
  Ensure ITP database is cleared (#328)
  Execute print user script in page content world (#238)
  move the next/previous handlers to the main view controller (#331)
  Search with DuckDuckGo in PDF Context Menu (#323)
  Fix  Back button takes to r.duckduckgo.com (#321)
  Track the existing print handler to avoid DoS attacks. (#330)
  Minor copy fixes (#325)
  support cmd-option-left/right for navigating tabs (#324)
  Version 0.17.5
  Debounce privacy entry point update (#309)
  Change major tracker network threshold (#319)
  ...
samsymons added a commit that referenced this pull request Dec 6, 2021
# By Alistair Brown (9) and others
# Via GitHub
* develop: (36 commits)
  Partial tech debt cleanup (#345)
  Address Bar visual tweaks (#310)
  Bump find-in-page to latest version (#352)
  Bump privacy dashboard to latest version (#349)
  fix popover message bug (#348)
  Add missing next and previous find-in-page button handlers (#351)
  add asserts to check that atb and install date are nil before being set (#350)
  copy private email address (#344)
  Reset tracker info on page change (#335)
  remove history menu and re-home other items (#343)
  Update the credit card model + UI tweaks (#342)
  0.17.6
  Add Usage Pixel (#336)
  Bump find-in-page to latest version (#337)
  Forward delete collision with suffix resolved (#334)
  Avoid using a specific browser as the default. (#341)
  Closing animation duration changed to 0.15 (#333)
  Hiding the favicon view when favicon is nil (#326)
  export bookmarks (#339)
  Ensure ITP database is cleared (#328)
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
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