-
Notifications
You must be signed in to change notification settings - Fork 12
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
[WIP] Switch to tab implementation #3660
base: main
Are you sure you want to change the base?
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.
@mallexxx, this is really great feature, I love it! I added couple of comments below and would like to resolve a question of suggesting tabs between regular windows and Fire Windows in Asana.
Also, suggesting a pinned tab didn't work for me. Am I missing something?
@@ -486,6 +488,21 @@ final class AddressBarTextField: NSTextField { | |||
} | |||
} | |||
|
|||
private func switchTo(_ tab: OpenTab) { |
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.
Can we encapsulate this logic somewhere else? (standalone class maybe?) It is slightly confusing to have logic for switching tabs in AddressBarTextField
@@ -52,8 +56,16 @@ final class SuggestionContainer { | |||
let urlFactory = { urlString in | |||
return URL.makeURL(fromSuggestionPhrase: urlString) | |||
} | |||
|
|||
self.init(suggestionLoading: SuggestionLoader(urlFactory: urlFactory), | |||
let openTabsProvider: OpenTabsProvider = { @MainActor in |
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.
Would using WindowControllersManagerProtocol
make more sense here since other data are passed this way too?
@@ -787,6 +787,16 @@ extension TabCollectionViewModel { | |||
return nil | |||
} | |||
|
|||
func indexInAllTabs(where condition: (Tab) -> Bool) -> TabIndex? { |
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.
Nice 👍 Very useful
|
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.
@mallexxx , there are two issues which should be fixed before we move on:
- Activating existing pinned tab using the suggestion in case there is just one regular tab open, closes the whole window
- Regular pinned tabs are being suggested in Fire Window. Since they have a different data store, they probably shouldn't be there
Task/Issue URL: https://app.asana.com/0/1202406491309510/1208236460435649/f
Tech Design URL: https://app.asana.com/0/72649045549333/1208270496320813/f
Description:
Steps to test this PR:
Definition of Done:
Internal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation