DieselMeister / Terminal.Gui.Elmish

An elmish wrapper around Miguel de Icaza's 'Gui.cs' https://github.com/migueldeicaza/gui.cs including a fable like view DSL.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrade to Terminal.Gui 1.0.0

fjoppe opened this issue · comments

Description

This is a great repository. I was building a User Interface with it, but I had some problems with ListView. If you scroll through the list, the cursor seems to be at the top all the time and the list scrolls away through the top of the View. This also happens in one of the examples in this repository.

I understand that the ListView has been changed a lot in gui.cs, so I cloned this repo and tried to upgrade to version Terminal.Gui.1.0.0 - which is only a few days old.

I quit because I found the upgrade quite painful. The last build error I got, which I could not solve, was about type RadioGroup.SelectedItemChangedArgs, which was not found in the Nuget package of Terminal.Gui. Perhaps there's something wrong with the package. But it may also be because some other referenced packages need to be upgraded. Perhaps an upgrade to dotnetcore5.0 would help, as Terminal.Gui also supports this framework version.

I hope package upgrade solves the ListView problem, not sure if it does, but it may be a good first step.

Repro steps

When operating a ListView with (from your examples):

            listView [
                Styles [
                    Pos (AbsPos 0,AbsPos 0)                
                    Dim (Fill,Fill)

                ]
                Value model.VoteResult
                Items model.VoteResultItems
                OnChanged (fun r -> dispatch (ItemSelected r))
            ]

Expected behavior

When running the ListView, a highlighted cursor may navigate up and down, and the list-content, smaller than the view area, does not scroll.

Actual behavior

When running, the cursor is always placed on the top line and the list content scrolls up and down when navigating then cursor, unless you delete the line with "OnChanged". But then you miss the selection info.

Known workarounds

Unknown. I hope upgrade to the new Terminal.Gui package solves this issue, as their changelog mentions a lot of work on ListView.

Hi. It will be a huge amount of work to upgrade to 1.0.0, they basically change all and remove stuff, which I specific ask for :( ... I have currently not much time. Have lot of work to do. But I didn't forget you :) I will migrate to 1.0.0...

It take a little time. But I will do it, promised!

The wrapper only works for the version I build.

Hi did some redesign on this one. Test the 2.0.164 alpha (it's the latest Termianl.Gui 1.6.4 with a Feliz-like DSL approach and a real diffing.