migueldeicaza / SwiftTermApp

MIT License
305 stars 29 forks source link

Use NavigationSplitView instead of NavigationView #205

Open Audiotape-2 opened 1 year ago

Audiotape-2 commented 1 year ago

Hi Miguel,

since the NavigationView is already deprecated I was wondering how one would use the ConfigurableUITerminal View in conjunction with a NavigationSplitView.

The problem I'm running into is that the first time I select a Host terminal shows up, everything is working fine. But as soon as I select a different host, nothing changes and there's still the first host's terminal displayed. Is it even possible to use a NavigationSplitView without major refactoring?

All the best, Johannes

migueldeicaza commented 1 year ago

It is a messy dance involving the “rehosting” feature. It is not really the navigation stack problem (it doesn’t help, but it isn’t the source of the problems)

The problem is really that this code is doing some ugly stuff to show the same view in multiple places when it shouldn’t.

a long term fix is to make TerminalView a pure view for the Terminal controller in SwiftTerm or avoid doing this dance

LaTerminalApp has the dance upgraded, but it has been so many changes that it is hard to extract a fix

Audiotape-2 commented 1 year ago

I see, thanks. Is the long term fix something you intend on doing at some point?

migueldeicaza commented 1 year ago

Yes, there is an issue filed in SwiftTerm, and I have a design doc I used a month or so ago when I first tried it