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

Navigation Controller feature request #785

Open
BrendanSimon opened this issue Jan 19, 2020 · 5 comments
Open

Navigation Controller feature request #785

BrendanSimon opened this issue Jan 19, 2020 · 5 comments

Comments

@BrendanSimon
Copy link
Contributor

On iOS, to have native look and feel, a NavigationBar and NavigationControl needs to be implemented. Common examples are the iOS Settings app and iOS Contacts app.

https://developer.apple.com/documentation/uikit/uinavigationcontroller

https://developer.apple.com/documentation/uikit/uinavigationbar

This needs to be abstracted to a common Toga API. I presume Android has something similar. Windows may have something similar with it's Windows Explorer address bar hierarchy. Not sure about macOS or GTK (or wxPython or PyQt or PySide)

@freakboy3742
Copy link
Member

Toga already has an NavigationView widget (which should possibly be called NavigationContainer; this would seem to be the match for the iOS UINavigationBar - a top level widget for navigating panes of content by "depth".

Closing this ticket on the basis there's already a toga.core API for this feature, and tickets aren't an especially effective way of coordinating efforts around specific platform implementations of widgets.

@BrendanSimon
Copy link
Contributor Author

@BrendanSimon
Copy link
Contributor Author

Found it in the road map.

https://toga.readthedocs.io/en/latest/background/roadmap.html

I can see in the source code NavigationView where as the roadmap mentions NavigationContainer.

Can't see any examples for it, but there does seem to be some tests.

BTW, the test_navigationview.py has the following code. Is it correct (the reference to "switch" looks suspicious to me)?

    def test_widget_created(self):
        self.assertEqual(self.switch._impl.interface, self.switch)
        self.assertActionPerformed(self.switch, 'create Switch')

@freakboy3742
Copy link
Member

Hrm... not sure what has happened there. The git history isn't being helpful, as the change predates the toga 0.3. restructure; I can only assume I stubbed out some code very early on, and because the widget doesn't work and isn't documented, nobody has been back to correct it.

However:

  • The roadmap is correct - It should be NavigationController, not NavigationView.
  • The absence from API docs is an oversight, probably driven by the fact that the only platform that makes even a cursory attempt at implementing NavigationView is iOS, and I know it doesn't work there.
  • The reference to switch in the test almost certainly betrays the provenance of the code - it's a copy and paste error.

@freakboy3742 freakboy3742 reopened this Jun 6, 2024
@freakboy3742
Copy link
Member

Reopening on the basis that a navigation controller is a very important feature, especially for mobile apps, and despite the state of this ticket, we don't have one yet.

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

No branches or pull requests

2 participants