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

Fixes edit flow for bookmarks and folders #12589

Merged
merged 1 commit into from
Jan 12, 2018

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Jan 10, 2018

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.
  • Request a security/privacy review as needed. (Ask a Brave employee to help if you cannot access this document.)

Resolves #12484

Auditors:

Test Plan:

  1. Have a folder on Bookmarks Toolbar
  2. Right click on the folder, Edit Folder
  3. Change location to be 'Other Bookmarks' instead of 'Bookmarks Toolbar', click Done.
  4. Folder continues to display on Bookmarks Toolbar.

Reviewer Checklist:

  • Request a security/privacy review as needed if one was not already requested.

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.20.x (Beta Channel) milestone Jan 10, 2018
@NejcZdovc NejcZdovc self-assigned this Jan 10, 2018
@codecov-io
Copy link

codecov-io commented Jan 10, 2018

Codecov Report

Merging #12589 into master will increase coverage by <.01%.
The diff coverage is 73.33%.

@@            Coverage Diff             @@
##           master   #12589      +/-   ##
==========================================
+ Coverage   56.05%   56.05%   +<.01%     
==========================================
  Files         278      278              
  Lines       27065    27075      +10     
  Branches     4381     4384       +3     
==========================================
+ Hits        15172    15178       +6     
- Misses      11893    11897       +4
Flag Coverage Δ
#unittest 56.05% <73.33%> (ø) ⬆️
Impacted Files Coverage Δ
app/browser/reducers/bookmarksReducer.js 96.96% <100%> (+0.04%) ⬆️
app/common/state/bookmarkFoldersState.js 100% <100%> (ø) ⬆️
app/browser/reducers/bookmarkFoldersReducer.js 96.8% <63.63%> (-3.21%) ⬇️

Copy link
Member

@LaurenWags LaurenWags left a comment

Choose a reason for hiding this comment

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

Tested with steps from PR and original steps from logged issue.
Additional test done:
Have folder on Bookmark Toolbar.
Open Bookmarks Manager.
Right click on folder under Bookmarks Toolbar, select Edit Folder.
Update location to be Other Bookmarks, save.
Folder no longer displays on Bookmarks Toolbar and appropriately displays under Other Bookmarks.


if (oldFolder.isEmpty()) {
if (oldFolder == null) {
Copy link
Member

Choose a reason for hiding this comment

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

Will this condition ever get hit (null/undefined being passed in)? The caller isn't checking for null/undefined before calling .isEmpty() on the param

Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

++

@bsclifton bsclifton merged commit 986e10e into brave:master Jan 12, 2018
bsclifton added a commit that referenced this pull request Jan 12, 2018
Fixes edit flow for bookmarks and folders
bsclifton added a commit that referenced this pull request Jan 12, 2018
Fixes edit flow for bookmarks and folders
@bsclifton
Copy link
Member

master 986e10e
0.21.x 0a62a7e
0.20.x 999e451

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