Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Adds state as param to currentWindow.js #10605

Merged
merged 1 commit into from
Sep 17, 2017

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Aug 20, 2017

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.

Resolves #10457

Auditors: @bsclifton

Test Plan:

  • covered by automated tests

Reviewer Checklist:

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

Resolves brave#10457

Auditors: @bsclifton

Test Plan:
- covered by automated tests
@NejcZdovc NejcZdovc added this to the 0.21.x (Nightly Channel) milestone Aug 20, 2017
@NejcZdovc NejcZdovc self-assigned this Aug 20, 2017
@codecov-io
Copy link

codecov-io commented Aug 20, 2017

Codecov Report

Merging #10605 into master will increase coverage by 0.06%.
The diff coverage is 65.38%.

@@            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
Flag Coverage Δ
#unittest 54.25% <65.38%> (+0.06%) ⬆️
Impacted Files Coverage Δ
...ponents/navigation/buttons/windowCaptionButtons.js 32.6% <10%> (-0.73%) ⬇️
app/renderer/components/navigation/navigator.js 75.18% <100%> (+1.49%) ⬆️
app/renderer/currentWindow.js 100% <100%> (+38.7%) ⬆️

@@ -60,7 +61,7 @@ class WindowCaptionButtons extends ImmutableComponent {
const props = { tabIndex: -1 }

return <div className={cx({
fullscreen: this.props.windowMaximized,
fullscreen: this.props.windowMaximizedFullScreen,
Copy link
Collaborator

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

Copy link
Contributor Author

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

Copy link
Collaborator

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

Copy link
Contributor Author

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()

Copy link
Contributor Author

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?

Copy link
Collaborator

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

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

issue created #10989

@ghost ghost added the sprint/1 label Sep 13, 2017
Copy link
Member

@bbondy bbondy left a 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!

@NejcZdovc NejcZdovc merged commit 5938bfd into brave:master Sep 17, 2017
cezaraugusto added a commit that referenced this pull request Sep 18, 2017
Followup #10605: Fixes window isFocused function that was not updated
@bbondy bbondy modified the milestones: 0.21.x (Developer Channel), 0.20.x (Beta Channel) Oct 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants