-
Notifications
You must be signed in to change notification settings - Fork 20
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
DApp Browser tabs state managing PoC #1273
base: base/seamless-dapp-browser
Are you sure you want to change the base?
Conversation
- store tabs in-memory - compound tab with webview - add controls to quickly add tabs and show tabs list - add tabs list screen
@@ -294,4 +295,15 @@ extension SettingsManagerProtocol { | |||
) | |||
} | |||
} | |||
|
|||
var webViewStates: [String: Data]? { |
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.
Not a good place for this. I would consider single value in the database or file
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.
Yeah, sure. It was intended just to PoC so we can persist webview's state and restore it then. I haven't yet implemented persistence using CoreData, as I want to avoid dealing with migrations later in this branch. The tab model should be properly planned first.
private func saveCurrentWebViewState() { | ||
if | ||
let currentTabId, | ||
let currentWebView = webViewPool.getWebView(for: currentTabId), |
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 would probably pass pool directly to the controller via init. And controller can call presenter to save opaque state given in the parameters
func showTabs() { | ||
wireframe.presentTabs( | ||
from: view | ||
) { [weak self] selectedId 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.
What is about to return tab directly?
@@ -0,0 +1,93 @@ | |||
import UIKit | |||
|
|||
typealias DappBrowserTabCell = PlainBaseTableViewCell<UILabel> |
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 saw that on the PR screenshots there is an image per cell but can't find it. Probably forget to 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.
The second screenshot shows dotappstore, which appears to be tabs in a screenshot format, but it isn't. I haven't yet implemented screenshots or mature persistence using CoreData, as I want to avoid dealing with migrations later in this branch. The tab model should be properly planned first.
# Conflicts: # novawallet.xcodeproj/project.pbxproj
Use the
Add
andNova
buttons at the bottom to add new tabs and manage the tab list.