-
Notifications
You must be signed in to change notification settings - Fork 417
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
fix showing current tab in suggestions #3562
Conversation
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.
Works as expected! Perhaps we could add a test for AutocompleteViewController
-> candidateOpenTabs
to avoid regressions?
Yeah you're right. I'm gonna extract that extension into its own testable class. Bear with me. |
# Conflicts: # DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
var enabledFeatureFlags: [FeatureFlag] = [] | ||
var enabledFeatureFlag: FeatureFlag? |
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.
is unused by tests and not part of the protocol
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 tested again and works! Just left a “nip” comment. Thanks for addressing the tests.
} | ||
|
||
func history(for suggestionLoading: Suggestions.SuggestionLoading) -> [HistorySuggestion] { | ||
return historyCoordinator.history ?? [] |
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.
nip: can remove unnecessary return
on line. Same applies to below methods:
-
func bookmarks(for suggestionLoading: Suggestions.SuggestionLoading) -> [Suggestions.Bookmark]
-
func internalPages(for suggestionLoading: Suggestions.SuggestionLoading) -> [Suggestions.InternalPage]
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 gonna leave it. My thinking is that functions should return
something (unless they are view builders). I would like to think I'm consistent about that ... but who knows. :) Anyway, since it's just a nit I'm gonna go with what I've got.
Task/Issue URL: https://app.asana.com/0/392891325557410/1208712038329496/f
Tech Design URL:
CC:
Description:
Fixes bug showing open tab for current tab when typing in suggestions.
Steps to test this PR: