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

Bookmark customTitle from previously bookmarked entry is no longer re-used #3641

Merged
merged 1 commit into from
Sep 2, 2016
Merged

Bookmark customTitle from previously bookmarked entry is no longer re-used #3641

merged 1 commit into from
Sep 2, 2016

Conversation

bsclifton
Copy link
Member

@bsclifton bsclifton commented Sep 1, 2016

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Ran git rebase -i to squash commits if needed.

Bookmark customTitle from previously bookmarked entry is no longer re-used when re-bookmarking.

Fixes #3284

Auditors: @bbondy @luixxiul, @bradleyrichter

Test Plan:

  • Visit a site which is not bookmarked
  • Bookmark the site- when the modal comes up, provide your own title "ABC" and hit enter
  • Notice bookmark is using customTitle
  • Delete bookmark
  • Re-add bookmark- this time don't change the title
  • Notice bookmark is now properly using title (not the old customTitle)

@bbondy bbondy added this to the 0.11.7dev milestone Sep 1, 2016
@@ -109,9 +109,6 @@ module.exports.addSite = function (sites, siteDetail, tag, originalSiteDetail) {
tags = tags.toSet().add(tag).toList()
}

// We don't want bookmarks and other site info being renamed on users if they already exist
// The name should remain the same while it is bookmarked forever.
const customTitle = typeof siteDetail.get('customTitle') === 'string' ? siteDetail.get('customTitle') : (siteDetail.get('customTitle') || oldSite && oldSite.get('customTitle'))
Copy link
Member

Choose a reason for hiding this comment

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

did you check to make sure this isn't regressed? Use git blame on the task to see the original bug.

…-used when re-bookmarking.

Fixes #3284

Auditors: @bbondy @luixxiul, @bradleyrichter

Test Plan:
- Visit a site which is not bookmarked
- Bookmark the site- when the modal comes up, provide your own title "ABC" and hit enter
- Notice bookmark is using customTitle
- Delete bookmark
- Re-add bookmark- this time don't change the title
- Notice bookmark is now properly using title (not the old customTitle)

Regression tests:
- Drag bookmark into window frame. It should load and NOT update the bookmark custom title
- Move the bookmark into and out of folders. Custom title should not be affected
@bsclifton
Copy link
Member Author

Updated code after @bbondy left a comment (see above). The original commit I had done re-introduced an old bug. I reverted that and instead solved the issue by removing the custom title when bookmark is removed. Tests were added to reinforce this behavior 😄

@bbondy
Copy link
Member

bbondy commented Sep 2, 2016

excellent great fix, comment cleanup and tests! 👍

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.

5 participants