Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create bookmarks from chrome API in 'Bookmarks bar' instead 'Other bookmarks' #6578

Closed
AlexeyBarabash opened this issue Oct 22, 2019 · 3 comments · Fixed by brave/brave-core#3778

Comments

@AlexeyBarabash
Copy link
Contributor

Description

With https://developers.chrome.com/extensions/bookmarks#method-create bookmarks are being created in Other bookmarks permanent node.
Since Other bookmarks node is hidden and moved for all platforms sync-consistency (#5158), bookmark should be created in Bookmarks bar

Found while looking on brave/brave-core#3749

Steps to Reproduce

STR:

  1. Launch clean profile
  2. Open brave://bookmarks
  3. Open inspector
  4. Run chrome.bookmarks.create({'title': 'TITLE', 'url': 'https://URL.com'}); in console

Actual result:

  1. See error
Error in event handler: TypeError: Cannot read property 'children' of undefined
    at Object.NodeState.createBookmark (chrome://bookmarks/reducers.js:215:36)
    at Object.NodeState.updateNodes (chrome://bookmarks/reducers.js:313:26)
    at Store.reduceAction [as reducer_] (chrome://bookmarks/reducers.js:475:24)
    at Store.reduce_ (chrome://resources/js/cr/ui/store.js:141:24)
    at chrome://resources/js/cr/ui/store.js:121:9
    at Store.dispatchInternal_ (chrome://resources/js/cr/ui/store.js:129:7)
    at Store.dispatchAsync (chrome://resources/js/cr/ui/store.js:110:12)
    at Store.dispatch (chrome://resources/js/cr/ui/store.js:120:12)
    at dispatch (chrome://bookmarks/api_listener.js:71:35)
    at onBookmarkCreated (chrome://bookmarks/api_listener.js:91:5)
  1. Reload brave://bookmarks/ page
  2. See bookmark is created in Other bookmarks permanent folder

Expected result:

No error, bookmark is created in Bookmarks bar

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Brave 0.73.18 Chromium: 78.0.3904.70 (Developer Build) (64-bit)
Revision edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5-refs/branch-heads/3904@{#800}

Version/Channel Information:

  • Can you reproduce this issue with the current release? no
  • Can you reproduce this issue with the beta channel? no
  • Can you reproduce this issue with the dev channel? no
  • Can you reproduce this issue with the nightly channel? yes

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields?
  • Does the issue resolve itself when disabling Brave Rewards?
  • Is the issue reproducible on the latest version of Chrome?

Miscellaneous Information:

@AlexeyBarabash
Copy link
Contributor Author

CC @darkdh

@darkdh
Copy link
Member

darkdh commented Oct 22, 2019

Screen Shot 2019-10-22 at 09 59 20

default is set to other bookmarks if we want it in bookmark bar we have to manually specify 'parentId': BOOKMARKS_BAR_ID

Or should we change the default location, @bridiver ?

@LaurenWags
Copy link
Member

LaurenWags commented Nov 20, 2019

Verified passed with

Brave 1.2.5 Chromium: 78.0.3904.97 (Official Build) dev (64-bit)
Revision 021b9028c246d820be17a10e5b393ee90f41375e-refs/branch-heads/3904@{#859}
OS macOS Version 10.13.6 (Build 17G5019)
  • Verified STR from description

Screen Shot 2019-11-20 at 4 45 57 PM

  1. Create with default parent

Screen Shot 2019-11-20 at 4 35 58 PM

2. Create with other_node specified

Screen Shot 2019-11-20 at 4 37 14 PM

3. Move

Screen Shot 2019-11-20 at 4 38 44 PM

Screen Shot 2019-11-20 at 4 42 46 PM

Verification passed on

Brave 1.2.7 Chromium: 78.0.3904.108 (Official Build) dev (64-bit)
Revision 4b26898a39ee037623a72fcfb77279fce0e7d648-refs/branch-heads/3904@{#889}
OS Windows 10 OS Version 1803 (Build 17134.1006)
  • Verified STR from the description
    image
  1. Create with default parent
    image

  2. Create with other_node specified
    image

  3. Move
    image
    image

Verification passed on

Brave 1.2.6 Chromium: 78.0.3904.97 (Official Build) dev (64-bit)
Revision 021b9028c246d820be17a10e5b393ee90f41375e-refs/branch-heads/3904@{#859}
OS Ubuntu 18.04 LTS
  1. Create with default parent
    image
  2. Create with other_node specified
    image
  3. Move
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment