-
Notifications
You must be signed in to change notification settings - Fork 788
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
base: main
Are you sure you want to change the base?
WiP: Dialog widget #4044
Commits on Jan 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1b82fc9 - Browse repository at this point
Copy the full SHA 1b82fc9View commit details
Commits on Jan 10, 2024
-
Don't name the body widget like its an internal
While the intention is that it won't be exported, I think it's sensible to give it a "public" name so we can refer to it in styling guides, so something can then style: Dialog > Body { ... } and so on, without needing to use leading underscores, making it look like they shouldn't do that.
Configuration menu - View commit details
-
Copy full SHA for 492e262 - Browse repository at this point
Copy the full SHA 492e262View commit details -
Some of this text is just reminders for the moment, and proper linking will need to be done too; but that can come once everything has settled down.
Configuration menu - View commit details
-
Copy full SHA for eb23537 - Browse repository at this point
Copy the full SHA eb23537View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6d6580 - Browse repository at this point
Copy the full SHA d6d6580View commit details -
Far from having the final styles yet; but this gets me started.
Configuration menu - View commit details
-
Copy full SHA for f8354d2 - Browse repository at this point
Copy the full SHA f8354d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c9d538 - Browse repository at this point
Copy the full SHA 9c9d538View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a54458 - Browse repository at this point
Copy the full SHA 7a54458View commit details -
Isolate the dialog parts from the usual containers
I was inheriting from various containers to build up the key parts of the dialog; the problem with that is that it's pretty easy for a developer using this dialog to also have done some pretty simple app-level styling of a Vertical or a Horizontal, and then things would start to fall apart in ways they might not expect. So here I just inherit from Widget and style the width/height/layout as needed. It's not much extra work and it helps keep some isolation.
Configuration menu - View commit details
-
Copy full SHA for 65ffbdf - Browse repository at this point
Copy the full SHA 65ffbdfView commit details -
While I'm trying to get to the bottom of how best to size all the various parts of the dialog, let's make it easier to see what part of the display is responsible for what space.
Configuration menu - View commit details
-
Copy full SHA for 0078d0d - Browse repository at this point
Copy the full SHA 0078d0dView commit details -
I want this, but this managed to sneak in too early; so reverting. There's currently a problem of wanting to width/height: auto this, but cap it at 1fr within the max-width/height of its container. Textual can't handle that right now; so we either need to find a better way of pulling this off, or CSS might need a bit of a tweak to support this.
Configuration menu - View commit details
-
Copy full SHA for 91a6207 - Browse repository at this point
Copy the full SHA 91a6207View commit details -
Experiment with a get_content_height hack
The plan isn't go actually go with this; but this sort of implements what I'm aiming for; so we'll riff on this for the moment.
Configuration menu - View commit details
-
Copy full SHA for 99157f3 - Browse repository at this point
Copy the full SHA 99157f3View commit details
Commits on Jan 11, 2024
-
Experiment some more with controlling the height of the body
Tidying up the way I calculate the ideal height for the body. As mentioned before, this isn't the ideal way to do things; it can give a flicker as the dialog is first shown; but it's an approximation of what I want at least.
Configuration menu - View commit details
-
Copy full SHA for a8e4157 - Browse repository at this point
Copy the full SHA a8e4157View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f58de3 - Browse repository at this point
Copy the full SHA 8f58de3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f0010e - Browse repository at this point
Copy the full SHA 0f0010eView commit details
Commits on Jan 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for fd84c04 - Browse repository at this point
Copy the full SHA fd84c04View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b5560d - Browse repository at this point
Copy the full SHA 4b5560dView commit details -
Add initial support for variants
I think I'll want to dial in the styling some more; but this is the core framework for this.
Configuration menu - View commit details
-
Copy full SHA for 8788aa6 - Browse repository at this point
Copy the full SHA 8788aa6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69ffc18 - Browse repository at this point
Copy the full SHA 69ffc18View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0674684 - Browse repository at this point
Copy the full SHA 0674684View commit details -
Configuration menu - View commit details
-
Copy full SHA for c24c989 - Browse repository at this point
Copy the full SHA c24c989View commit details -
Configuration menu - View commit details
-
Copy full SHA for c4fdbfb - Browse repository at this point
Copy the full SHA c4fdbfbView commit details
Commits on Jan 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for da312bc - Browse repository at this point
Copy the full SHA da312bcView commit details -
Add the scaffolding for Dialog documentation
More to add to this, more to write, but this kicks off the basics for documenting the Dialog.
Configuration menu - View commit details
-
Copy full SHA for 2308463 - Browse repository at this point
Copy the full SHA 2308463View commit details -
Configuration menu - View commit details
-
Copy full SHA for 871104a - Browse repository at this point
Copy the full SHA 871104aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5011b9e - Browse repository at this point
Copy the full SHA 5011b9eView commit details -
Configuration menu - View commit details
-
Copy full SHA for cee3962 - Browse repository at this point
Copy the full SHA cee3962View commit details
Commits on Jan 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 038e385 - Browse repository at this point
Copy the full SHA 038e385View commit details -
Configuration menu - View commit details
-
Copy full SHA for 573225f - Browse repository at this point
Copy the full SHA 573225fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 031dbf3 - Browse repository at this point
Copy the full SHA 031dbf3View commit details -
I think there might be some to add, still to be decided, but now's a good time to remove the placeholder in case that doesn't happen.
Configuration menu - View commit details
-
Copy full SHA for 989bfaf - Browse repository at this point
Copy the full SHA 989bfafView commit details -
Add an exception for a misplaced ActionArea widget
There's little point in someone putting one of these anywhere other than inside a Dialog; so blow up if they do.
Configuration menu - View commit details
-
Copy full SHA for 085f68f - Browse repository at this point
Copy the full SHA 085f68fView commit details -
Move the checking for multiple ActionArea into on_mount
This helps make testing for this easier; for one thing.
Configuration menu - View commit details
-
Copy full SHA for 0faf005 - Browse repository at this point
Copy the full SHA 0faf005View commit details -
Add initial testing for Dialog
Just some of the exception testing for now.
Configuration menu - View commit details
-
Copy full SHA for c4d0161 - Browse repository at this point
Copy the full SHA c4d0161View commit details
Commits on Jan 18, 2024
-
Use get_child_by_type rather than query_one
While I would never encourage it, ever, this does allow for a dialog within a dialog (and, really, just don't!).
Configuration menu - View commit details
-
Copy full SHA for 1282003 - Browse repository at this point
Copy the full SHA 1282003View commit details -
Configuration menu - View commit details
-
Copy full SHA for 15af7d1 - Browse repository at this point
Copy the full SHA 15af7d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for b40d3f9 - Browse repository at this point
Copy the full SHA b40d3f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b5303a6 - Browse repository at this point
Copy the full SHA b5303a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f1f3e6 - Browse repository at this point
Copy the full SHA 4f1f3e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for feebb98 - Browse repository at this point
Copy the full SHA feebb98View commit details -
Configuration menu - View commit details
-
Copy full SHA for e8e4edb - Browse repository at this point
Copy the full SHA e8e4edbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 251d536 - Browse repository at this point
Copy the full SHA 251d536View commit details -
Remove example code from the docstring for Dialog
There are more comprehensive examples in the main documentation; there's little point in having a cut-down version in the code too.
Configuration menu - View commit details
-
Copy full SHA for 0927938 - Browse repository at this point
Copy the full SHA 0927938View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41e2dc7 - Browse repository at this point
Copy the full SHA 41e2dc7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89de939 - Browse repository at this point
Copy the full SHA 89de939View commit details