Callback Naming Standardization #139
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#139
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rename callback properties to consistent
on_*pattern across all event types.Context
Current API uses inconsistent naming:
drawable.click- callback propertymcrfpy.keypressScene()- function to set scene keyboard handlerAs we add more event types (enter, exit, move, cell events), we need consistent naming. This is a breaking change - do it now before the API stabilizes further.
Definition of Done
clickproperty toon_clickon all UIDrawableson_keyproperty to UIDrawables (optional per-widget keyboard handler)scene.on_keyor keepkeypressScene()but document deprecation pathNew Callback Pattern
Callback Validation
When a callback is assigned, McRogueFace should inspect the callable's signature:
inspect.signature()orcallable.__code__.co_argcountwarnings.warn()*args, **kwargssignatures as compatible with anythingMigration
This is a breaking change. Options:
Recommend option 1 given current project maturity level.
Dependencies
Related Issues