tgstation / Tgstation.Server.ControlPanel

Official client for tgstation-server
GNU General Public License v3.0
7 stars 11 forks source link

Remove reliance on IsVisible for paging views, performance gains, fix avalonia previews #71

Closed bobbah closed 3 years ago

bobbah commented 3 years ago

Replaces the page pattern in MainView.xaml with DataTemplates, which allows us to avoid the performance hit from maintaining every single non-visible page. As a side effect, each component that was a page has been updated to correct the now-irrelevant PageContext.ActiveObject reference, as the scope has changed.

Entering and leaving the repo view is still noticeably slow, presumably because of all the elements being created and destroyed, but I have another PR coming down the line that hopes to ease that pain.

These changes also necessitated changing how the GitHubToken was passed between the MainWindowViewModel and the ConnectionManagerViewModel; I am now using actions and functions to perform this.

Also fixed Avalonia previews, as they couldn't be generated when the AppBuilder function took any args. Limitation of Avalonia's tooling.

Closes #70