-
Notifications
You must be signed in to change notification settings - Fork 2
Refactor TODONT module with configurable hotkey and bulk archive #16
Copy link
Copy link
Open
Description
Problem
The TODONT/Archive module has several limitations:
- The Archive hotkey (Cmd/Ctrl+Shift+Enter) is hardcoded with no way to customize it
- Archiving doesn't work on multi-selected blocks
- The ARCHIVED button styling replaces the button's inner text, which breaks accessibility (screen readers see "x" instead of "ARCHIVED")
- The module uses a raw keydown listener instead of Roam's command palette, so it doesn't appear in the command search
- Missing null-safety guards in
replaceTextand mobile icon handlers
Proposed Changes
- Accept
extensionAPIparameter ininitializeTodont, return{ toggle, cleanup }for proper lifecycle management - Register Archive command via
extensionAPI.ui.commandPalette.addCommandwith configurable default hotkey - Add
archiveBlockhelper usingupdateBlockfor multi-select support - Use CSS
::beforepseudo-element for ARCHIVED button styling (keeps text as "ARCHIVED" for accessibility) - Replace
styleArchivedButtonswithsyncArchivedButton/syncArchivedButtonspattern - Add null-safety guards and proper cleanup on extension unload
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels