-
Notifications
You must be signed in to change notification settings - Fork 672
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
#3076
base: v2_develop
Are you sure you want to change the base?
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.
Fixes gui-cs#3503. Improves "View Editing" for Scenarios (e.g. `AdornmentsEditor`)
Broke some stuff.
Now that |
I think you are heading in the right direction. Go with it :-) |
I'm confused about KeyBindingScope, though. That should be implicit, by the object graph. Otherwise, it breaks some pretty basic assumptions most people make in OOP and especially in C#, and especially when events are involved. If there is to be such a property, it seems to me it should be defined recursively, so that a node in the graph farther from root never has a higher value than anything closer to root. That turns the object model on its head otherwise. A simpler option would be for hotkeys to live at the root level, and just have a reference to the object that declared them. |
I find this suggestion hard to parse. First, Second, your wording is very general, and I struggle to see what you really mean. It would be great if you could explain yourself with some code examples (even pseudo-code). Note, I know the design isn't perfect and there's parts of it that worry me, but I have very intentionally exercised it with a bunch of real-world use cases in various new Views and Scenarios and it works great. This particular PR definitely stresses it, which is part of my motivation to do this. |
Fixes gui-cs#3497. Removes `LayoutStyle`
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. |
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)