Commit graph

223 commits

Author SHA1 Message Date
TomJGooding
af58978a91
docs(button): update spacing note (#5647)
Update the note in the button docs about removing the spacing, as the
default CSS was changed from `height: 3` to `auto`.
2025-03-19 16:19:03 +00:00
Will McGugan
2fb51677f8
Merge pull request #5497 from TomJGooding/docs-masked-input-fix-code-annotations
docs(masked input): fix code annotations
2025-02-13 09:33:04 +00:00
Will McGugan
bda56ab531 words 2025-02-06 16:39:45 +00:00
TomJGooding
dc89d64cb8 docs(masked input): fix code annotations
Fix the incomplete annotations in the `MaskedInput` code example, which
appear to have been started but the content never actually added.
2025-01-25 16:50:15 +00:00
TomJGooding
dcc24eae82 docs: fix 'into' grammar 2024-12-30 20:33:02 +00:00
Darren Burns
4ba155bb68
Docstrings 2024-12-18 10:43:30 +00:00
Darren Burns
9695d04e0f
Update Select documentation 2024-12-18 10:39:09 +00:00
TomJGooding
fe5b37a327
docs(datatable): remove outdated cursor info (#5355) 2024-12-09 10:19:14 +00:00
Ikko Eltociear Ashimine
675c592788
docs: update markdown_viewer.md (#5295)
Wether -> Whether
2024-11-27 13:34:35 +00:00
Will McGugan
03e33b8408 more widgets 2024-10-18 13:38:05 +01:00
Will McGugan
6298acb2a2 link widget 2024-10-13 18:44:33 +01:00
Will McGugan
1e208b4a56 update digits docs 2024-10-05 17:37:12 +01:00
Darren Burns
e0f01e80d7 Update MaskedInput "added in version" note in docs 2024-09-05 07:59:21 +01:00
Angelo Mottola
9167a45005
Merge branch 'Textualize:main' into masked_input 2024-08-28 14:40:36 +02:00
TomJGooding
3316eb7555 it's -> its 2024-08-27 15:39:16 +01:00
TomJGooding
9a43e50472 behaviour -> behavior 2024-08-27 15:15:04 +01:00
Will McGugan
584dd0c7ad
Merge branch 'main' into masked_input 2024-08-27 12:32:14 +01:00
Will McGugan
0ae2464838
Merge branch 'main' into app-commands 2024-08-22 14:12:32 +01:00
Will McGugan
142ca7485c Remove classic footer 2024-08-22 13:29:50 +01:00
Will McGugan
7a9ab93826 docs 2024-08-22 12:37:30 +01:00
Will McGugan
3c48551f3d snapshots 2024-08-11 16:58:46 +01:00
Angelo Mottola
e437bf5bbe Introduced MaskedInput widget 2024-07-22 00:38:41 +02:00
Will McGugan
896b64fbe5 gradients and tests 2024-07-18 14:56:18 +01:00
Roy Attias
b61028d3df
Support zero-indexed line numbers in TextArea (#4471)
* widgets: text-area: Make the starting line number a kwarg

* Add snapshot test for TextArea.line_number_start and update docs

* Update snapshots

* Update snapshots using latest Textual version

---------

Co-authored-by: Darren Burns <darrenb900@gmail.com>
2024-07-11 12:41:34 +01:00
Charles Merriam
b5e165f533
Improvements to Widget DataTable documentation (#4706)
* Preamble.  Mention commonly searched for capabilities missing, e.g., formatting and filtering.

* Clarify zebra_stripes as using alternating styles.

* Expand Cursors section to mention None type of cursor, clarify keyboard and mouse events, and that row indices start at one.  Expand example for No Cursor option.

Also minor typos to previous two commits (preamble wording and zebra stripes).

* Expand sorting section for clarity.

Minor typos in Labeled Rows and Cursors sections.

* In Keys section, mention functions taking coordinates.

Fix typo in Sorting section.

* Minor changes

---------

Co-authored-by: Darren Burns <darrenb900@gmail.com>
2024-07-10 16:38:05 +01:00
Will McGugan
2c97dec49d
Merge pull request #4492 from mxovd/toast-docu
Add information about ToastRack styling to the toast widget documentation
2024-06-17 15:46:48 +01:00
TomJGooding
f4f1dfe194
docs(tabbed content): fix link to content switcher 2024-06-07 07:14:18 +01:00
Will McGugan
86c11a0b4d docs 2024-05-22 12:03:18 +01:00
Will McGugan
6bdec928bb fix focus 2024-05-22 11:49:30 +01:00
Will McGugan
374f742be4 new footer 2024-05-21 16:47:37 +01:00
mxovd
1f67f09da5
Update docs/widgets/toast.md
Co-authored-by: Dave Pearson <davep.org@gmail.com>
2024-05-08 22:44:06 +09:00
mxovd
174133a2b1
Update docs/widgets/toast.md
Co-authored-by: Dave Pearson <davep.org@gmail.com>
2024-05-08 22:44:00 +09:00
mxovd
ad3945180c Add information about toastrack styling to the toast widget documentation 2024-05-08 22:14:31 +09:00
Kâmuran İmran
20c1776baf
fix typo (#4468) 2024-05-01 17:22:09 +01:00
TomJGooding
c41c531431
docs: update selection list messages docs (#4399)
* remove selection toggled note

* update selected changed docstring

* add event handler to selected changed docstring

* remove differentiation of user interaction and API
2024-04-16 15:05:42 +01:00
Dave Pearson
bb01433de7
Clarify that SelectionList can use Rich Text
Fixes the misleading text that prompted #4361.
2024-03-29 15:08:44 +00:00
TomJGooding
012fdf6c6f Merge branch 'main' into feat-document-add-start-and-end-properties 2024-03-25 13:18:46 +00:00
Rodrigo Girão Serrão
8aba7b7c71
Active tab / tab pane can be unset.
Although we can't quite see what would be a use case for a tabbed content where there are tabs and none of them are active (for example, it's weird to think of a browser where we have a bunch of tabs open and none of them are active...), we decided we'd let that possibility exist in code: the reactive `.active` can be set to the empty string both on `Tabs` and on `TabbedContent`.
2024-03-14 14:56:21 +00:00
TomJGooding
11443e8918 add tip to text area editing docs 2024-03-06 21:24:46 +00:00
TomJGooding
313b1694b9 docs(loading indicator): add loading reactive tip 2024-03-04 17:35:14 +00:00
TomJGooding
5aaa6b539c
docs: fix tcss syntax highlighting (#4176)
Sorry but I spotted that the syntax highlighting was wrong in my last PR to
add tcss to the docs (#4171) where I had blindly copy pasted the code.

A quick grep found a few other places in the docs where the syntax
highlighting was wrong. This PR corrects the language to css.
2024-02-21 08:37:56 +00:00
Darren Burns
3abc8ee577
Text area fixes (#4157)
* Initial undo related machinery added to TextArea

* Initial undo implementation

* Basic undo and redo

* Some more fleshing out of undo and redo

* Skeleton code for managing TextArea history

* Initial implementation of undo & redo checkpointing in TextArea

* Increase checkpoint characters

* Restoring the selection in the TextArea and then restoring it on undo

* Adding docstrings to undo_batch and redo_batch in the TextArea

* Batching edits of the same type

* Batching edits of the same type

* Keeping edits containing newlines in their own batch

* Checking for newline characters in insertion or replacement during undo checkpoint creation. Updating docstrings in history.py

* Fix mypy warning

* Performance improvement

* Add history checkpoint on cursor movement

* Fixing merge conflict in Edit class

* Fixing error in merge conflict resolution

* Remove unused test file

* Remove unused test file

* Initial testing of undo and redo

* Testing for undo redo

* Updating lockfile

* Add an extra test

* Fix: setting the `text` property programmatically should invalidate the edit history

* Improving docstrings

* Rename EditHistory.reset() to EditHistory.clear()

* Add docstring to an exception

* Add a pause after focus/blur in a test

* Forcing CI colour

* Update focus checkpoint test

* Try to force color in pytest by setting --color=yes in PYTEST_ADDOPTS in env var on Github Actions

* Add extra assertion in a test

* Toggle text_area has focus to trigger checkpoint in history

* Apply grammar/wording suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Making max checkpoints configurable in TextArea history

* Improve a docstring

* Update changelog

* Spelling fixes

* More spelling fixes

* Americanize spelling of tab_behaviour (->tab_behavior)

* Update CHANGELOG regarding `tab_behaviour`->`tab_behavior`

* Various fixes

* Various fixes and improvements

* Updating tests to account for themes always being non-None

* Update CHANGELOG.

* Add TextArea.read_only to reactive attr table in TextArea docs

* Update TextArea docs regarding new features

* Cleaning up some typing issues

* Add actions for undo and redo

* Fix a typo

* Fix wording in docs/widgets/text_area.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Re-add return type hint

* PR feedback and fixing typos

* Mark breaking change in CHANGELOG

* Add undo/redo to docstring

* Add note on undo/redo bindings

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2024-02-15 14:21:13 +00:00
Darren Burns
fa4f75fd25
Text area undo redo (#4124)
* Initial undo related machinery added to TextArea

* Initial undo implementation

* Basic undo and redo

* Some more fleshing out of undo and redo

* Skeleton code for managing TextArea history

* Initial implementation of undo & redo checkpointing in TextArea

* Increase checkpoint characters

* Restoring the selection in the TextArea and then restoring it on undo

* Adding docstrings to undo_batch and redo_batch in the TextArea

* Batching edits of the same type

* Batching edits of the same type

* Keeping edits containing newlines in their own batch

* Checking for newline characters in insertion or replacement during undo checkpoint creation. Updating docstrings in history.py

* Fix mypy warning

* Performance improvement

* Add history checkpoint on cursor movement

* Fixing merge conflict in Edit class

* Fixing error in merge conflict resolution

* Remove unused test file

* Remove unused test file

* Initial testing of undo and redo

* Testing for undo redo

* Updating lockfile

* Add an extra test

* Fix: setting the `text` property programmatically should invalidate the edit history

* Improving docstrings

* Rename EditHistory.reset() to EditHistory.clear()

* Add docstring to an exception

* Add a pause after focus/blur in a test

* Forcing CI colour

* Update focus checkpoint test

* Try to force color in pytest by setting --color=yes in PYTEST_ADDOPTS in env var on Github Actions

* Add extra assertion in a test

* Toggle text_area has focus to trigger checkpoint in history

* Apply grammar/wording suggestions from code review

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Making max checkpoints configurable in TextArea history

* Improve a docstring

* Update changelog

* Spelling fixes

* More spelling fixes

* Americanize spelling of tab_behaviour (->tab_behavior)

* Update CHANGELOG regarding `tab_behaviour`->`tab_behavior`

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2024-02-14 13:11:14 +00:00
TomJGooding
e27c41c9ac
fix(text area)!: stop escape shifting focus if default tab behaviour (#4125)
* fix(text area): stop escape shifting focus if default tab behaviour

* fix recent update to changelog

* address review feedback

* update changelog
2024-02-07 10:19:34 +00:00
TomJGooding
a382bdc85e
docs(text area): fix code editor link (#4093) 2024-02-01 13:57:57 +00:00
Darren Burns
f017604cfc
TextArea default CSS (#4074)
* Starting CSS work for TextArea

* Remove xfail marker from test

* Adding component classes to TextArea, not using them yet

* Adding docstring for TextArea new component classes

* Passing all component styles to the theme so that they may be applied.

* Applying cursor component style

* Applying text-area--cursor-line component style

* Applying text-area--cursor-gutter component style

* Applying gutter cursor style correctly

* Default cursor styling

* CSS theming of the selection style

* default matching bracket theme in text area

* Support toggling dark and light mode

* Improve the theme on light mode for the cursor

* null check

* Snapshot for new default "css" theme of TextArea

* Hide cursor when TextArea doesnt have focus

* Some new docs for TextArea

* Add border to TextArea to fit more with Input

* Add note on how to remove the focus border effect

* Updating snapshots

* Updating snapshots

* Fixing tests to account for new TextArea border

* Fix a typo

* Updating CHANGELOG

* Update docs/widgets/text_area.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Add missing docstring

---------

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2024-01-31 11:15:54 +00:00
Darren Burns
d68e683574
Addressing pull request feedback 2024-01-25 15:31:32 +00:00
Darren Burns
a10eaf38cb Update defaults in docs 2024-01-24 13:29:03 +00:00
Darren Burns
39e7a42371 TextArea documentation updates 2024-01-24 12:03:15 +00:00
Rodrigo Girão Serrão
0e6769721b
Show TCSS as css instead of sass. 2023-12-20 17:11:30 +00:00