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

DApp Browser tabs state managing PoC #1273

Open
wants to merge 6 commits into
base: base/seamless-dapp-browser
Choose a base branch
from

Conversation

svojsu
Copy link
Contributor

@svojsu svojsu commented Nov 11, 2024

Use the Add and Nova buttons at the bottom to add new tabs and manage the tab list.

@svojsu svojsu requested a review from ERussel November 11, 2024 08:30
@@ -294,4 +295,15 @@ extension SettingsManagerProtocol {
)
}
}

var webViewStates: [String: Data]? {
Copy link
Collaborator

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

Copy link
Contributor Author

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),
Copy link
Collaborator

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
Copy link
Collaborator

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>
Copy link
Collaborator

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

Copy link
Contributor Author

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
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