-
Notifications
You must be signed in to change notification settings - Fork 975
Refactors PublisherToggle into redux component #9329
Conversation
app/common/state/publisherState.js
Outdated
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
const Immutable = require('immutable') |
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.
not sure if this file makes sense as a state helper. The state helpers should own a portion of the state and this is more of a set of utility functions that access other state helpers
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.
it's not done yet 😃 but yeah, both functions used here get something from state (state as a first param, that's why I added them to state). Should we only put things into state folder if they manipulate state?
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.
yes, they get something from the state, but they don't "own" part of the state. I think maybe better as util functions?
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.
sure I can move it into publisherUtil.js
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.
done
50528b2
to
eedb2fa
Compare
b3ce577
to
4a88708
Compare
4a88708
to
465f985
Compare
465f985
to
811697f
Compare
811697f
to
46c94e0
Compare
Let's merge this after #9415 is merged. This way unit test should stop failing. |
46c94e0
to
f96b02a
Compare
PR rebased and ready for a review |
f96b02a
to
a6d970b
Compare
Unit test is failing, let me check out what is going on |
a6d970b
to
cf1d0df
Compare
Unit test fixed |
@@ -115,6 +115,7 @@ class UrlBarIcon extends React.Component { | |||
} | |||
|
|||
mergeProps (state, ownProps) { | |||
console.log(state.get('tabs').toJS()) |
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.
?
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.
Removed
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.
remove debug logging and then ++
Resolves brave#9323 Auditors: @bridiver @bscfliton Test Plan:
cf1d0df
to
8717c97
Compare
Submitter Checklist:
git rebase -i
to squash commits (if needed).Resolves #9323
Auditors: @bridiver @bsclifton
Test Plan:
Reviewer Checklist:
Tests