A platform for community discussion. Free, open, simple.
UX: Remove bookmarks link from community section (#17608)
Alan Guo Xiang Tana626b99a505d
diff --git a/app/assets/javascripts/discourse/app/components/sidebar/community-section.js b/app/assets/javascripts/discourse/app/components/sidebar/community-section.jsindex 218809bc640..db718adcba3 100644--- a/app/assets/javascripts/discourse/app/components/sidebar/community-section.js+++ b/app/assets/javascripts/discourse/app/components/sidebar/community-section.js@@ -5,7 +5,6 @@ import PermissionType from "discourse/models/permission-type";import { customSectionLinks } from "discourse/lib/sidebar/custom-community-section-links";import EverythingSectionLink from "discourse/lib/sidebar/community-section/everything-section-link";import TrackedSectionLink from "discourse/lib/sidebar/community-section/tracked-section-link";-import BookmarkedSectionLink from "discourse/lib/sidebar/community-section/bookmarked-section-link";import MyPostsSectionLink from "discourse/lib/sidebar/community-section/my-posts-section-link";import { action } from "@ember/object";@@ -14,7 +13,6 @@ import { next } from "@ember/runloop";const DEFAULT_SECTION_LINKS = [EverythingSectionLink,TrackedSectionLink,- BookmarkedSectionLink,MyPostsSectionLink,];diff --git a/app/assets/javascripts/discourse/app/lib/sidebar/community-section/bookmarked-section-link.js b/app/assets/javascripts/discourse/app/lib/sidebar/community-section/bookmarked-section-link.jsdeleted file mode 100644index eedc531533a..00000000000--- a/app/assets/javascripts/discourse/app/lib/sidebar/community-section/bookmarked-section-link.js+++ /dev/null@@ -1,25 +0,0 @@-import I18n from "I18n";--import BaseSectionLink from "discourse/lib/sidebar/community-section/base-section-link";--export default class BookmarkedSectionLink extends BaseSectionLink {- get name() {- return "bookmarked";- }-- get route() {- return "userActivity.bookmarks";- }-- get model() {- return this.currentUser;- }-- get title() {- return I18n.t("sidebar.sections.community.links.bookmarked.title");- }-- get text() {- return I18n.t("sidebar.sections.community.links.bookmarked.content");- }-}diff --git a/app/assets/javascripts/discourse/tests/acceptance/sidebar-community-section-test.js b/app/assets/javascripts/discourse/tests/acceptance/sidebar-community-section-test.jsindex 8c9f959e9a8..79619e42802 100644--- a/app/assets/javascripts/discourse/tests/acceptance/sidebar-community-section-test.js+++ b/app/assets/javascripts/discourse/tests/acceptance/sidebar-community-section-test.js@@ -158,30 +158,6 @@ acceptance("Sidebar - Community Section", function (needs) {);});- test("clicking on bookmarked link", async function (assert) {- await visit("/t/280");- await click(".sidebar-section-community .sidebar-section-link-bookmarked");-- assert.strictEqual(- currentURL(),- `/u/${loggedInUser().username}/activity/bookmarks`,- "it should transition to the bookmarked url"- );-- assert.strictEqual(- count(".sidebar-section-community .sidebar-section-link.active"),- 1,- "only one link is marked as active"- );-- assert.ok(- exists(- ".sidebar-section-community .sidebar-section-link-bookmarked.active"- ),- "the bookmarked link is marked as active"- );- });-test("clicking on my posts link", async function (assert) {await visit("/t/280");await click(".sidebar-section-community .sidebar-section-link-my-posts");diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex c1b7b51b63d..b5fb12d2061 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -4107,9 +4107,6 @@ en:tracked:content: "Tracked"title: "All tracked topics"- bookmarked:- content: "Bookmarked"- title: "All bookmarked topics"my_posts:content: "My Posts"title: "My posts"