-
Notifications
You must be signed in to change notification settings - Fork 973
Adds state as param to currentWindow.js #10605
Adds state as param to currentWindow.js #10605
Conversation
Resolves brave#10457 Auditors: @bsclifton Test Plan: - covered by automated tests
Codecov Report
@@ Coverage Diff @@
## master #10605 +/- ##
==========================================
+ Coverage 54.19% 54.25% +0.06%
==========================================
Files 244 244
Lines 21109 21112 +3
Branches 3258 3258
==========================================
+ Hits 11440 11455 +15
+ Misses 9669 9657 -12
|
@@ -60,7 +61,7 @@ class WindowCaptionButtons extends ImmutableComponent { | |||
const props = { tabIndex: -1 } | |||
|
|||
return <div className={cx({ | |||
fullscreen: this.props.windowMaximized, | |||
fullscreen: this.props.windowMaximizedFullScreen, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maximized and fullscreen are only the same thing on macos. We should specify one or the other
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I preserved the same functionality, I didn't change anything. So it's working the same way it was before. The only thing that I changed is naming, because we had/have both things in it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm only referring to the naming. We have maximized and fullscreen in one property? That's a bit confusing imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this is how we have it now 😃
props.isMaximized = isMaximized() || isFullScreen() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you propose? split it and use it separately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the existing logic seems wrong to me because fullscreen and maximized should not be treated the same way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current logic is working (no reports about any problems), so I would suggest that if it's not working we should open new issue for it. If we just want to refactor it we should open refactor issue. I think that this PR is not a right place to fix this, because we didn't introduced this naming in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NejcZdovc that seems fair but pls open an issue to track it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue created #10989
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the tests!
Followup #10605: Fixes window isFocused function that was not updated
Submitter Checklist:
git rebase -i
to squash commits (if needed).Resolves #10457
Auditors: @bsclifton
Test Plan:
Reviewer Checklist:
Tests