-
Notifications
You must be signed in to change notification settings - Fork 675
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
Fixes #3073: Adds Bar
as a replacement for StatusBar
& Menu
#3076
Conversation
Bar
as a replacement for StatusBar
Bar
as a replacement for StatusBar
Bar
as a replacement for StatusBar
Bar
as a replacement for StatusBar
265ce0a
to
b4599a9
Compare
Adding all possible text directions variants and improving scenario.
Partially Fixes gui-cs#2432 - `Dim.Auto` automatically sizes views based on `Text` - Replaces `View.AutoSize`
Adds V2 migration guide to API docs
…tSize Fixes gui-cs#3453. `LayoutSubviews` should use `ContentSize`
Fixes gui-cs#3501. `ContentSize` -> `GetContentSize()`/`SetContentSize()`
…iewport Fixes gui-cs#3140. TextView assumes Frame == Bounds
Oh certainly, I get that it's a targeted attempt at improving things (and it does). I intentionally spoke generically, because the concept I intended to convey is a general concept, but it was also a question, though not really properly posed as one, to be fair. In general, any object should be responsible for its own behaviors, or else a repository pattern is the appropriate alternative (where those objects are managed by a "repository" object that is responsible for telling everything what to do). That's a fundamentally different pattern from how most of TG is designed, though, so that's a non-starter anyway. The easiest and most appropriate comparisons I can make are to other UI frameworks, since they all kinda set the de facto standards and expectations for developers.1 So, I'll use WPF, WinForms, and JavaScript as usual. In all of those, the best place to handle user interaction is as close to the element they are interacting with or that the action is relevant to as possible. The loosest is JS, where you can certainly attach handlers to the window or document if you want, but are strongly advised not to do so. The questionWhat is the aim/purpose of KeyBindingScope? Footnotes
|
Did you read the keybindingscope docs and keyboard conceptual docs? |
Yes, and I'll re-read it again later, to see if I parse it any differently than before, but that's not what I'm looking for. What I was looking for was something more direct and distilled, and intentionally on-the-spot, for a pointed reason. Because, if it can't be related like that without referencing a conceptual doc, it may be an indication that it could stand to benefit from more design work. It was basically just a clumsy use of the Socratic method to lead to what my thought is on it, with the potential for my thoughts to be supplemented by your input, as well. The short version of my opinion on it is it's unnecessary, at least as implemented. The concept and the goal are great, but it seems a little bit heavy-handed and kinda unintuitive. Almost like a solution in search of a problem, but not really to that degree. Of course, that's from my perspective as someone who didn't write it or have the benefit of sharing a mind with who did implement it. 😅 |
Put another way, it seems like an over-definition, if that makes sense. But maybe I'm not grokking something staring me in the face. Which is the value of the back-and-forth, since I'm always a fan of RTFM regardless. :) And if that's the case, then it would just come down to doc tweaks. |
totally fair. I was responding on my phone as I was getting in bed. So for me it was basically being lazy.
All three of these are very common, real, use-cases. It leverages the brilliant |
Moved into separte files.
Still very confused about why this PR is not actually comparing to v2_develop. @dodexahedron: PLEASE HELP! |
Bar
as a replacement for StatusBar
Bar
as a replacement for StatusBar
& Menu
Ha I feel ya there. I am guilty of that plenty of times myself.
Right. That model is similar to RoutedCommand in WPF. I think I need to sleep on this a bit more, too. Right now, I'm still getting the sense of over-definition or at least what feels like an unxpected inversion of control. Here's what I would say, though, for sake of progress: Even if we end up coming to some consensus on a change to make to it, the work to do so will be the same then as it would be right now. So, in my opinion, this particular thing isn't really a blocker for this PR necessarily - just an item to keep in mind for potential refinement. Heck, maybe even for a future version. Though I also do feel like maybe the name of the type/property is part of what is nagging at me, maybe? Perhaps something mentioning Behavior instead of or in addition to scope might be more expressive? I dunno. Like I said, I would need to give it more thought. But right now I'd rather put those cycles into other work. :) |
Closing. Replaced by #3531 |
Fixes
Bar
view to replaceStatusBar
(and eventuallyMenuBar
) #3073Todos
Still very much a Proof of Concept/Prototype
Shortcut
view that holds aKey
,KeyBindingScope
,Title
, and helpText
.MenuItem
.View
s in theCommandView
(first) position. E.g.CheckBox
KeyBindingScope.Application
andKeyBindingScope.HotKey
.Bar
view thatStatusBar
(StatusBarStyle = true
,Orientation.Horizontal
)MenuBar
(StatusBarStyle = false
,Orientation.Horizontal
)Menu
(StatusBarStyle = false
,Orientation.Vertcal
)UI Catalog
to use the newBar
Pos.Align
Toplevel.StatusBar
Pull Request checklist:
CTRL-K-D
to automatically reformat your files before committing.dotnet test
before commit///
style comments)