-
Notifications
You must be signed in to change notification settings - Fork 700
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 #3692++ - Rearchitects drivers #3837
base: v2_develop
Are you sure you want to change the base?
Conversation
Hope you're ok with me updating the title & first post... |
Looks like AllView tester is double booting. And the LayoutEditor is constantly reporting true for redraw. Probably this should be an Exception though or ignored not bad behaviour
|
Hence the Issues and PRs around Top and rewriting Menu. See those.
Yes. See related menu PRs. |
- Ignore double init - Raise init changed event
Colors fixed, I just wasn't calling the init on config manager from the new bootstrapping Application2 class init |
private void HackLayoutDrawIfTopChanged () | ||
{ | ||
// TODO: This fixes closing a modal not making its host (below) refresh | ||
// until you click. This should not be the job of the main loop! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. That must be an Application
job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow, it seems to work with the original drivers but not the v2 ones.
V2 drivers only listen to these properties (needs layout/draw). There are no manual or triggered draws, so possibly that is why this hack is needed for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand, but I think that if you do the same thing in the Application.LayoutAndDraw
method you'll will obtain the same result, but I could be wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my code, layout and draw is only called if a subview of Top wants redrawn or layed out... I will look into it some more later
I think the remaining issues are to do with layout and/or the new iteration. I am trying to structure the new I could use some help, for example I see lots of LayoutException that get caught later on. Why does that happen with new loop and not old? It's hard to understand why. |
@tig my proposal for this branch would be to confirm
Then we can merge it and I can do a followup work where we log the hell out of everything in the library and I can start working on layout/draw issues. Regarding your feedback I have investigated and fixed most:
Fixed
Should work now, I was not loading configuration manager
Should also be fixed, unless it is LayoutException which is caught by a try/catch block elsewhere |
- fixes click drag v2 win
Creates new drivers that are simpler versions of existing WindowsDriver and NetDriver. Also introduces a shared architecture such that only subcomponents vary between driver implementations, as discussed in #3821 .
After a period of shared execution with both sets of drivers available we will fix any bugs and then retire the old drivers.
Curses driver is not tackled, I am hopeful it can be retired completely now that net input is so strong and well implemented in core dotnet framework.
Fixes
ConsoleDriver
to minimize duplicated code in all drivers #2319EscSeqUtils
#2803ConsoleDriver
s to support ANSI sequences natively (e.g. Virtual Terminal Sequences on Windows) #2610Button1Clicked
events onNetdriver
orCursesDriver
#3374Metrics
You can now see metrics on ant Terminal.Gui program by using its exe name and a metrics tool e.g.
Implementation uses System.Diagnostics.Metrics making it integrate easily with tools such as OpenTelemetry
Logging
You can enable logging of internals of Terminal.Gui by setting
Logging.Logger
to anyMicrosoft.Extensions.Logging
compatible logging framework (nlog, serilog etc).Naturally you must not use a console logger
For example with Serilog to a file:
Progress
MouseInterpreter
)Proposed Changes/Todos
Splits drivers up into logical components, simplifies and centralizes shared code patterns.
Pull Request checklist:
CTRL-K-D
to automatically reformat your files before committing.dotnet test
before commit///
style comments)