Commit Graph

4788 Commits

Author SHA1 Message Date
Will McGugan
bcf382d2ff typing of Final 2023-02-07 09:06:08 +00:00
Will McGugan
af7fb9b02a Experiment 2023-02-06 18:01:41 +00:00
Will McGugan
29ba43af01 typealias import 2023-02-06 17:49:12 +00:00
Will McGugan
069ef11df8 Experiment 2023-02-06 17:44:29 +00:00
Will McGugan
fe793b348a remove print 2023-02-06 17:38:08 +00:00
Will McGugan
f803dd8265 type alias 2023-02-06 17:22:01 +00:00
Will McGugan
48124bdc0d fix finals 2023-02-06 17:17:02 +00:00
Dave Pearson
aece00e1dc Remove the keystrokes from the dictionary example in events guide
As well as not being necessary for the example, it also had the problem of
not actually having the input in focus (there was no press of 'tab' to kick
things off) and so the other keys didn't go into the `Input` as they were
supposed to.
2023-02-06 16:06:50 +00:00
Dave Pearson
4e4353b2ce Remove the dictionary example from the front page of the docs
Sometimes, when building the docs, this would end up being a bit of an
"empty" example in that the time taken to get the result back from the API
would be so long that the output would be of the request just in progress.

So we've decided to drop this from the front page.
2023-02-06 16:04:52 +00:00
Dave Pearson
a8ded8f0a6 Move some more live-site config into the correct config file 2023-02-06 14:28:13 +00:00
Dave Pearson
e6fbe71c04 Solve the problem of local docs and directory/index.html links
See https://github.com/Textualize/textual/issues/631#issuecomment-1418960080
-- this addresses that problem pretty much perfectly.
2023-02-06 14:05:21 +00:00
Dave Pearson
9acbc0cd67 Add a method of building a local copy of the docs
This will build the docs into a directory called docs-local, sans the blog.
Note the near-total copy/paste of the `nav` due to how mydocs does
configuration inheritance; this is fine for now.
2023-02-06 13:58:44 +00:00
Dave Pearson
dcdad6230f Move the blog config out into the "live site" config 2023-02-06 13:58:15 +00:00
Dave Pearson
6951ff5e60 Move almost all of the docs config into a "common" file
With #631 in mind, start by moving the vast bulk of the documentation
configuration into a "common" file, and just keep the `nav` in the main
configuration file. The thinking here is that I want two entry points -- one
for building the full docs for the Textual website, and one for building a
local version of the docs.

Because mkdocs doesn't allow for inheriting a configuration and also
splicing into the `nav`, we'll be looking to duplicate the `nav` for now --
this will likely change eventually as that'll be a maintenance overhead that
we don't really want (will likely look at templating it or something). For
now though, let's look at the best way of splitting things up and seeing how
we can generate two different versions of the docs.
2023-02-06 13:29:49 +00:00
Will McGugan
fb7fd14262 Merge pull request #1710 from Textualize/line-api-docs
Documented the Line API
2023-02-06 11:42:57 +00:00
Will McGugan
f8577f79d7 review fixes 2023-02-06 11:34:37 +00:00
Will McGugan
b12c5e1cdf typo 2023-02-05 12:12:27 +01:00
Will McGugan
738837fd66 review update 2023-02-05 12:06:48 +01:00
Will McGugan
f56823a733 better diagram 2023-02-04 17:47:49 +01:00
Will McGugan
e81ac17c6c revised copy 2023-02-04 17:35:09 +01:00
Will McGugan
8540900d3b add test for extend_cell_length 2023-02-04 17:16:00 +01:00
Will McGugan
a05398378f diagram tweak 2023-02-04 16:24:40 +01:00
Will McGugan
dc1fce3da7 svg update 2023-02-04 16:13:42 +01:00
Will McGugan
59def1a591 test fix 2023-02-04 16:10:33 +01:00
Will McGugan
de2a4fd78d test fixes 2023-02-04 15:53:00 +01:00
Will McGugan
fb7c1642bc Checker example 4, docs and diagram 2023-02-04 15:40:36 +01:00
Will McGugan
25b498896d checker 4 and diagram 2023-02-04 11:28:07 +01:00
Will McGugan
a5808db8b8 more docs and diagrams 2023-02-03 19:10:03 +01:00
Will McGugan
2ff278874b docs examples and diagrams 2023-02-03 11:23:14 +01:00
Dave Pearson
9f9ccf32d6 Merge pull request #1715 from davep/package-tests
Include the unit tests in the source distribution
2023-02-02 14:15:57 +00:00
Dave Pearson
244372205e Include the unit tests in the source distribution
As requested in #631 and also #1349; this change should cause the tests (and
also the examples from the docs directory which get pulled into the tests)
to be pulled into the sdist.

With this change I can:

- `poetry build`
- Grab and extract the resulting tarball
- `poetry install --extras dev` inside the resulting directory
- `poetry run pytest -vv tests` inside the resulting directory

As I understand the request, I think this should provide everything
necessary.

NOTE: We have spoken about rolling the CLI tools into snapshot tests too, so
if that happens we should remember to make sure that the pipeline outlined
above still works fine.
2023-02-02 13:51:45 +00:00
Will McGugan
d3fdcbe250 Merge pull request #1712 from Textualize/titles
Update to title and subtitle copy
2023-02-01 18:16:45 +01:00
Will McGugan
8ce76f4f89 fix title update 2023-02-01 18:01:34 +01:00
Will McGugan
087654a246 Update docs/guide/app.md
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-02-01 17:49:33 +01:00
Will McGugan
340f7c53bc Update docs/guide/app.md
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-02-01 17:49:05 +01:00
Will McGugan
8fc978503b Merge pull request #1711 from davep/textual-keys-older-pythons
Make `textual keys` work on older supported Pythons
2023-02-01 17:44:44 +01:00
Will McGugan
259c1cc14e tip to info 2023-02-01 17:43:29 +01:00
Will McGugan
c04e387dfe title copy 2023-02-01 17:38:19 +01:00
Dave Pearson
91630d6e04 Make textual keys work on older supported Pythons 2023-02-01 16:37:53 +00:00
Will McGugan
806c80b8fe simplify 2023-02-01 17:14:53 +01:00
Dave Pearson
79952719ae Merge pull request #1709 from davep/tree-complete-clear
Add `Tree.reset`, which clears a `Tree` and then then resets the `Tree.root`'s `label` and `data` to given values
2023-02-01 15:30:28 +00:00
Will McGugan
0a5838d964 checker example 2023-02-01 16:26:55 +01:00
Will McGugan
9e5814ed0f Strip improvements and line api 2023-02-01 16:22:14 +01:00
Rodrigo Girão Serrão
faa2ee68d7 Merge pull request #1706 from Textualize/document-sub-title
Document setting (sub) title in the app guide
2023-02-01 15:08:43 +00:00
Dave Pearson
d350374e59 Revert Tree.clear and add Tree.reset
After some internal discussion we've decided to keep `Tree.clear` as it was,
and add a `Tree.reset`, which does a `Tree.clear` but resets the label and
data of `Tree.root` to the values given, while mirroring how `Tree.__init__`
takes those parameters.
2023-02-01 15:08:03 +00:00
Rodrigo Girão Serrão
2140aa52d2 Update docs/guide/app.md 2023-02-01 14:53:20 +00:00
Dave Pearson
8b4a833e26 Update the CHANGELOG 2023-02-01 13:47:48 +00:00
Dave Pearson
78f49f0ab2 Allow replacement of the root node data when clearing the tree 2023-02-01 13:44:53 +00:00
Dave Pearson
ff7f2488f8 Remove Tree class name clash with how pytest works
Just before doing the commit I decided to rename the test tree in the new
unit test for clearing down a tree. Of course I managed to name it in such a
way that it becomes special to pytest.

This fixes that.
2023-02-01 12:45:18 +00:00
Dave Pearson
7563d4cb7e Allow setting a new label when performing a clear on a Tree
See #1437 for background. While it would be ideal to allow for the complete
emptying of a Tree, the root node is required (and it's part of the
construction of a Tree). So, here, when clearing the Tree we optionally
allow for a new label to be given.

Ideally we'll also allow for fresh data to be provided too; but there's a
wrinkle there in knowing the difference between the data being None, and no
data being provided (so the current root's data being carried over).
Following the method of defaulting used in __init__ would cause problems. As
such, rather than roll all of this into one commit, this goes with the basic
requirement and the solution for data will follow.

Note this also starts some unit tests for the clearing of a Tree.
2023-02-01 12:33:36 +00:00