mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Chaining click events (double/triple click etc) (#5369)
* Add comment about Click events * Remove unused `App._hover_effects_timer` * Add missing annotation * Add missing type annotation * Add `App._click_chain_timer` * Add support for click chaining (double click, triple click, etc.) * Create `App.CLICK_CHAIN_TIME_THRESHOLD` for controlling click chain timing * Some tests for chained clicks * Test changes [no ci] * Have Pilot send only MouseUp and MouseDown, and let Textual generate clicks itself [no ci] * Fix DataTable click tet [no ci] * Rename Click.count -> Click.chain * Test fixes * Enhance raw_click function documentation in test_app.py to clarify its purpose and behavior * Refactor imports in events.py: remove Self from typing and import from typing_extensions * Remove unnecessary pause in test_datatable_click_cell_cursor * Remove debug print statements and unnecessary pause in App class; add on_mount method to LazyApp for better lifecycle management in tests * Remove debugging prints * Add support for double and triple clicks in testing guide * Add a note about double and triple clicks to the docs * Turn off formatter for a section of code, and make it 3.8 compatible * Update changelog [no ci] * Simplify by removing an unecessary variable in `Pilot.click` * Remove debugging code * Add target-version py38 to ruff config in pyproject.toml, and remove formatter comments * Document timing of click chains * Pilot.double_click and Pilot.triple_click
This commit is contained in:
@@ -40,6 +40,9 @@ include = [
|
||||
[tool.poetry.urls]
|
||||
"Bug Tracker" = "https://github.com/Textualize/textual/issues"
|
||||
|
||||
[tool.ruff]
|
||||
target-version = "py38"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.8.1"
|
||||
markdown-it-py = { extras = ["plugins", "linkify"], version = ">=2.1.0" }
|
||||
|
||||
Reference in New Issue
Block a user