-
Notifications
You must be signed in to change notification settings - Fork 14
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
new tab page low hanging fruit #491
Conversation
…ew rather than navigation bar
|
||
if isHovering { | ||
DispatchQueue.main.async { | ||
NSCursor.pointingHand.push() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing a situation where the push event here is happening after the pop event, leaving the cursor in pointing hand state until I mouse over something else that changes it. I added log breakpoints to each of these push pop calls which narrowed it down to this one:
HyperLink Push
HyperLink Pop
SiteIconAndConnector Pop
SiteIconAndConnector Push
HyperLink Push
HyperLink Pop
HyperLink Push
HyperLink Pop
SiteIconAndConnector Pop
SiteIconAndConnector Push
HyperLink Push
HyperLink Pop
HyperLink Push
HyperLink Pop
SiteIconAndConnector Pop
SiteIconAndConnector Push
Seems like HyperLink
consistently pushes and then pops, but SiteIconAndConnector
doesn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just saw that @ayoy added a nice SwiftUI extension for this too: https://github.com/more-duckduckgo-org/macos-browser/pull/487/files#diff-9d7a407bdbafdaacf494ee497ac1ad93e2651bd7c8d7fa07865534deb8cc0e72
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I must say that my extension is not bulletproof enough. @brindy is using async dispatch for a reason, and I was able to avoid it only because I didn't have to store isHovered
in a @State
variable. And I forgot to explain it in a comment. I'll try and update my code and with API that handles a scenario like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw - I've just removed the dispatch main calls, they didn't seem to be needed any more for some reason and in fact were the cause of this the problem Sam pointed out.
Let's consolidate this cursor logic as a small PR once they're both merged :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New changes work great! This looks good 👏
# By Tomas Strba (5) and others # Via GitHub * develop: Refresh the Autofill panel after importing (#496) Require authentication for login export (#494) Observations database clearing improvements (#495) Fix handling external schemes in address bar (#493) New autoconsent rules and move tab cleanup out of onCommitted (#489) Safari CSV Passwords import +LastPass, 1Password (#483) Split preferences into multiple screens and add an option to show full URL (#487) Color of hover label fixed (#497) Add AMP links protection (#488) Enhancements of fire button options (#484) Rename Logins+ to Autofill (#492) new tab page low hanging fruit (#491) Fix threading issues in Autoconsent (#478) Navigation bar improvement: CMD + back or CMD + forward opens a new tab (#486) TextField refactored to TextView in order to make it scrollable (#481) More Xcode cleaning (#485) # Conflicts: # DuckDuckGo.xcodeproj/project.pbxproj # DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
Task/Issue URL: https://app.asana.com/0/392891325557410/1202033785045657
Tech Design URL:
CC:
Description:
New tab page low hanging fruit.
Steps to test this PR:
Testing checklist:
Internal references:
Software Engineering Expectations
Technical Design Template
When ready for review, remember to post the PR in MM