-
Notifications
You must be signed in to change notification settings - Fork 110
Subfolder support in the menu #66
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds subfolder navigation support to the badge menu launcher, allowing apps to be organized into directories. The menu can now browse into folders without __init__.py files, display folder-specific icons, and navigate back using a ".." entry.
- Implements hierarchical folder navigation with path stack management
- Adds folder and back navigation icons with fallback handling
- Refactors app discovery to support nested directory structures
Reviewed Changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| badge/apps/menu/init.py | Replaces flat app list with recursive folder scanning, adds navigation functions and refactors update loop to handle folder/back entries |
| badge/apps/menu/icon.py | Adds sprite_for() function to load appropriate icons based on entry kind with fallback logic |
| badge/apps/menu/folder_icon.png | New PNG icon for folder entries |
| badge/apps/menu/folder_up_icon.png | New PNG icon for back navigation |
| .github/copilot-instructions.md | Documents the new subfolder structure and navigation behavior |
|
I went on and added quick fixes to the existing apps so that they should launch also from subfolders. I also updated the simulator to support these changes. |
|
There is a fundamental problem with updating the main.py. It is overwritten when the badge is woken up from deep sleep which causes the subfolder support to fail and the badge to not boot properly. I need to fix this before this can be considered ready to merge. |
|
Ok, the full restart issue should now have been fixed as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 18 out of 20 changed files in this pull request and generated 5 comments.
Removing duplicate import. Co-authored-by: Copilot <[email protected]>
Removing duplicate imports. Co-authored-by: Copilot <[email protected]>
Removing unused imports Co-authored-by: Copilot <[email protected]>
Adding comments Co-authored-by: Copilot <[email protected]>
|
|
Hey @frye - given the limited storage on the badge, is subfolder support something you've found yourself needing already? |
|
Fairly big change, so going to hold off bringing this in for now as I quite like the simplicity of not having apps in subfolders especially given the limited storage on the device. |
100% Vibe coded. But seems to work on my badge (and simulator)
This pull request adds support for organizing badge apps into subfolders within the launcher, allowing users to navigate nested menus and group apps by category. The changes update both the documentation and the launcher logic to support folders, submenus, and improved icon handling.
Launcher navigation and folder support:
__init__.py) as navigable submenus, automatically adding a "back" entry at the top of each submenu and hiding system apps likemenuandstartupfrom the user-facing list. (badge/apps/menu/__init__.py,.github/copilot-instructions.md) [1] [2]badge/apps/menu/__init__.py)Icon and entry improvements:
badge/apps/menu/__init__.py,badge/apps/menu/icon.py) [1] [2]entrydictionary for each menu item, simplifying the logic for rendering, navigation, and launching apps. (badge/apps/menu/__init__.py)Documentation updates:
.github/copilot-instructions.md) [1] [2]Note: Some existing apps may not support being placed into a subfolder. If an app fails to launch from within a subfolder, it needs to be updated—most likely because it has a hardcoded path to the app directory instead of detecting it during launch.