Skip to content

Commit 64b99d0

Browse files
Update docs
1 parent 41dda22 commit 64b99d0

2 files changed

Lines changed: 58 additions & 9 deletions

File tree

docs/apps/app-lifecycle.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,37 @@ Activity Stack:
217217

218218
2. **Going back:** Framework first calls `onBackPressed()`. If it returns `True`, the activity stays foreground and must call `finish()` itself when ready. If it returns `False`, the current activity receives `onPause()``onStop()``onDestroy()`, and the previous activity receives `onResume()`
219219

220+
### Disabling Navigation Globally
221+
222+
Apps that need full control over the back and menu buttons can disable the system-level actions globally via `InputManager`:
223+
224+
```python
225+
from mpos.ui.input_manager import InputManager
226+
227+
# Disable back-screen navigation (hardware back button, swipe-back gesture)
228+
InputManager.set_back_screen_disabled(True)
229+
230+
# Disable top-menu drawer opening (hardware menu button, swipe-down gesture)
231+
InputManager.set_drawer_open_disabled(True)
232+
233+
# Query current state
234+
if not InputManager.is_back_screen_disabled():
235+
InputManager.set_back_screen_disabled(True)
236+
```
237+
238+
The same functions are also available as top-level `mpos` imports:
239+
240+
```python
241+
import mpos
242+
mpos.set_back_screen_disabled(True)
243+
mpos.set_drawer_open_disabled(True)
244+
```
245+
246+
- `close_drawer()` still works when drawer opening is disabled — you can close an already-open drawer.
247+
- `finish_current_activity()` (called directly) is not gated, only `back_screen()`.
248+
- All paths — hardware key handlers, gesture navigation, and programmatic calls — funnel through `back_screen()` and `open_drawer()`/`toggle_drawer()`, so a single call gates every trigger.
249+
- When disabled, the back-screen and drawer-open actions invoke optional callbacks passed to `set_back_screen_disabled(True, cb=...)` and `set_drawer_open_disabled(True, cb=...)`. The callbacks receive no arguments. If no callback is set, the action is silently consumed.
250+
220251
## Starting Activities
221252

222253
### Basic Navigation

docs/other/release-checklist.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,34 @@ git diff --stat 0.6.0 internal_filesystem/ # Check changes since last release,
2121

2222
This will trigger the GitHub builds at https://github.com/MicroPythonOS/MicroPythonOS/actions
2323

24-
**Download the builds**
24+
**Tag the commit**
2525

26-
When finished, download and extract the builds as artifacts from the [GitHub actions](https://github.com/MicroPythonOS/MicroPythonOS/actions).
26+
When finished, check to make sure the tests were green.
27+
28+
Then, tag the freshly built commit with something like:
29+
30+
`git tag 0.17.0 64b8597713`
31+
32+
In the example above, 0.17.0 is the CURRENT_OS_VERSION and 64b8597713 is the commit that was built.
33+
34+
**Push the tag**
35+
36+
Run:
37+
38+
`git push --tags`
39+
40+
This will trigger the github "release.yml" workflow, which will create a [draft release](https://github.com/MicroPythonOS/MicroPythonOS/releases).
41+
42+
**Test the draft release**
43+
44+
Make sure it's all good to go.
45+
46+
**Publish the draft release**
47+
48+
Edit the draft release on GitHub.
49+
50+
- Copy-paste the list from `CHANGELOG.md` into it
51+
- Click "Publish"
2752

2853
**Release to Over-The-Air update**
2954

@@ -46,13 +71,6 @@ When finished, download and extract the builds as artifacts from the [GitHub act
4671
- Extract it to ../web/
4772
- Run ../upload_web.sh
4873

49-
**Release to GitHub**
50-
51-
- Upload the builds a [new GitHub release](https://github.com/MicroPythonOS/MicroPythonOS/releases/new)
52-
- Fill in the new tag (e.g. 0.6.0)
53-
- Copy-paste the list from `CHANGELOG.md` in it
54-
- Add the "What to do" section at the bottom
55-
5674
**Bundle and publish apps**:
5775

5876
```

0 commit comments

Comments
 (0)