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

Converts Main into redux component #9678

Merged
merged 1 commit into from
Jun 30, 2017
Merged

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Jun 23, 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 #9452

Auditors: @bbondy @bridiver @bsclifton

Test Plan:

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

@NejcZdovc NejcZdovc added this to the 0.19.x (Nightly Channel) milestone Jun 23, 2017
@NejcZdovc NejcZdovc self-assigned this Jun 23, 2017
@NejcZdovc NejcZdovc force-pushed the redux/main branch 5 times, most recently from b36cd12 to 56f864c Compare June 24, 2017 06:56
})

// TODO can we remove this?
ipc.on(messages.BLOCKED_PAGE, (e, blockType, details) => {
Copy link
Contributor Author

@NejcZdovc NejcZdovc Jun 24, 2017

Choose a reason for hiding this comment

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

@cezaraugusto You commented this block, so can we remove it? (in this PR 2648803#diff-303f0b6a297506f2cc18bf7b4cb370c5R428)

@diracdeltas Do we need this ipc call at all, now that is commented out?

Copy link
Contributor

Choose a reason for hiding this comment

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

it was listening to a message but taking no action when fired iirc. I can't recall why I didn't remove but given it is doing nothing seems like a leftover so I'm fine removing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, thank you. Let's wait for @diracdeltas conifmation as well

Copy link
Member

Choose a reason for hiding this comment

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

Not sure. The code that was commented out was added by @bridiver in a12cac4.

Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure what it would do if it blocked the whole page. We also have to be very careful about what we do inside onBeforeRequest because it blocks resource loading. Created #9702 to make it more efficient, but we should be saving the data in appState and reading the blocked resources from there

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So right now we have only comment in this call. We need to determinate what to do with it. Currently we are not doing anything. Now if you don't have any objections I will remove it otherwise we need to add some logic into this function. In this state it's waste of space 😃

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 fine with removing 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.

Thank you for your inputs, function removed

@bridiver
Copy link
Collaborator

some actions are being changed to tabId and others to frameKey. I think we should prefer tabId for anything that we are changing

setFocusedFrame: function (frameProps) {
if (frameProps) {
setFocusedFrame: function (location, tabId) {
if (location) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this logic should be in the reducer. setFocusedFrame should only need tabId

Copy link
Contributor Author

@NejcZdovc NejcZdovc Jun 29, 2017

Choose a reason for hiding this comment

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

I refactored menu.js so that now uses correct implementation of the reducer and have access to the sate. But still we can't remove location completely, because eventStore don't have access to the store and I don't feel comfortable refactoring it in this PR.

Copy link
Contributor Author

@NejcZdovc NejcZdovc Jun 29, 2017

Choose a reason for hiding this comment

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

@NejcZdovc
Copy link
Contributor Author

@bridiver I changed all frameKeys into tabIds.

@NejcZdovc NejcZdovc force-pushed the redux/main branch 2 times, most recently from b74d997 to a661112 Compare June 30, 2017 10:19
@NejcZdovc NejcZdovc merged commit 5114cc3 into brave:master Jun 30, 2017
NejcZdovc pushed a commit that referenced this pull request Jul 14, 2017
…f platformUtil

When #9678 was merged, unfortunately menu.js was not updated to call the function.
Instead of updating to call the function, I updated all usage to resolve the value at the top of each file (preventing multiple unneeded calls)

Auditors: @NejcZdovc
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.

6 participants