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

Converts bookmarksToolbar and bookmarkToolbarButton into redux #9030

Merged
merged 1 commit into from
Jun 23, 2017

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented May 24, 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).

Resolves #9421

Auditors: @bsclifton @bridiver

Note: Follow up for this PR is #9517 (PR #9611)

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 self-assigned this May 25, 2017
@NejcZdovc NejcZdovc added this to the 0.16.100 milestone May 25, 2017
@NejcZdovc
Copy link
Contributor Author

@luixxiul this is not ready for a review

@NejcZdovc NejcZdovc removed their assignment May 26, 2017
@NejcZdovc NejcZdovc self-assigned this May 30, 2017
@NejcZdovc NejcZdovc modified the milestones: 0.18.x, 0.17.x (Frozen, only critical adds from here) May 31, 2017
@NejcZdovc NejcZdovc mentioned this pull request Jun 3, 2017
51 tasks
@NejcZdovc
Copy link
Contributor Author

blocked on #9176

@NejcZdovc NejcZdovc modified the milestones: 0.19.x (Nightly Channel), 0.18.x (Developer Channel) Jun 13, 2017
@NejcZdovc NejcZdovc force-pushed the redux/bookmarks branch 4 times, most recently from e21ade1 to eaa5d50 Compare June 20, 2017 14:48
NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this pull request Jun 20, 2017
@NejcZdovc
Copy link
Contributor Author

@darkdh can you please check out why we still need this line https://github.com/brave/browser-laptop/pull/9030/files#diff-5da1a3da6effd6fc765f3f68b7162215R34 even though that this shouldn't be needed, because of this PR #8075. Note that we are getting state now directly.

Is it possible, that there is an delay (state is updated, but not sorted immediately) and because of that mergeProps get the old sort and because bookmarks are the same (after state sort is done) we don't trigger re-render?

@darkdh
Copy link
Member

darkdh commented Jun 22, 2017

sure, will look at it soon

return {
visibleBookmarks: noParentItems.take(i),
// Show at most 100 items in the overflow menu
hiddneBookmarks: noParentItems.skip(i).take(100)
Copy link
Collaborator

Choose a reason for hiding this comment

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

hiddne -> hidden

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

const {iconSize} = require('../../../js/constants/config')

const bookmarksState = {
getDNDBookmarkData: (state, bookmark) => {
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 these probably make more sense in bookmarkUtil. Bookmarks don't have their own state right now because they are part of sites

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved

Copy link
Collaborator

@bridiver bridiver left a comment

Choose a reason for hiding this comment

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

bookmarkState methods to bookmarkUtil and then ++

@NejcZdovc NejcZdovc force-pushed the redux/bookmarks branch 4 times, most recently from e3eeff8 to 7c1d22f Compare June 23, 2017 08:19
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