Commit graph

74 commits

Author SHA1 Message Date
Darren Burns
3c120c0ab0
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
2024-12-11 16:25:42 +00:00
Pure
79810e5447 Use hamburger menu icon. 2024-09-26 00:44:42 +08:00
Dave Pearson
6828803288
Link ScreenSuspend and ScreenResume via see-also 2024-05-20 08:11:14 +01:00
Will McGugan
755603550a
Merge pull request #4340 from davep/see-also-mounts
Add see-alsos relating to (un)mounting
2024-03-26 11:35:48 +00:00
Will McGugan
fc56863f0f event docstrings 2024-03-26 11:34:50 +00:00
Dave Pearson
fe7a8998f8
Add see-also relating to (un)mounting 2024-03-26 11:17:21 +00:00
Dave Pearson
2299fdfc9c
Add the Unmount event to the docs 2024-03-26 08:55:08 +00:00
Dave Pearson
8d0edb1633
Tidy the documentation for the Show event 2024-03-20 13:46:56 +00:00
Dave Pearson
19f2e3b386
Tidy the documentation for the ScreenSuspend event 2024-03-20 13:41:57 +00:00
Dave Pearson
411834f62b
Tidy the documentation for the ScreenResume event 2024-03-20 11:42:43 +00:00
Dave Pearson
d99c684b6c
Tidy the documentation for the Resize event 2024-03-20 11:39:46 +00:00
Dave Pearson
e2df78cdfd
Tidy the documentation for the Print event 2024-03-20 11:35:40 +00:00
Dave Pearson
d061d6f56a
Tidy the documentation for the Paste event 2024-03-20 11:24:41 +00:00
Dave Pearson
1d4fcedabc
Tidy the documentation for the MouseUp event 2024-03-20 11:21:30 +00:00
Dave Pearson
a1f09bbe3d
Tidy the documentation for the MouseScrollUp event 2024-03-20 11:20:08 +00:00
Dave Pearson
a33b5c3123
Tidy the documentation for the MouseScrollDown event 2024-03-20 11:18:25 +00:00
Dave Pearson
5da3a127d3
Tidy the documentation for the MouseRelease event 2024-03-20 11:16:41 +00:00
Dave Pearson
80e3cff60b
Tidy the documentation for the MouseMove event 2024-03-20 11:14:49 +00:00
Dave Pearson
9d53193c45
Tidy the title for the MouseCapture event 2024-03-20 11:07:31 +00:00
Dave Pearson
d524f6c279
Tidy the documentation for the MouseDown event 2024-03-20 11:07:05 +00:00
Dave Pearson
e5c5fe4fd9
Tidy the documentation for the MouseCapture event 2024-03-20 11:05:15 +00:00
Dave Pearson
ff4ad4e8a5
Tidy the documentation for the Mount event 2024-03-20 11:02:26 +00:00
Dave Pearson
e075fcbc2f
Tidy the documentation for the Load event 2024-03-20 11:01:33 +00:00
Dave Pearson
f1dcfffc89
Tidy the documentation for the Leave event 2024-03-20 10:57:28 +00:00
Dave Pearson
9c33d85526
Tidy the documentation for the Key event 2024-03-20 10:56:04 +00:00
Dave Pearson
4a838ac86b
Tidy the docs for the Hide event 2024-03-20 10:54:32 +00:00
Dave Pearson
41f29522ee
Tidy up the docs for Focus 2024-03-20 10:51:59 +00:00
Dave Pearson
3ed0b54514
Add see-also for Leave to Enter 2024-03-20 10:50:03 +00:00
Dave Pearson
1a38d62526
Add see also for Enter and Leave to Click 2024-03-20 10:49:32 +00:00
Dave Pearson
1b07accc1e
Tidy up the docs for the Enter event 2024-03-20 10:48:10 +00:00
Dave Pearson
d09072f456
Tidy up the docs for the DescendantFocus event 2024-03-20 10:45:34 +00:00
Dave Pearson
573e4c59ec
Tidy up the docs for the DescendantBlur event 2024-03-20 10:43:03 +00:00
Dave Pearson
f0c4dcced1
Tidy up the docs for the Click event
Note the reliance on directing the reader to the `MouseEvent` documentation
so they can get the full range of information on properties and methods. Try
as I might I can't convince mkdocstrings to "borrow" from the parent class
in any meaningful way.
2024-03-20 10:39:53 +00:00
Dave Pearson
79bd06380c
Don't use frontmatter where it isn't necessary 2024-03-19 15:43:27 +00:00
Dave Pearson
db1a76d225
Tidy Blur 2024-03-19 15:42:23 +00:00
Dave Pearson
638df75c88
Tidy AppFocus 2024-03-19 15:29:47 +00:00
Dave Pearson
d43b458ab8
Tidy AppBlur 2024-03-19 15:27:28 +00:00
Dave Pearson
a47be5a347
Add AppFocus and AppBlur to the events
Now that they're supported by more than just textual-web it makes sense to
expose them a little better in the docs.
2024-03-18 11:50:50 +00:00
Dave Pearson
1f03c0724a
Add the Print event to the list of events in the reference 2024-03-18 11:22:19 +00:00
Dave Pearson
eb396f065f
Link MouseCapture and MouseRelease with see-alsos 2024-03-18 10:46:32 +00:00
Dave Pearson
016308d965
Tidy up the Resize event docs 2024-03-18 10:41:29 +00:00
Dave Pearson
e8c9c13f7e
Tidy up the Paste event docs 2024-03-18 10:40:01 +00:00
Dave Pearson
58b0b1b4f0
Tidy up the MouseUp event docs 2024-03-18 10:39:14 +00:00
Dave Pearson
f442bbcd3c
Tidy up the MouseScrollUp event docs 2024-03-18 10:38:41 +00:00
Dave Pearson
bf07041d6f
Tidy up the MouseScrollDown event docs 2024-03-18 10:38:01 +00:00
Dave Pearson
5f1a8362f6
Tweak the documentation for MouseRelease 2024-03-18 10:33:52 +00:00
Dave Pearson
2fdccc83be
Tidy up the MouseMove event docs 2024-03-18 10:33:01 +00:00
Dave Pearson
298c10057c
Tidy up the MouseDown event docs 2024-03-18 10:32:25 +00:00
Dave Pearson
e421403ea7
Tweak the documentation for MouseCapture 2024-03-18 10:06:45 +00:00
Dave Pearson
5bc0276f3d
Update the documentation for the Key event 2024-03-18 10:03:47 +00:00