Repository navigation
Navigation, OptionContainers, and sidebars #4059
Replies: 3 comments 27 replies
|
I think I can see the sort of distinction you're making here. My immediate question: Have you identified different widget, or different ways to render the same widget? Are all of these OptionContainer - but if OptionContainer is the content of a MainWindow on macOS, it's rendered like the world clock example. If it's the content of a SplitContainer, it's rendered Gnome NewsFlash; otherwise, it's the "tabs" as currently defined. Whether any of these alternatives are possible at all will depend on what any given platform provides - the current "tab" implementation works; but we can enhance it over time if there are other options. However, the meta-question I'd like to pose before we dive too deeply: Does this matter? Toga is, ultimately, a cross-platform GUI abstraction framework, and all abstractions leak. It will not be possible to define all apps that might be possible on any single platform. And that's OK. We should aspire to make as many apps possible as possible; but just because something is possible on one specific platform doesn't mean we have to wrap it - certainly not at this point in Toga's development where there is a lot of much bigger fish to fry. Issues like settings management, login workflows, and navigation control strike me as much more significant problems to resolve right now, because there are specific applications that can't (or can't easily) be built. Unless there's a specific use case motivating this for you, I'd suggest that those more foundational problems should be our focus, rather than trying to solve problems that we don't actually have because the theoretically exist. |
|
@freakboy3742 Starting a new thread here, since it's getting too long to see context on the previous one, and also that we're now shifiting into general discussion for Sidebars: (Sidenote: I've came up with more concrete stuff than I thought I would be. It's still a question on whether I'd be in the discussion further, though.)
I take this back; the Photos app uses a segmented button in a bottom bar instead of the traditional "tab bar", and isn't always visible in all views. On Android, a primary tab bar (the same we use for a future lightweight OptionContainer but with a bit of different styling) is suggested to be nested under a navigation rail. So to summarize, the nesting for a tabbar + content inside a sidebar is a possible construction, but it will be represented slightly differently than a plain, root-level tabbar.
In my opinion: A sidebar is essentially a OS-styled panel at the left of the window. Most frequently, it displays destinations for different views of an app. Examples of what those views can feel like includes:
There are also less common usecases, such as "a list of commands" mentioned by @mhsmith. For example, this sidebar on the left of the macOS Calendar app is more "commands" than "destinations", because the view at the right is the same and it is shared, and the left controls whether certain items are visible. It is equivalently functional if those things are put under "Calendars" on a menubar: Similarly, the Finder app is such an example -- the left can be treated as "Commands" that are single-selection, because they're not neccessarily just distinct destinations. Wherever you go, you're still on the filesystem, and the type of view is still the same. It is also obvious that the "multiple root destinations" metaphor is broken -- when you navigate to another folder, there is nothing selected: Before navigation:
After navigation:
Which is different from the Movies app, which clearly follows "multiple distinct root destinations" that I first outlined — when you navigate to a movie, the original tab is still highlighted: (I'm not sure if these 2 usecases are distinct, though). I'm not particularly sure about usecases to prevent, though. An obvious one will be anything non-navigation-related, like displaying a simple widget with more information.
I don't want to give an unthoughtful answer to this right now, but I do have some organized ideas. Whether I post them here later depends entirely on my personal situations -- expect this to take a day or two. @freakboy3742 I hope this piece of information helps. Feel free to reply with any critiques of whether this is the right direction to be heading into, or any other questions about the sidebar itself you may have. Thanks, I apologize for my weird availability situation. |
|
I've finally managed to get my thoughts together in a single document; see #4271. |










Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Toga needs to represent in some way top-level navigation of multiple distinct parts of the app, aka. a bottom bar, and related but separate nonsequential content in one part / area of the app.
The distinction is that the top-level navigation optioncontainers are usually placed as a bigger bar on the bottom of the window, but the option containers for navigation in small sections has a tab chrome and some kind of frame instead of a just a bar.
As a concrete example before I get to specific examples, here's a mockup where the OptionContainer is used in a small section of the application:
On the other hand, if the same kind of styling for hte OptionContainer is used to represent distinct parts of the app as a top-level structure, it would look like this:
which would look kind of jarring because there's already a window frame, and the options have another frame. But if we instead do this:
or this:
it would look much better.
Multiple distinct parts of the app as top-level navigation form:
macOS clock app:
iOS News app:
KDE Alligator:
GNOME NewsFlash:
Android bottom layout (current impl in Toga):
Navigation between related options in a specific part of the app:
iOS -- mail app when searching, all/current mailbox options can display differnet content:
Android -- example from Material Design 3 guidelines -- the tabs are in a specific area rather than top-level of the app:
macOS -- Toga Demo -- tabs are specific to left part of app:
Qt:
Winforms:
All reactions