FIX: Rename all instances of bookmarkWithReminder to just bookmark (#9579)

* Rename all instances of bookmarkWithReminder and bookmark_with_reminder to just bookmark
* Delete old bookmark code at the same time
* Add migration to remove the bookmarkWithReminder post menu item if people have it set in site settings
This commit is contained in:
Martin Brennan
2020-04-30 10:09:22 +10:00
committed by GitHub
parent 4f5ed8e781
commit ca539fdccf
13 changed files with 55 additions and 134 deletions

View File

@@ -13,10 +13,8 @@ Discourse.SiteSettingsOriginal = {
ga_universal_tracking_code: "",
ga_universal_domain_name: "auto",
top_menu: "latest|new|unread|categories|top",
post_menu:
"like|share|flag|edit|bookmark|bookmarkWithReminder|delete|admin|reply",
post_menu_hidden_items:
"flag|bookmark|bookmarkWithReminder|edit|delete|admin",
post_menu: "like|share|flag|edit|bookmark|delete|admin|reply",
post_menu_hidden_items: "flag|bookmark|edit|delete|admin",
share_links: "twitter|facebook|email",
category_colors:
"BF1E2E|F1592A|F7941D|9EB83B|3AB54A|12A89D|25AAE2|0E76BD|652D90|92278F|ED207B|8C6238|231F20|27AA5B|B3B5B4|E45735",

View File

@@ -532,15 +532,12 @@ widgetTest("can't bookmark", {
widgetTest("bookmark", {
template:
'{{mount-widget widget="post" args=args toggleBookmarkWithReminder=(action "toggleBookmarkWithReminder")}}',
'{{mount-widget widget="post" args=args toggleBookmark=(action "toggleBookmark")}}',
beforeEach() {
const args = { canBookmark: true };
this.set("args", args);
this.on(
"toggleBookmarkWithReminder",
() => (args.bookmarked_with_reminder = true)
);
this.on("toggleBookmark", () => (args.bookmarked = true));
},
async test(assert) {
assert.equal(find(".post-menu-area .bookmark").length, 1);