Skip to content

Commit e15d8eb

Browse files
committed
docs(mobile-client): add route structure diagram to routing documentation
- Introduce the concept of StatefulShellRoute for bottom navigation - Explain the structure of main application routes - Include a detailed tree view of the main route structure
1 parent e3b4eee commit e15d8eb

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/content/docs/mobile-client/architecture/routing.mdx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,33 @@ Navigation in the mobile client is managed by the powerful `go_router` package.
3030
The router is used to pass complex data between pages. For example, when navigating to a details page, the full `Headline` object is passed via the `extra` parameter of the navigation call. This is more efficient than passing an ID and re-fetching data that is already available.
3131
</Card>
3232
</CardGrid>
33+
34+
### Route Structure
35+
36+
The main application routes are structured using a `StatefulShellRoute`, which provides the bottom navigation bar. Top-level routes are used for pages that should appear over the main shell, such as authentication or detailed content views.
37+
38+
```tree title="Main Route Tree"
39+
/
40+
├─ /feed
41+
│ ├─ article/:id
42+
│ ├─ notifications
43+
│ └─ filter
44+
│ ├─ topics
45+
│ └─ sources
46+
├─ /search
47+
│ └─ article/:id
48+
└─ /account
49+
├─ settings
50+
│ ├─ appearance
51+
│ │ ├─ theme
52+
│ │ └─ font
53+
│ ├─ feed
54+
│ └─ language
55+
├─ manage-followed-items
56+
│ ├─ topics
57+
│ │ └─ add-topic
58+
│ └─ sources
59+
│ └─ add-source
60+
└─ saved-headlines
61+
└─ article/:id
62+
```

0 commit comments

Comments
 (0)