MacDownApp / MacDownApp/macdown
Disable (some) menu commands when the editor is hidden
Nobody has claimed this yet.
- Dominant language
- Rich Text Format
- Stars
- 9.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Related: c3791dc
This is raised to me on Twitter. Currently the editor is always available for user input, even when it is hidden (either by dragging the divider or ⌘⇧E). This is confusing. I disabled keyboard input (and some built-in commands like cut, paste) in the commit mentioned above by making the editor read-only when hidden, but the same should also be applied to commands MacDown provides.
An easy way is to just list those commands in `-validateUserInterfaceItem:`, but that is neither clean nor future-proof. Need to find a better way to do it. (If only Objective-C has decorators like Python, sign.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with commit c3791dc and the editor's hidden/read-only state, then inspect how MacDown commands are validated through -validateUserInterfaceItem:. Determine a maintainable way to disable applicable commands while the editor is hidden without hard-coding a fragile list. Done means MacDown-provided commands no longer accept input when the editor is hidden, while remaining usable when it is visible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, objective-c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100