-
Notifications
You must be signed in to change notification settings - Fork 973
Conversation
Some comparison of the merge props compute time with @bsclifton's exported file: |
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.
This is better for sure- but one of the main problems seems to be that every keydown is triggering a window action (which I think is unnecessary). Also, doing the punycode on each keystroke is expensive
@bsclifton what would you suggest? We have couple of options.
|
@NejcZdovc the save (or remove) when you click the button is the best option, IMO. But we'd still need a handler for if the button should be enabled or not (ex: is the length > 0 for title) |
a432b54
to
6ed3238
Compare
6ed3238
to
0bb5b9c
Compare
3f0712f
to
c27d482
Compare
590acc4
to
7b60afd
Compare
@bsclifton ok, now this PR is finally finished. I did complete rewrite of adding/editing bookmarks. |
c0372f1
to
21e2b13
Compare
js/state/siteUtil.js
Outdated
for (let i = 0; i < resultSize; i++) { | ||
const site = results.get(i) | ||
if (site.get('folderId') === folderId) { | ||
return |
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.
Please change this from return
to continue
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 😄
bc05c17
to
8d2f527
Compare
case appConstants.APP_ADD_BOOKMARK: | ||
case appConstants.APP_EDIT_BOOKMARK: | ||
{ | ||
const isSyncEnabled = syncEnabled() |
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.
nitpick for this section- it has enough logic and branches (if/else) that it would be nice to pull it out to a function so that it can be easily tested
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.
This section is fully covered with tests. I wouldn't move it into the function that is exportable. What we can do is move this block into the new function but keep it in the same file for internal use.
} | ||
|
||
onClose () { | ||
windowActions.setBookmarkDetail() | ||
windowActions.onBookmarkClose() |
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.
So much nicer! Thanks for taking the time to properly name these 😄
@@ -171,7 +171,7 @@ Notifies that a tab has been closed | |||
|
|||
|
|||
|
|||
### addSite(siteDetail, tag, originalSiteDetail, destinationIsParent, skipSync) | |||
### addSite(siteDetail, tag, skipSync) |
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.
❤️
js/state/siteUtil.js
Outdated
for (let i = 0; i < resultSize; i++) { | ||
const site = results.get(i) | ||
if (site.get('folderId') === folderId) { | ||
return |
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 😄
40dbd62
to
8a38142
Compare
Resolves brave#9674 Auditors: @bsclifton Test Plan: - have a lot of bookmarks (1k +) - try to add a bookmark with clicking on the star
8a38142
to
4538db1
Compare
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.
I found a few bugs which you had fixed @NejcZdovc 😄 Great job on this PR. Much needed overhaul on some of the older code and it makes a huge positive impact when users have a decent number of bookmarks. ++++!
Thank you very much for this late night review 😃 |
Submitter Checklist:
git rebase -i
to squash commits (if needed).Resolves #9674
Possible fix for #9602
Fix #5314
Fix #5508
Fix #4978
Auditors: @bsclifton
Add folder
Reviewer Checklist:
Tests