Introduce Scaffold layer to app layout
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 827
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 40
Description
### What is the problem or limitation you are having?
Following the discussion on #4271, we need to add a core-level API for governing the layout and navigation of content in a window.
### Describe the solution you'd like
We should add:
- An abstract `BaseScaffold` class that governs the layout of content in a window.
- A concrete `Scaffold` class that describes the "one widget of content" use case.
- A `scaffold` attribute on widgets that provides a path to the scaffold governing the content.
- Handling so that if the value assigned as content for a window isn't a scaffold, an instance of `Scaffold` is created, and the provided content is used as the content in the `Scaffold`.
### Describe alternatives you've considered
-
### Additional context
See discussions on #4271 for background.
On iOS and Android, the scaffold will need to take ownership of (or at least expose) the app's titlebar and navigation contexts. There may be room to replace/rename the internal representation of "containers" with a platform representation of "scaffold".
On iOS, a UINavigationController will be required even if the window is a Window instance, not a MainWindow. The navigation bar will need to be manually hidden. This is required so that Table/Tree/DetailContainer widgets will have access to a navigation context.
On mobile, the default scaffold will also need to handle the display of app-level menus. Other scaffolds may control how menu items are displayed.
Contributor guide
Research direction
Read the discussion in #4271 first, then inspect the existing internal representation of containers and how windows, widgets, and navigation contexts are connected. The work is complete when the core API includes BaseScaffold and Scaffold, widgets expose a scaffold path, and non-scaffold window content is wrapped consistently, including the stated mobile navigation and menu context requirements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop, mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100