Skip to content

A style's missing action is NoStyleAction; right-clicks are the action's own - #245

Merged
trissim merged 1 commit into
mainfrom
style-action-family
Nov 6, 2026
Merged

trissim merged 1 commit into
mainfrom
style-action-family

Conversation

@trissim

@trissim trissim commented Nov 6, 2026

Copy link
Copy Markdown

1 commit. This follows #244, whose StyleAction | None was IMPL-9: None branched on (_activation.py:43's handler.action is not None), and right-click handling had to re-decode the action by type. Toad's NRA gate caught both on its companion PR.

  • NoStyleAction: the member for meta that names no action. run returns False and activations() offers no target, so the None test is gone.
  • StyleAction.secondary(app, namespace, event): a right-click on the drawn text, False by default. MarkdownLink asks its widget through OpensMarkdownLinks.link_menu.
  • run returns whether there was an action.

Proof: key, binding, markdown, links, text area, option list, tree and data table tests: 655 passed. The 3 test_editor_state reds fail identically on clean main.

🤖 Generated with Claude Code

…n's own

#244 left HandlerArguments.action as `StyleAction | None`, so _activation tested
`handler.action is not None` and every consumer of a decoded action had to ask again.

- NoStyleAction is the member for meta that names no action: its run returns False, and it
  offers no activation target, so `activations()` replaces the None test in _activation.
- StyleAction.secondary(app, namespace, event) is a right-click on the drawn text; the default
  answers False. MarkdownLink asks its widget (OpensMarkdownLinks.link_menu), so an app adds a
  link menu by overriding one method instead of re-decoding the action by type.
- run returns whether there was an action to run, which HandlerArguments.run passes on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 05:54
@trissim
trissim merged commit bbc2fde into main Nov 6, 2026
2 of 22 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants