Commit Graph

4124 Commits

Author SHA1 Message Date
Will McGugan
204f3e48ed optimization 2023-01-08 22:32:09 +00:00
Will McGugan
acb206046a simplify resized widgets 2023-01-08 22:19:48 +00:00
Anthony Shaw
7a214578e9 Update query.py 2023-01-09 08:24:24 +11:00
Anthony Shaw
3f4bb0af3f Annotate only_one comment with additional context
See #1490
2023-01-09 08:14:06 +11:00
Dave Pearson
01ad0df17f Final tweaks to the "asking for help" blog post
It's not finished, it never will be, but it's good to go.
2023-01-08 21:10:50 +00:00
Dave Pearson
e12d1f8bbb Fleshing out the post a wee bit more
Needs whittling and rounding and stuff, perhaps, but I think I'm mostly
there. A post-dinner top-to-bottom read is in now in order before I finally
decide if I like it or not.
2023-01-08 17:51:32 +00:00
Will McGugan
ba3bda2c2c micro optimizations 2023-01-08 17:45:39 +00:00
Will McGugan
244b1e333c optimization 2023-01-08 17:30:11 +00:00
Will McGugan
958b6d1439 smoother animation with roundering 2023-01-08 16:53:06 +00:00
Will McGugan
80a33c074b more accurate optimization 2023-01-08 16:47:53 +00:00
Will McGugan
03a159e1c8 Remove timer import 2023-01-08 16:36:27 +00:00
Will McGugan
e8dc95351e comment, remove debug 2023-01-08 16:28:53 +00:00
Will McGugan
b13fc3d5b6 snapshot 2023-01-08 16:20:15 +00:00
Rodrigo Girão Serrão
b3495c6e92 Merge pull request #1509 from Textualize/fix-1508
Simplify Placeholder implementation
2023-01-08 11:19:29 +00:00
Dave Pearson
a3601cf0be Fix blog typo
The second of many, I'm sure.
2023-01-07 22:52:16 +00:00
Dave Pearson
a242d4b6c5 Fix blog typo
The first of many, I'm sure.
2023-01-07 22:50:35 +00:00
Dave Pearson
90d38cd0da WIP: devlog blog post about looking for help with Textual
Work in progress. First rough draft of ideas, committing and pushing to
remote as backup for the night.
2023-01-07 22:45:38 +00:00
Will McGugan
467953b1c4 Merge pull request #1503 from Textualize/cursor-blink-bug
Converting cell position to index
2023-01-07 07:43:32 -08:00
Will McGugan
702640fd2e Merge pull request #1514 from davep/blackify-isv-test
Run black over recent immutable sequence view tests
2023-01-07 07:43:14 -08:00
Will McGugan
9cad6fc846 Merge pull request #1513 from davep/blackify-tree-tests
Run black over recent Tree tests
2023-01-07 07:42:42 -08:00
Will McGugan
e11f563123 docstrings 2023-01-07 14:24:17 +00:00
Will McGugan
249c2f319f typing 2023-01-07 14:05:46 +00:00
Will McGugan
fd9c1de3e2 Call from thread method 2023-01-07 14:04:52 +00:00
Rodrigo Girão Serrão
c0d7f7cebf Add note about Textual limitation. 2023-01-07 09:47:56 +00:00
Rodrigo Girão Serrão
aad41b8de0 Fix height example.
[skip ci]
2023-01-07 09:44:39 +00:00
Rodrigo Girão Serrão
08baaf11f3 Refactor width reference. 2023-01-07 09:40:32 +00:00
Rodrigo Girão Serrão
8de6d8fd69 Add new width comparison example. 2023-01-07 09:40:03 +00:00
Rodrigo Girão Serrão
e37b6e8cca Update changelog. 2023-01-07 09:39:08 +00:00
Dave Pearson
779b10a0e8 Merge pull request #1314 from davep/refresh-community
Refresh community
2023-01-07 09:37:11 +00:00
Rodrigo Girão Serrão
4c3eb3e021 Update placeholder snapshot test.
Although there was no visual difference in the output, the snapshot tool was complaining because there are now less things to draw on the screen, thus the snapshots looked different. Hence, the placeholder snapshot needed to be updated.
2023-01-07 09:35:41 +00:00
Rodrigo Girão Serrão
94e8b77779 Simplify Placeholder implementation.
Instead of creating a private widget that is the only child of 'Placeholder', that was inheriting from 'Container', simplify everything. 'Placeholder' now inherits directly from 'Widget' and it saves a dictionary with its renderables per variant, instead of deferring that to the child '_PlaceholderLabel'.
2023-01-07 09:35:41 +00:00
darrenburns
c22cc30e71 Ensure pretty traceback for error in Widget compose method (#1505)
* Ensure pretty traceback for error in Widget compose method

* Fail fast and pretty tracebacks for Widget compose errors
2023-01-07 09:35:41 +00:00
Dave Pearson
1e8162e8d0 Add support for star/stop values on index
See https://github.com/Textualize/textual/pull/1495#pullrequestreview-1238616797
2023-01-07 09:35:41 +00:00
Dave Pearson
2bf41fe428 Correct docstring for the return type of index 2023-01-07 09:35:41 +00:00
Dave Pearson
53df47b401 Rename ImmutableSequence to ImmutableSequenceView
Also, in doing so, drop support for unrolling iterators and making them into
indexable sequences.

See the following feedback:

  https://github.com/Textualize/textual/pull/1495#pullrequestreview-1238616797
  https://github.com/Textualize/textual/pull/1495#issuecomment-1373553580
2023-01-07 09:35:41 +00:00
Dave Pearson
12c6129150 Tweak the unit tests for ImmutableSequence
Make it 100% clear that the tests that are about wrapping iterators actually
are wrapping iterators.
2023-01-07 09:35:41 +00:00
Dave Pearson
274bb634ca Only convert to an indexable sequence if absolutely necessary 2023-01-07 09:35:41 +00:00
Dave Pearson
948cb6676f Focus less on it being a list and more a thing that's wrapped 2023-01-07 09:35:41 +00:00
Dave Pearson
d95957188b Simplify ImmutableSequence.__bool__ 2023-01-07 09:35:41 +00:00
Dave Pearson
0029470b4b Add read-only access to the children of a TreeNode
See #1398.
2023-01-07 09:35:39 +00:00
Dave Pearson
2c827e18d0 Add a generic immutable sequence wrapper class
In anticipation of satisfying #1398, this adds a generic immutable sequence
wrapper class. The idea being that it can be used to wrap up a list or
similar, that you don't want the caller to modify.

This commit aims to get the basics down for this, and also adds a minimal
set of unit tests.
2023-01-07 09:35:00 +00:00
Darren Burns
ad6a716d09 Fix mouse01 example background transparency 2023-01-07 09:35:00 +00:00
Dave Pearson
af56d88a6d Add a public read-only parent property to TreeNode
See #1397.
2023-01-07 09:34:56 +00:00
Dave Pearson
b8500de1e9 Run black over recent immutable sequence view tests
Now that we're running black on tests...
2023-01-07 09:32:43 +00:00
Dave Pearson
ea8252cfcc Run black over recent Tree tests
Now that we're running black on tests...
2023-01-07 09:30:01 +00:00
Will McGugan
c7cb525a6a Merge pull request #1507 from Textualize/black-on-tests
run black on tests
2023-01-06 10:52:55 -08:00
Rodrigo Girão Serrão
93453af00e Update changelog. 2023-01-06 18:31:34 +00:00
Rodrigo Girão Serrão
d08699ff50 Update placeholder snapshot test.
Although there was no visual difference in the output, the snapshot tool was complaining because there are now less things to draw on the screen, thus the snapshots looked different. Hence, the placeholder snapshot needed to be updated.
2023-01-06 18:30:39 +00:00
Rodrigo Girão Serrão
0db3fa6701 Simplify Placeholder implementation.
Instead of creating a private widget that is the only child of 'Placeholder', that was inheriting from 'Container', simplify everything. 'Placeholder' now inherits directly from 'Widget' and it saves a dictionary with its renderables per variant, instead of deferring that to the child '_PlaceholderLabel'.
2023-01-06 18:25:01 +00:00
Rodrigo Girão Serrão
2867b09923 Update visibility reference. 2023-01-06 16:38:49 +00:00