Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiP: Dialog widget #4044

Draft
wants to merge 44 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
1b82fc9
Initial dialog work in progress
davep Jan 9, 2024
492e262
Don't name the body widget like its an internal
davep Jan 10, 2024
eb23537
Flesh out a docstring
davep Jan 10, 2024
d6d6580
Don't pass the children to the super class
davep Jan 10, 2024
f8354d2
Add a little more styling
davep Jan 10, 2024
9c9d538
Style Labels in the ActionArea in a way the dev would generally expect
davep Jan 10, 2024
7a54458
Import tidy
davep Jan 10, 2024
65ffbdf
Isolate the dialog parts from the usual containers
davep Jan 10, 2024
0078d0d
Add a bit of debug code
davep Jan 10, 2024
91a6207
Remove the width for the Body
davep Jan 10, 2024
99157f3
Experiment with a get_content_height hack
davep Jan 10, 2024
a8e4157
Experiment some more with controlling the height of the body
davep Jan 11, 2024
8f58de3
Remove debug styling
davep Jan 11, 2024
0f0010e
Add a workaround for getting the action area in sync with the body
davep Jan 11, 2024
fd84c04
Fix a typo
davep Jan 15, 2024
4b5560d
Fix a typo
davep Jan 15, 2024
8788aa6
Add initial support for variants
davep Jan 15, 2024
69ffc18
Tidy the commenting in the CSS around variants
davep Jan 15, 2024
0674684
Tidy up the DOM info debug code
davep Jan 15, 2024
c24c989
Help debug some dimension information
davep Jan 15, 2024
c4fdbfb
Simplify the get_content_* exit paths
davep Jan 15, 2024
da312bc
Alert the developer if they misplace a GroupLeft
davep Jan 16, 2024
2308463
Add the scaffolding for Dialog documentation
davep Jan 16, 2024
871104a
Remove some debug code
davep Jan 16, 2024
5011b9e
Fix a copy/paste-o
davep Jan 16, 2024
cee3962
Trying to dial in a more complex dialog example
davep Jan 16, 2024
038e385
Add Dialog to the widget gallery
davep Jan 17, 2024
573225f
Make the more complex dialog example fit
davep Jan 17, 2024
031dbf3
Start to flesh out the guide for the dialog a bit more
davep Jan 17, 2024
989bfaf
Remove the additional notes
davep Jan 17, 2024
085f68f
Add an exception for a misplaced ActionArea widget
davep Jan 17, 2024
0faf005
Move the checking for multiple ActionArea into on_mount
davep Jan 17, 2024
c4d0161
Add initial testing for Dialog
davep Jan 17, 2024
1282003
Use get_child_by_type rather than query_one
davep Jan 18, 2024
15af7d1
Place the instructions for composing a dialog in their own section
davep Jan 18, 2024
b40d3f9
Add documentation for dialog variants
davep Jan 18, 2024
b5303a6
Add details on styling the body of the dialog
davep Jan 18, 2024
4f1f3e6
Use outer-width for the width calculation
davep Jan 18, 2024
feebb98
Swap the order of the styled dialog examples
davep Jan 18, 2024
e8e4edb
Improve the padding in the action area
davep Jan 18, 2024
251d536
Highlight the key lines in the TCSS
davep Jan 18, 2024
0927938
Remove example code from the docstring for Dialog
davep Jan 18, 2024
41e2dc7
Merge branch 'main' into dialog-widget
davep Jan 18, 2024
89de939
Add snapshot tests for the dialog docs examples
davep Jan 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix a typo
  • Loading branch information
davep committed Jan 15, 2024
commit 4b5560deebda663793b1edff7cbe8552ee74515c
2 changes: 1 addition & 1 deletion src/textual/widgets/_dialog.py
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
from ..widget import Widget

_MAX_DIALOG_DIMENSION: Final[float] = 0.9
"""The ideal maximum dimension for the dialog in respect to the sceen."""
"""The ideal maximum dimension for the dialog in respect to the screen."""


class Body(VerticalScroll, can_focus=False):