@movq@www.uninformativ.de Iām completely with you. I just do rivoās approach with some of my own stuff that nobody ever sees. But the vast majority gets a real version. Probably not a changelog, but a version. And itās very small stuff.
Die Meisterschaft der Speisewagenschieber in Stuttgart: https://www.youtube.com/watch?v=OfgwdBBWzCw
Eine groĆartige Vorstellung einer Unfalluntersuchung. :-D
@lyse@lyse.isobeef.org Interesting approach. š¤
The master branch should never be in a broken state (apart from bugs I donāt know about). Any intermediate state during the development of a larger feature will happen in a different branch.
I mean, yeah, but ⦠I donāt know, I like having ātraditional releasesā as a second safety net when I write programs. I like to let things mature for a while and then I cut a new release. So itās, like, āwe have a bunch of new features and fixes here, and to the best of my knowledge this works fine nowā. But maybe Iām just paranoid. š¤
There: https://github.com/rivo/tview/issues/442#issuecomment-641898039
@movq@www.uninformativ.de Yes. The author tries hard not to break existing code, but apparently he did this time. In his defense, itās not an official release, I just updated to master. Which is exactly what I always did in the past as there are no real versions (I even think that in one ticket he wrote years ago that master is always stable). That has finally changed a year ago, though: https://github.com/rivo/tview/releases/tag/v0.42.0
@movq@www.uninformativ.de Brilliant! Oh, Iām super happy to get it all wrong together with you. :-)
[Release notes] are meant for human beings, itās a human-to-human interaction.
This is one of the most important messages. Absolute key, but misunderstood so often.
tt. But then, in the message tree, I spot another missed typo. My process is then to go to my twtxt.txt and fix it by hand. However, I still have to clean up tt's cache. This is rather tidious:
@lyse@lyse.isobeef.org Is it this one? https://github.com/rivo/tview Itās almost 10 years old but hasnāt seen a 1.0.0 release yet? š¤
Updated draft: http://movq.de/blog/drafts/changelog/POSTING-en.html
Iāll probably publish this later today. Or maybe not at all. Itās one of those topics that might cause outrage because Iām getting it all wrong. š¤Ŗ
@movq@www.uninformativ.de Exactly!
Haha, GitHub. I āunlockedā the āachievementā called āQuickdrawā:
https://movq.de/v/efc96874f0/s.png
Itās for closing an issue very soon after it was opened.
Only problem: I was the one who opened it and it was a mistake, so I quickly closed it again. š¤¦āāļø https://github.com/bundlewrap/bundlewrap/issues/892
@lyse@lyse.isobeef.org Oh god, yeah. In other words: Devs need to think about who their target audience is. š
tt. But then, in the message tree, I spot another missed typo. My process is then to go to my twtxt.txt and fix it by hand. However, I still have to clean up tt's cache. This is rather tidious:
Fuck me! I tried to upgrade tview and the first thing I notice is a shitload of added dependency versions:
go.mod | 18 ++++-----
go.sum | 97 ++++++++++++++++++++++++++++++++++++++-----------
My code does not compile anymore as the view.FormItem interface was extended. Get/SetDisabled(ā¦) are quickly implemented, no worries.
But the tview.Primitive (what makes a widget) interface has now a bunch of PRIVATE methods. For focus handling. Would you believe that!? Thanks, I cannot satisfy this interface in my very custom widgets anymore. Okay then, I just embed *tview.Box. tt now successfully compiles, but does not react anymore on key presses and the message tree is not focused either.
Iām not in the mood to debug this shit. :-( Lunch time.
@movq@www.uninformativ.de I just ran across another thing. At least I personally couldnāt care less about CI infrastructure changes. Whether theyāre using github action a or b or c or version v or w, it is not of my interest. At all. (It might be useful to estimate the supply chain attack risk, though.) If the maintainers want to include them in the changelog ā and there are probably people to whom this information is crucial ā itās probably best to document CI infrastructure changes in their own section.
@movq@www.uninformativ.de You may want to include another antipattern to avoid in your article:
- bump $same_dependency from 1.0.0 to 1.0.1
- bump $same_dependency from 1.0.1 to 1.0.2
- bump $same_dependency from 1.0.2 to 1.1.0
- bump $same_dependency from 1.1.0 to 1.2.0
tt. But then, in the message tree, I spot another missed typo. My process is then to go to my twtxt.txt and fix it by hand. However, I still have to clean up tt's cache. This is rather tidious:
@movq@www.uninformativ.de Thank you very much! So, the concept is very similar. The root widget gets the input and can pass it to whatever child has the focus and so on.
My two main issues are the API design, that the input handler sometimes get an additional callback to notify the application about which element is focused, but sometimes not. And that focus switching sometimes just does not work as expected. Anyway.
As for rendering the selected button, I was also thinking about indicating it with some kind of border around it, square brackets seem to be a wonderful choice. :-)
@itsericwoodward@itsericwoodward.com Why hear? Iāll just put it up at https://twtxt.app now shall I? Itās good enough IMO that itās already working quite well. The challenging parts now is to figure out a good set of default publishing connectors to support? š¤
@prologic@twtxt.net I look forward to hearing more about it.
@itsericwoodward@itsericwoodward.com Yes really š¤£
In todayās #caturday image, Emperor Maximilian the First tries to teach his subjects how to play Sequence, despite never having read the rules himselfā¦
9-year-old me found this on the Fediverse last night:
https://restorationgames.com/thunder-road-ignition-pre-orders-open/
He said it was āradā, and wouldnāt shut up about it until I preordered it.
Now hopefully heāll stop asking for things for a bit so my other ages can have a turnā¦
@prologic@twtxt.net Awesome work!
Iāve been thinking about learning Go for a while, maybe this will be the thing that finally gets me to do it.
@prologic@twtxt.net ORLY? š¤©
tt. But then, in the message tree, I spot another missed typo. My process is then to go to my twtxt.txt and fix it by hand. However, I still have to clean up tt's cache. This is rather tidious:
With multicolored TUIs, I find it usually hard to immediately tell which button is selected if there are just two.
Indeed, I wouldnāt be able to tell in that example, either. movwin works around that by (mostly) assuming that there is no support for colors at all, so there should always be a way to tell which widget has focus, even without colors. Thatās why it puts brackets around a buttonās label when focused:
The fewer colors you use, the better, I guess. š¤
tt. But then, in the message tree, I spot another missed typo. My process is then to go to my twtxt.txt and fix it by hand. However, I still have to clean up tt's cache. This is rather tidious:
Now Iām curious how movwin deals with that. ;-)
Focus handling? I hardly remember, lol. š Did that 6 months ago and havenāt touched it since. Letās see.
The core main loop gets keyboard/mouse events from curses. At this level, the main loop only knows about exactly one widget, so it passes the event to that widget (whatever that is, doesnāt matter ā they all inherit from the Widget base class, it could be a Window, a WindowManager, or an Edit box directly).
The outermost widget is usually a WindowManager. It implements a few hotkeys of its own, like switching to another window. If none of those hotkeys match, it passes the event to the currently focused window.
Same story here: Window implements some hotkeys (like opening the menu bar). If none of those match, then ⦠the magic happens.
Each Window acts as a focus manager. It can descend into its child widget hierarchy and collect all child widgets in a depth-first search. They are collected into a flat list. Each Window then has an attribute _focus_position, which is an index into that list. Pressing Tab or Shift+Tab increases or decreases that index and that allows you to select the next/previous focusable widget in the current window.
Eventually, Window passes the input event to the currently focused widget.
Usually on initialization, the application can ask a Window object to focus a certain widget. The file selection dialog does that, for example, because the ānaturalā focus order would be to focus the Edit box at the top of the window first ā but thatās not what the user wants, the Table showing the list of files should be focused.
If no widget ever feels responsible for handling a certain input event, then thereās a global unhandled_input callback that the application can provide (same as in urwid).
I think thatās it.
Hm, thatās more complicated than I remembered, but apparently it works fine, because I completely forgot about this. š
All I did in the last few months was make new classes that inherit from Widget, like the new Table class or Edit or HexEdit or whatever, and if they want to get input events, then they must implement the methods input_key() or input_mouse().
Does this answer your question? š (I admit that I didnāt exactly understand your scenario, so I just went ahead and rambled about my implementation. š )