Commit Graph

4763 Commits

Author SHA1 Message Date
Dave Pearson
e8d8c93527 Remove hatch.toml 2023-02-09 16:25:53 +00:00
Dave Pearson
84ae7d448a Merge pull request #1726 from davep/package-docs
Allow for web vs local documentation building, with an eye on downstream packaging support
2023-02-09 16:00:44 +00:00
Dave Pearson
451fa3e50a Fix a typo 2023-02-09 15:52:14 +00:00
Dave Pearson
584df4530c Merge branch 'main' into package-docs 2023-02-09 15:49:56 +00:00
Will McGugan
1d19bb8d80 Merge pull request #1752 from Textualize/import-sorting-hook
Adds `isort` pre-commit hook, re-orders all imports in src and test directories
2023-02-09 15:34:29 +00:00
Darren Burns
64a805cb8d Merge branch 'main' of github.com:Textualize/textual into import-sorting-hook 2023-02-09 14:28:23 +00:00
Dave Pearson
989e71e749 Merge pull request #1751 from davep/checkbox-switch
Rename `Checkbox` to `Switch`
2023-02-09 14:24:00 +00:00
Dave Pearson
c436b57ed5 Merge branch 'main' into checkbox-switch 2023-02-09 13:57:15 +00:00
Dave Pearson
f092e9f46c Reorder some imports 2023-02-09 13:50:38 +00:00
Darren Burns
9287f64a66 Add isort pre-commit hook, sort imports in src and test directories 2023-02-09 13:28:08 +00:00
Will McGugan
67c2127e46 Merge pull request #1750 from Textualize/fix-screen-switch
exclude removed reactables
2023-02-09 12:08:24 +00:00
Will McGugan
74fc85054c docstring [skip ci] 2023-02-09 12:07:48 +00:00
Will McGugan
70d4d2ffc9 Merge pull request #1749 from davep/fix-tree-type-help
Remove the import/export of TreeNode from the widgets pyi file
2023-02-09 11:58:41 +00:00
Will McGugan
f450d98e3e snapshot 2023-02-09 11:55:36 +00:00
Will McGugan
67e19d84e3 changelog 2023-02-09 11:50:06 +00:00
Will McGugan
3a9c052d20 Added snapshot 2023-02-09 11:49:11 +00:00
Will McGugan
85df8d703e typing and changelog 2023-02-09 11:45:19 +00:00
Will McGugan
392b56e548 Added watch method 2023-02-09 11:42:58 +00:00
Will McGugan
93acc27482 test for is_attached 2023-02-09 11:17:41 +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
Will McGugan
6b91501ade exclude removed reactables 2023-02-09 11:04:37 +00:00
Will McGugan
6cd4d859b6 Merge pull request #1747 from Textualize/reactive-polish
Reactive polish
2023-02-09 10:29:20 +00:00
Dave Pearson
330e4db17c Remove the import/export of TreeNode from the widgets pyi file
We've moved TreeNode out of the general widgets import, requiring the user
to import from widgets.tree. When I made that change I missed this.
2023-02-09 10:27:48 +00:00
Will McGugan
7f997023ce force wait for idle 2023-02-09 10:18:01 +00:00
Will McGugan
b0a9c743ea Change reactable type 2023-02-09 09:46:07 +00:00
Will McGugan
507a2f8299 No need to return a bool here 2023-02-09 09:42:05 +00:00
Will McGugan
c66c8b6ad6 Reactivity improvements 2023-02-09 09:35:01 +00:00
Dave Pearson
5376b015f5 Bring the docs deployment target into the new approach
This one's a little vague right now, and I'm not sure how best to test this.
Looking at the mkdocs documentation it isn't clear to me that you *can*
provide the config file to the gh-build command, but there's example command
lines in the docs showing that you can.

Need to see if there's a safe way to test this out -- the last thing I want
to do is nuke our website.
2023-02-08 14:58:06 +00:00
Dave Pearson
a295c5f968 Work towards having a single nav file
The idea here is that there is a single file for the nav for all the docs,
both online and offline. The nav will be the full online nav in all its blog
glory, and then the build system will strip out the nav items relating to
the blog when building the offline version.

There's a wrinkle or two still in here; the main one being that when doing a
docs-serve, it seems that the cleaning up of the online nav doesn't happen
when you Ctrl-C out of the server. I'm not 100% sure of the cause of
this (there could be a couple of different reasons).

For now... I'm ensuring that the online/offline nav files are excluded from
git. It would be nice to find out how best to always ensure that the online
nav file is removed so nobody attempting to update the docs gets confused
about what to edit.
2023-02-08 14:36:56 +00:00
Rodrigo Girão Serrão
b86882ed0c Merge pull request #1742 from Textualize/rodrigogiraoserrao-patch-1
Update _data_table.py
2023-02-08 14:05:43 +00:00
Rodrigo Girão Serrão
aae2a8882a Update _data_table.py 2023-02-08 13:58:21 +00:00
Will McGugan
d67510e683 Merge pull request #1741 from davep/revert-old-blog-post
Revert retrofitting of example code in an old blog post
2023-02-08 13:49:05 +00:00
Dave Pearson
8d905b753d Revert retrofitting of example code in an old blog post
Makes sense to update all the docs to reflect the work done in #1738 but I
feel it doesn't quite make sense to retrofit this into an old blog post --
especially if the code it is referring to was like that at the time and
likely still will be for a wee while after this gets republished.
2023-02-08 13:39:24 +00:00
Dave Pearson
ddb2579168 Merge branch 'main' into package-docs 2023-02-08 11:40:15 +00:00
Will McGugan
1b050ea8b7 Merge pull request #1738 from Textualize/emit-start-with-self
Change emit to post to self.
2023-02-08 11:37:43 +00:00
Rodrigo Girão Serrão
c39b23f78d Final fixes. 2023-02-08 11:26:27 +00:00
Rodrigo Girão Serrão
e5e7c08afe Update docs accordingly. 2023-02-08 10:53:51 +00:00
Dave Pearson
86e1997b30 Merge branch 'main' into package-docs 2023-02-08 10:40:20 +00:00
Rodrigo Girão Serrão
bd719e057f Remove MessagePump.emit .emit_no_wait. 2023-02-08 10:39:53 +00:00
Will McGugan
1fd773f6ef Merge pull request #1737 from Textualize/typing-updates
typing fixes
2023-02-08 10:33:42 +00:00
Will McGugan
29875a66fc into [skip ci] 2023-02-08 10:31:35 +00:00
Will McGugan
aabc1cc898 fix typo [skip ci] 2023-02-08 10:20:47 +00:00
Dave Pearson
5e172dd635 Fully exclude the blog files from the offline docs build
The blog files were still getting included and packages, just not linked to
from the resulting "site". This meant that the final tarball was much bigger
than it needed to be, due to animated gifs and movs an the like.

This brings the tarball down from around 27M to 6.4M.
2023-02-08 10:02:02 +00:00
Dave Pearson
35be18f0e6 Explain the elaborate include path for docs in pyproject.toml
While it's still fresh in my mind as to why I wrote it like this, comment to
the effect so I'm not surprised by it in the future, or so someone else
reading it can know what the thinking was here.
2023-02-08 10:00:48 +00:00
Dave Pearson
fbdbd8928d Always poetry run commands that need a venv
It's a `Makefile` so it's handy to not have to think about if you need to be
within a poetry venv when running `make`. This commit adds a `poetry run`
before any command that needs the venv. This means that people who aren't in
a venv can just `make something` and it'll "just work", and the same is true
for those who are in a venv.
2023-02-08 09:46:47 +00:00
Dave Pearson
93f449366f Modify blog/rss plugin config to make search work again
Inheriting config for mkdocs requires that you use key/value pairs for the
plugins not a list of objects.
2023-02-08 08:41:16 +00:00
Dave Pearson
fb5346c894 Don't show the repository stats in offline mode
They require a connection, which isn't very offline...
2023-02-08 08:40:47 +00:00
Dave Pearson
9500fa925a Add a Makefile target that cleans everything cleanable 2023-02-08 08:26:34 +00:00
Dave Pearson
4055373725 Add a Makefile target for cleaning up the offline docs
Sometimes I want to be able to test from a fresh start, so this will be helpful.
2023-02-08 08:24:50 +00:00
Dave Pearson
e9fab41377 Relock
Updating mkdocs insiders' on my personal machine so I can test building docs
there and it wanted to relock again.
2023-02-08 08:24:08 +00:00