Commit Graph

1043 Commits

Author SHA1 Message Date
Darren Burns
07c14c6e64 Fix broken overflow, add regression test 2022-05-04 12:11:12 +01:00
Will McGugan
8f861f86e1 Merge pull request #462 from Textualize/py10-ci
Add Python 3.10 to GitHub actions, upgrade mypy
2022-05-04 11:32:18 +01:00
Will McGugan
eaf5d11fed Merge pull request #461 from Textualize/devtools-macos-ci-skip
Skip CI-based MacOS devtools tests
2022-05-04 11:31:00 +01:00
Darren Burns
01815c7788 Merge branch 'css' of github.com:Textualize/textual into py10-ci 2022-05-04 11:10:47 +01:00
Darren Burns
ca65dc3f8c Add Python 3.10 to GitHub actions, upgrade mypy 2022-05-04 11:09:57 +01:00
Will McGugan
e5a1543431 Merge pull request #449 from Textualize/add-e2e-smoke-test-to-CI
[CI] Check that the "basic.py" sandbox script can be run for a few seconds without crashing
2022-05-04 10:50:37 +01:00
Darren Burns
b973234433 Fix skipif expression 2022-05-04 10:48:27 +01:00
Darren Burns
5e220b9468 Remove unused imports 2022-05-04 10:31:11 +01:00
Darren Burns
4a6b5a31f4 Merge pull request #459 from Textualize/expanded-css-hex-support
Support 3 and 4 character hex strings for colours
2022-05-04 10:23:54 +01:00
Darren Burns
74540d0f6c Skip CI-based MacOS devtools tests 2022-05-04 10:21:31 +01:00
Darren Burns
4ef7d150ea Merge pull request #457 from Textualize/style-error-omit-traceback
Omit style property setter frames from tracebacks
2022-05-04 10:01:17 +01:00
Darren Burns
bee66d4955 Use fstrings instead, test 3 and 4 character css hex colours 2022-05-04 09:55:41 +01:00
Olivier Philippon
e324de7613 [app] Move uvloop init logic to a private module function 2022-05-04 09:31:38 +01:00
Darren Burns
b7ebdd323f Support hex colours with 4 chars e.g. #ff0a 2022-05-03 17:46:29 +01:00
Darren Burns
21fa59d6a3 Support hex tripletds 2022-05-03 17:40:18 +01:00
Will McGugan
2841527ca6 Merge pull request #445 from Textualize/did-you-mean-feature-for-css-properties
[css] Add a "did you mean" suggestion when an unknown CSS property is spotted
2022-05-03 17:37:24 +01:00
Darren Burns
568f183862 Fix test asserting that we dont support hex3 values 2022-05-03 17:32:25 +01:00
Darren Burns
6eca86a05d Update tokenizer and Color.parse to not break on triple/quad hex values 2022-05-03 17:31:31 +01:00
Darren Burns
7368697386 Traceback frame omissions in style property setters 2022-05-03 17:11:23 +01:00
Olivier Philippon
a26822b257 [css] Add some docstrings following "did you mean" PR feedback 2022-05-03 17:10:00 +01:00
Olivier Philippon
3198d28588 [asyncio] Address "asyncio bugfixes for Python < 3.10" PR feedback 2022-05-03 16:33:03 +01:00
Olivier Philippon
26f138e69b [css] Address "did you mean" PR feedback 2022-05-03 15:40:06 +01:00
Olivier Philippon
f5aac5d028 [css] Use a HelpText for unknown CSS property name errors 2022-05-03 14:52:32 +01:00
Olivier Philippon
2c03f8cfe1 [css] Add a "did you mean" suggestion when an unknown CSS property is spotted
So using "bckgroundu: red" in a CSS file will report _"unknown declaration 'bckgroundu'; did you mean 'background'?"_
2022-05-03 14:52:32 +01:00
Olivier Philippon
3f7ab9ce5b [asyncio] Replace calls to asyncio's get_event_loop() with get_running_loop() where possible 2022-05-03 14:46:24 +01:00
Olivier Philippon
078b7c151b [e2e] The smoke tests no longer rely on the multiprocessing package
Running the scripts with this package leads to the following cryptic error in our CI, when run in macOS:
```
RuntimeError:
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
```
(and Python's docs clearly state that this `freeze_support` function has no effect when invoked on any operating system other than Windows ¯\_(ツ)_/¯ )
2022-05-03 14:45:48 +01:00
Olivier Philippon
85db9263a8 [e2e] Move the smoke tests to a new root folder "e2e_tests/" 2022-05-03 14:45:48 +01:00
Olivier Philippon
c78158296a [Python compatibility] Make the code work with Python 3.7+ 2022-05-03 14:45:48 +01:00
Olivier Philippon
4bc48d37a1 [CI] Check that the "basic.py" sandbox script can be run for a few seconds without crashing 2022-05-03 14:45:48 +01:00
Will McGugan
6fba64face Merge pull request #448 from Textualize/features-env
Add TEXTUAL features env var
2022-04-29 15:18:17 +01:00
Will McGugan
23fdfa39c3 typing fix 2022-04-29 14:57:18 +01:00
Will McGugan
5026b21e26 features module 2022-04-29 14:53:53 +01:00
Will McGugan
eac5345886 simplified features 2022-04-29 14:35:30 +01:00
Will McGugan
547e515017 debug feature 2022-04-29 14:32:14 +01:00
Will McGugan
cbbcf72823 features tests 2022-04-29 14:20:43 +01:00
Will McGugan
10ea36b36b Add TEXTUAL features env var 2022-04-29 14:20:09 +01:00
Will McGugan
280fd2eacc Merge pull request #446 from Textualize/fix-parse-error
fix broken align and error logic
2022-04-29 13:43:50 +01:00
Will McGugan
191a6b7775 fix broken align and error logic 2022-04-29 11:52:38 +01:00
Will McGugan
884bd6d894 Merge pull request #408 from Textualize/style-error-improvements
Style error improvements
2022-04-29 11:05:39 +01:00
Will McGugan
6b23631716 formatting 2022-04-29 10:59:56 +01:00
Will McGugan
1a3f65bb76 Merge branch 'css' into style-error-improvements 2022-04-29 10:56:27 +01:00
Will McGugan
3bec5cfa40 Merge pull request #443 from Textualize/add-web-colors-management-and-prefix-ansi-ones
[colors] Add management of named Web colors to our CSS processing, prefix ANSI ones with `ansi_`
2022-04-29 10:52:13 +01:00
Will McGugan
dd8b11be87 Merge branch 'css' into add-web-colors-management-and-prefix-ansi-ones 2022-04-29 10:47:40 +01:00
Will McGugan
5cf061c31c Merge pull request #432 from Textualize/buttons
button widget
2022-04-29 10:44:11 +01:00
Will McGugan
8e821d4113 lazy parse_rules 2022-04-29 10:34:35 +01:00
Will McGugan
233c2c4075 fix css reload 2022-04-29 10:20:32 +01:00
Will McGugan
ee82f28407 Update src/textual/dom.py
Co-authored-by: Darren Burns <darrenburns@users.noreply.github.com>
2022-04-28 15:26:32 +01:00
Will McGugan
ca62a0d533 fix property 2022-04-28 15:07:51 +01:00
Will McGugan
af3bb59ac0 Merge branch 'css' into buttons 2022-04-28 15:04:40 +01:00
Olivier Philippon
005943e79b Merge pull request #436 from Textualize/bugfix-display-none-is-being-ignored-in-vertical-and-horizontal-layouts
[layout][bugfix] Horizontal & Vertical layouts shouldn't display children that have `display: none`
2022-04-28 15:01:20 +01:00