Skip to content

Code Quality: Move new tab button to TabBar itself #15585

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

Merged
merged 4 commits into from
Jun 17, 2024

Conversation

0x5bfa
Copy link
Member

@0x5bfa 0x5bfa commented Jun 10, 2024

Summary

MainPage doesn't have to hold the button, rather than that TabBar should be responsible to that button. Also less code on MainPage code-nehind will help us in the future when we actually decided to remove ShellPanesPage (aka PaneHolderPage previsouly)

Resolved / Related Issues

To prevent extra work, all changes to the Files codebase must link to an approved issue marked as Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.

  • Closes #

Steps used to test these changes

Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.

  1. Open Files app
  2. Create a new tab
  3. See no crash or hang

@0x5bfa 0x5bfa changed the title Code Quality: Move new tab button to TabBar to have its responsible by the control self Code Quality: Move new tab button to TabBar itself Jun 11, 2024
@yaira2
Copy link
Member

yaira2 commented Jun 11, 2024

I think I'm the one who did it this way, but I don't remember why. It might be worth looking at earlier commits to see why it was placed in MainPage.

@0x5bfa
Copy link
Member Author

0x5bfa commented Jun 12, 2024

I went back to blame/Files/Views/MainPage/253bd66ca894cf15ea4b0c012c5957b08bf388aa but I guess why this is here is we had also vertical tab button here. Then you just removed this button. Do you have an idea where you did talk about this?

And in my opinion, removing unnecessary xaml from MainPage would help us adding more features and TabBar has this button's responsibilility and MainPage doesn't have anything to do with this button.

@yaira2
Copy link
Member

yaira2 commented Jun 14, 2024

Agreed, aside from the vertical tab flyout, I'm not sure why we implemented it this way.

@0x5bfa
Copy link
Member Author

0x5bfa commented Jun 14, 2024

The first person who added Add new button to here #5214 but I understand it's normal thing to move it to MainPage because AddNewTab function was in MainPageViewModel

@yaira2
Copy link
Member

yaira2 commented Jun 16, 2024

Can you resolve the merge conflict?

yaira2
yaira2 previously approved these changes Jun 17, 2024
@yaira2 yaira2 merged commit 5afea98 into files-community:main Jun 17, 2024
6 checks passed
@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Jun 17, 2024
@0x5bfa 0x5bfa deleted the 5bfa/CQ-MoveAddNewTab2 branch June 17, 2024 14:58
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.

2 participants