gui-cs / Terminal.Gui

Cross Platform Terminal UI toolkit for .NET
MIT License
9.69k stars 690 forks source link

`FileDialog` has a non-standard/non-intuitive keyboard nav model #3696

Closed tig closed 2 months ago

tig commented 2 months ago
        // BUGBUG: This TabOrder is counter-intuitive. The tab order for a dialog should match the
        // order the Views' are presented, left to right, top to bottom.
        // Determines tab order
        Add (_btnToggleSplitterCollapse);
        Add (_tbFind);
        Add (_spinnerView);
        Add (_btnOk);
        Add (_btnCancel);
        Add (_btnUp);
        Add (_btnBack);
        Add (_btnForward);
        Add (_tbPath);
        Add (_splitContainer);
tznind commented 2 months ago

Do you want me to delete the NavigateIf stuff?

Maybe it doesn't make sense anymore but original idea was for the cursor keys to move to the next logical area of 'primary' views. While the less used buttons (back, up and expand/collapse tree view) had to be tabbed to).

Idea being if you enter a folder path then press down you can cycle the selected files rather than it just moving focus to the Up arrow button.

image Primary views that most users will interact with in green, secondary views in red that are less often pressed

tig commented 2 months ago

I'd much rather use the UI requirements for FileDialog drive the built-in/default focus model than have FileDialog do a bunch of complex stuff.

In v2 (now...totally willing to adjust):

(From https://gui-cs.github.io/Terminal.GuiV2Docs/docs/navigation.html#keyboard-navigation):

image

In v1 this was totally inconsistent.

tznind commented 2 months ago

Ok I will delete all the bespoke logic and see where it gets us.