feat: Add comprehensive help screen modal

- Create HelpScreen with all keyboard shortcuts
- Add hardcoded sections for instructions
- Add binding for '?' key to show help
- Support ESC/q/? to close help screen
- Document notification compression feature in help
- Format help with colors and sections (Navigation, Actions, View, Search)

Features:
- Shows all keyboard shortcuts in organized sections
- Quick Actions section explains notification compression
- Configuration instructions for mail.toml
- Modal dialog with close button
- Extracts bindings automatically for display
This commit is contained in:
Bendt
2025-12-28 13:33:09 -05:00
parent fa54f45998
commit 977c8e4ee0
3 changed files with 157 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ from .widgets.EnvelopeListItem import EnvelopeListItem, GroupHeader
from .screens.LinkPanel import LinkPanel
from .screens.ConfirmDialog import ConfirmDialog
from .screens.SearchPanel import SearchPanel
from src.mail.screens.HelpScreen import HelpScreen
from .actions.task import action_create_task
from .actions.open import action_open
from .actions.delete import delete_current
@@ -142,6 +143,7 @@ class EmailViewerApp(App):
Binding("A", "accept_invite", "Accept invite"),
Binding("D", "decline_invite", "Decline invite"),
Binding("T", "tentative_invite", "Tentative"),
Binding("?", "show_help", "Show Help"),
]
)
@@ -652,10 +654,15 @@ class EmailViewerApp(App):
self.action_newest()
async def action_toggle_mode(self) -> None:
"""Toggle the content mode between plaintext and markdown."""
"""Toggle of content mode between plaintext and markdown."""
content_container = self.query_one(ContentContainer)
await content_container.action_toggle_mode()
async def action_show_help(self) -> None:
"""Show help screen with keyboard shortcuts."""
help_screen = HelpScreen()
self.push_screen(help_screen)
def action_next(self) -> None:
if not self.current_message_index >= 0:
return