Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move horizontal TabView outside of PaneHolderPage #4209

Merged
merged 6 commits into from
Mar 24, 2021
Merged

Move horizontal TabView outside of PaneHolderPage #4209

merged 6 commits into from
Mar 24, 2021

Conversation

lukeblevins
Copy link
Contributor

Resolved / Related Issues

Itemize resolved / related issues by this PR.

Details of Changes

Prevent duplicate TabView instances on each page by moving the TabView to MainPage. This also includes an expanded drag region allowing users to drag the app window from the sidebar while keeping the right inset drag region which is now set a more reliable way. Finally, this PR adds back the removed TabViewItem transitions.

Validation

How did you test these changes?

  • Built and ran the app
  • Tested the changes for accessibility
  • Tested for regressions in right inset region.

Screenshots (optional)
image
Design remains the same and still allows for sidebar resizing

@lukeblevins
Copy link
Contributor Author

I can confirm a slight reduction in memory usage after this PR. For example, 10 open tabs went from 170 MB to 150 MB. The important part is that this PR fixes weird, user-facing behavior associated with having different instances of the TabView at once.

@d2dyno1
Copy link
Member

d2dyno1 commented Mar 22, 2021

For #4180

@yaira2 yaira2 added changes requested Changes are needed for this pull request and removed needs - code review labels Mar 22, 2021
@yaira2
Copy link
Member

yaira2 commented Mar 22, 2021

image
The tab strip is shifted when the multitasking setting is set to horizontal and the window is sized small.

@lukeblevins
Copy link
Contributor Author

@yaichenbaum This should be fixed now. I suggest merging this one despite the occasional weird behavior with the sidebar because it potentially fixes a crash during resize.

@lukeblevins lukeblevins added needs - code review and removed changes requested Changes are needed for this pull request labels Mar 24, 2021
@yaira2
Copy link
Member

yaira2 commented Mar 24, 2021

@duke7553 What's the occasional weird behavior with the sidebar that you're talking about?

@lukeblevins
Copy link
Contributor Author

@yaichenbaum The sidebar may enter a state where there is a gap between it and the content when it is in compact mode. This behavior is relatively rare and only occurs because the property change can't be communicated to the control on every open tab when their sidebar instances are unloaded due to the tab being unselected. This only occurs when multiple tabs are open and is usually easy to get back to normal by resizing the app window/toggling the sidebar open and closed.

@yaira2
Copy link
Member

yaira2 commented Mar 24, 2021

@duke7553 I'll check that out when I review this PR. We can probably resolve that and reduce memory usage by moving the sidebar out of PaneHolderPage as well.

Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! LGTM

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Mar 24, 2021
@yaira2 yaira2 merged commit 5417eac into main Mar 24, 2021
@yaira2 yaira2 deleted the tabsmove branch March 24, 2021 01:55
@gave92
Copy link
Member

gave92 commented Mar 27, 2021

Uff this crashes the app when toggling the "Enable dual pane mode" option in settings (because Window.Current.Content is not a MainPage when in Settings). Is there a better way to get a reference to the sidebar view model? If not we need to add some null checks.

@yaira2
Copy link
Member

yaira2 commented Mar 30, 2021

Uff this crashes the app when toggling the "Enable dual pane mode" option in settings (because Window.Current.Content is not a MainPage when in Settings). Is there a better way to get a reference to the sidebar view model? If not we need to add some null checks.

@gave92 Is that related to this issue https://appcenter.ms/orgs/FilesApp/apps/Files/crashes/errors/2706044090u/overview?

@gave92
Copy link
Member

gave92 commented Mar 30, 2021

@yaichenbaum yeah but @duke7553 has a fix in his other PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Enable dragging Files from top of sidebar
4 participants