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

macOS fix window drawing behaviour #3297

Conversation

sweetppro
Copy link
Collaborator

@sweetppro sweetppro commented Jun 14, 2022

Fixes #3287

Fixes #3282

Fixes #3281

Fixes #3234

Fixes #3215

* updated MainMenu.xib to use autolayout
* reverted a number of changes from transmission#3278 transmission#3261
* removed unused *GearshapeTemplate* from macoxs/CMakeLists.txt
@GaryElshaw
Copy link
Contributor

GaryElshaw commented Jun 14, 2022

Nice work e hoa.

If you have some time i'd like to know what you think. #3295

@sweetppro
Copy link
Collaborator Author

sweetppro commented Jun 14, 2022

note, that this PR does actually keep Full Screen support if thats not entirely clear.
I just decided to go back to the drawing board, and start fresh rather than try to make the current code base work...

Ive implemented some auto layout into the main window, and utilised constraints to get rid of a a bunch of UI calculations.

@ckerr ckerr added scope:mac needs UI review This PRs has UI changes that need review type:ui type:fixup labels Jun 14, 2022
@ckerr ckerr requested a review from nevack June 14, 2022 17:05
@nevack
Copy link
Member

nevack commented Jun 14, 2022

Please, do not batch your changes like this.

  1. Use separate commits (even separate PRs, if eligible).
  2. Use actual git revert.

@sweetppro sweetppro requested a review from Coeur June 15, 2022 06:11
@GaryElshaw
Copy link
Contributor

GaryElshaw commented Jun 15, 2022

Please, do not batch your changes like this.

  1. Use separate commits (even separate PRs, if eligible).
  2. Use actual git revert.

@nevack That's not a review, it's unneeded criticism. What do you think of the substance of the code changes?

@nevack
Copy link
Member

nevack commented Jun 15, 2022

That's not a review, it's unneeded criticism. What do you think of the substance of the code changes?

I do not agree that it's unneeded criticism. It's just a suggestion to make review easier.

Also, I do think it's a must to have proper git revert commits, to have them separate in history.

I have taken a look at some parts of diff.

I think it is a dead end to keep even more code in Controller.
What do you think about moving some logic to new NSWindowCotroller subclass and have all UI-related work separate in it?

@GaryElshaw
Copy link
Contributor

GaryElshaw commented Jun 15, 2022

Controller is, i think, a behemoth. But i'm also biased in that i think there have been so many piecemeal changes that a proper code-review is needed and some good discussion. I think everyone is on the same page that the macOS client needs modernisation and is dedicated to doing it, but how that is implemented with the current codebase might have equally different answers.

Everyone has their own feeling about prioritisation. For example, this is mine for 4.0. I want the gui to be consistent across macOS #3295

Oh, and this is a blocker, i think: (#2705)

Edit: As an aside, if the only option to change code for this particular PR is based in Controller, then that's the only option. I doubt anyone is going to disagree that Controller should be disaggregated.

@sweetppro
Copy link
Collaborator Author

How about we just get T in a functional state before we discuss more refactoring.

@GaryElshaw
Copy link
Contributor

GaryElshaw commented Jun 15, 2022

No disagreement. But i think you may have missed what i was saying. Everyone is working with what exists and often that's a cludge. @ckerr is often at-ing me about png. That's cool, but the codebase won't allow svg, so we have what we have.

@sweetppro sweetppro changed the title macOS migrate mainwindow to autolayout macOS fix window drawing behaviour Jun 15, 2022
@livings124
Copy link
Member

I'm going to agree with @nevack and also request that changes be more reviewable in smaller PRs. If a refactor is done, Controller really does need to be broken up. And I would also advice against more large changes before the next pending major release.

@nevack
Copy link
Member

nevack commented Jun 15, 2022

For example, this is mine for 4.0

I already said, that we need to revert recent changes related to Toolbar/Full screen and iterate again over these bugs.
Major refactorings like this can be hard to test.
We are already in the state when fixes cause more serious bugs, than we had, IMHO

Copy link
Member

@ckerr ckerr left a comment

Choose a reason for hiding this comment

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

OK based on the feedback here I'm going to mark this as 'Request changes'....... @sweetppro would it be possible to stack this into smaller PRs for reviews?

If you're new to doing this in GitHub it's actually very easy: fix bug A in branch A and PR A to be merged into main. Then fix bug B in branch B which is branched off of A, and PR B to be merged into A. Repeat as necessary.

The nice thing is that when PR A gets merged into main, PR B will automatically get set to target main. This makes a nice queue of A, B, ... all pointing at main, even when B depends on A and C depends on B, etc.

@sweetppro
Copy link
Collaborator Author

OK based on the feedback here I'm going to mark this as 'Request changes'....... @sweetppro would it be possible to stack this into smaller PRs for reviews?

ok sure,
Ill close this and submit 3 seperate PRs - ive already moved the CMakeFileList change into its own seperate PR #3301

  • 1 to revert the toolbar change
  • 1 to revert fullscreen changes
  • and a final one to submit my new changes
    I am definitely not a GitHub wizard as I don't use it except for working on open source projects, so will do my best

@ckerr
Copy link
Member

ckerr commented Jun 15, 2022

Controller is, i think, a behemoth. But i'm also biased in that i think there have been so many piecemeal changes that a proper code-review is needed and some good discussion. I think everyone is on the same page that the macOS client needs modernisation and is dedicated to doing it, but how that is implemented with the current codebase might have equally different answers.

Everyone has their own feeling about prioritisation. For example, this is mine for 4.0. I want the gui to be consistent across macOS #3295

My first thought on these comments was negative, e.g. I really don't think macOS 10 is the priority for 4.0 and so I'm more negative about 3295 right now than I would've been, say, a couple of months ago.

But I think there is a good point here, and that is the question of what is the best / shortest path to get the macOS GUI stable and ready for public release? As I've said many times I'm not the macOS coder on the project so I don't really have the context to answer this. My goal is to have 4.0.0-beta.1 ready in < 1 month, so we shouldn't take on anything that can't get completed in that timeline.

@sweetppro
Copy link
Collaborator Author

@ckerr if we drop macOS10 support, #3295 would be unnecessary

sweetppro added a commit to sweetppro/transmission that referenced this pull request Jun 15, 2022
sweetppro added a commit to sweetppro/transmission that referenced this pull request Jun 15, 2022
@GaryElshaw
Copy link
Contributor

My goal is to have 4.0.0-beta.1 ready in < 1 month

Thanks Charles, that's the window.

ckerr pushed a commit that referenced this pull request Jun 16, 2022
* macOS remove NSWindow subclass

as discussed in #3297
@sweetppro sweetppro deleted the macOS-migrate-mainwindow-to-autolayout branch June 16, 2022 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs UI review This PRs has UI changes that need review scope:mac type:ui
5 participants