Commit Graph

76 Commits

Author SHA1 Message Date
Dave Pearson
b7de48cca3 Border colour percentage (#1954)
* Allow setting an additional alpha on a border

See #1863.

* Update the ChangeLog

* Add snapshot tests for the border alpha value

* Extend the border snapshot tests

While this doesn't test *every* permutation, it covers enough bases that if
something were to change it should catch it.

* Tweak a typo in the border style examples

* Add border transparency percentage to the border docs

* Add a CSS example for using border transparency

* Add Color.multiply_alpha

* Update the CHANGELOG

* Multiply the alpha on a colour rather than replace it

As requested in
https://github.com/Textualize/textual/pull/1954#pullrequestreview-1328170386

(actually required while talking in person with Will, but noted in the
above)

* Multiply the alpha on a border colour rather than replace it

As requested in
https://github.com/Textualize/textual/pull/1954#pullrequestreview-1328170386

(actually requested while talking in person with Will, but noted in the
above)
2023-03-07 14:14:17 +00:00
Will McGugan
41003e356c Fix content width (#1910)
* fix calculation for scrollbars

* added snapshot

* fix for name change

* snapshot

* fix for textual colors

* remove logs

* scrollbar logic

* scroll logic

* remove dead code

* snapshot tests

* scrollbar mechanism

* tidy

* demo tweak

* preset window size

* no need for repaint

* Restore repaint

* wait for idle on pause

* colors tweak

* remove wait for idle

* snapshot

* small sleep

* change stabilizer

* debug tweaks

* remove debug

* remove debug

* snapshot test

* docstring

* changelog

* add pause
2023-03-02 14:39:31 +00:00
Dave Pearson
8c5fb38851 Merge branch 'main' into toggle-boxen 2023-02-27 10:31:06 +00:00
darrenburns
cbe2ab87c6 Datatable labelling rows (#1868)
* Renaming some component classes in DataTable

* Some more renaming of DataTable component classes

* Separate styling for fixed rows/columns from labels

* Highlight fixed rows/cols affected by colour differently

* Tweaking styles for fixed data in DataTable

* Update DataTable snapshots

* Add row label to Row metadata

* Wiring up some labelled row logic behind flags

* Renaming variable in DataTable

* Variable renaming in DataTable

* [no ci] Labelling rows progress

* Add RenderedRow abstraction to DataTable

* Computing label widths

* Use the Column object to represent row label column

* Ability to toggle row labels reactively

* Adjust width calculation for label widths

* Add DataTable.RowLabelSelected

* Posting the RowLabelClick message

* Hovering of row labels applies new style

* Remove a print

* Ensure horizontal scrolling with column cursor accounts for row label column

* Account for possible row labels in cell cursor horizontal scrolling

* Ensure cursor highlighting is correct on row label cells

* Document component class for DataTable label hover

* Test to ensure clicking row label emits correct event

* Add snapshot test for DataTable with fixed rows/cols and row labels

* Using pilot pause instead of wait_for_idle directly

* Update CHANGELOG

* Add a docstring

* Add a note to CHANGELOG.md about RowLabelSelected
2023-02-27 10:29:17 +00:00
Dave Pearson
24ce819867 Add snapshot tests for the toggle button examples 2023-02-23 22:05:47 +00:00
Will McGugan
5686147909 comment 2023-02-22 14:33:23 +00:00
Will McGugan
c63cab728b force pause 2023-02-22 14:08:54 +00:00
Will McGugan
801051b70b garantee order 2023-02-22 13:32:49 +00:00
Will McGugan
d0d50e4981 cache on 3.9 only 2023-02-22 09:49:10 +00:00
Dave Pearson
6ab9a424a2 Merge branch 'main' into promote-disabled 2023-02-15 10:14:21 +00:00
Will McGugan
0dac83668b Merge pull request #1791 from Textualize/textual-markdown
Textual markdown
2023-02-15 09:23:19 +00:00
Dave Pearson
ba9b2e03d9 Merge branch 'main' into promote-disabled 2023-02-15 08:47:20 +00:00
Dave Pearson
b4f8a6b778 Add disabled snapshot test to the general snapshot tests 2023-02-14 15:53:45 +00:00
Will McGugan
a94c725a3b tests and changelog 2023-02-14 15:26:27 +00:00
Darren Burns
f4cd51e5e8 Merge branch 'main' of github.com:Textualize/textual into datatable-cell-keys 2023-02-09 15:55:45 +00:00
Dave Pearson
c436b57ed5 Merge branch 'main' into checkbox-switch 2023-02-09 13:57:15 +00:00
Will McGugan
3a9c052d20 Added snapshot 2023-02-09 11:49:11 +00:00
Dave Pearson
decc1e2f3c Rename Checkbox to Switch
A new form of Checkbox will be arriving in Textual soon, working in
conjunction with a RadioButton. What was called Checkbox is perhaps a wee
bit heavyweight in terms of visual design, but is a style of widget that
should remain.

With this in mind we're renaming the current Checkbox to Switch. In all
other respects its workings remains the same, only the name has changed.

Things for people to watch out for:

- Imports will need to be updated.
- Queries will need to be updated; special attention will need to be paid to
  any queries that are string-based.
- CSS will need to be changed if any Checkbox styling is happening, or if
  any Checkbox component styles are being used.

See #1725 as the initial motivation and #1746 as the issue for this
particular change.
2023-02-09 11:10:30 +00:00
Darren Burns
0721d7fc87 Snapshot test for sorting 2023-02-08 10:39:04 +00:00
Rodrigo Girão Serrão
40fde8cfb9 Merge pull request #1610 from Textualize/fix-1607
Fix #1607 to allow programmatic style changes
2023-01-31 15:13:24 +00:00
Will McGugan
be5a67e903 fix auto width glitch 2023-01-31 12:13:25 +01:00
Will McGugan
71a0a6676f docstring [skip ci] 2023-01-30 19:02:35 +01:00
Will McGugan
4aa988347f add tests 2023-01-30 18:59:23 +01:00
Rodrigo Girão Serrão
b023d4e02e Improve tests. 2023-01-30 12:34:35 +00:00
Will McGugan
41be84b1a5 docstring 2023-01-26 16:01:48 +01:00
Will McGugan
2b3d966410 moar pauses 2023-01-23 12:31:18 +01:00
Darren Burns
36bf162847 Snapshot tests for column and row cursors in DataTable 2023-01-17 14:17:25 +00:00
Darren Burns
b4f2da025a Add pause after datatable snapshot test 2023-01-16 16:40:01 +00:00
Rodrigo Girão Serrão
dd478dd249 Make list_view snapshot test pass more reliably 2023-01-12 15:00:56 +00:00
Rodrigo Girão Serrão
e5375d0a2f Reset color cycle before tests.
We need to reset the color cycle for placeholders before each CSS property test because we need to ensure consistent colouring of the placeholders as tests are added/removed/reordered.
2023-01-09 16:26:33 +00:00
Will McGugan
91e23ff34c more pauses for demo? 2022-12-30 17:31:36 +00:00
Will McGugan
97627107cf add pause 2022-12-30 15:01:57 +00:00
Will McGugan
93716e714b Merge branch 'main' into nested-height-fix 2022-12-20 11:14:45 +00:00
Will McGugan
b265b855cd insert pause 2022-12-19 13:39:03 +00:00
Will McGugan
32b7308ac8 fox for nested heights 2022-12-19 12:54:06 +00:00
Will McGugan
002cbab0d5 add pause to action 2022-12-19 11:26:42 +00:00
Will McGugan
053b7f38e1 snapshot tweak 2022-12-19 10:27:29 +00:00
Will McGugan
cebeafbb8b Merge branch 'main' into list-view 2022-12-09 10:09:07 +00:00
Will McGugan
1f64127235 snapshot 2022-12-08 16:51:31 +00:00
Will McGugan
c405a3baea added demo to snapshots 2022-12-08 11:11:48 +00:00
Will McGugan
bec01bba91 fix for auto width and relative dimensions 2022-12-08 11:06:35 +00:00
Will McGugan
795265bc45 Merge pull request #1229 from Textualize/placeholder
Add Placeholder widget
2022-12-07 16:56:34 +01:00
Will McGugan
23c2c3edd3 fix for visiblity 2022-12-07 14:41:30 +00:00
Rodrigo Girão Serrão
ba5ec6b34b Merge branch 'main' of https://github.com/Textualize/Textual into placeholder 2022-12-05 15:08:01 +00:00
Will McGugan
962b7d64b4 pause 2022-12-04 17:25:09 +07:00
Will McGugan
0a8b001c62 fix for layer ordering 2022-12-04 17:17:27 +07:00
Darren Burns
eb8c078306 Merge branch 'main' of github.com:willmcgugan/textual into list-view 2022-11-23 11:03:40 +00:00
Darren Burns
b21eb0659b Adding list view snapshot test with key presses 2022-11-21 15:15:55 +00:00
Will McGugan
f7dade5a26 new tree control 2022-11-20 15:42:35 +00:00
Rodrigo Girão Serrão
0b30c3a1d5 Fix snapshot test by resetting colour cycle. 2022-11-18 15:54:32 +00:00