Skip to content

A platform for community discussion. Free, open, simple.

UX: adjust bookmark menu (#38629)

Jordan Vidrine3ff7b6014b47
diff --git a/app/assets/stylesheets/common/components/bookmark-menu.scss b/app/assets/stylesheets/common/components/bookmark-menu.scss
index c58e209ee33..7b6c3791e93 100644
--- a/app/assets/stylesheets/common/components/bookmark-menu.scss
+++ b/app/assets/stylesheets/common/components/bookmark-menu.scss
@@ -1,72 +1,25 @@
.bookmark-menu-content {
- .dropdown-menu {
- padding: 0;
- min-width: 200px;
- }
-
.bookmark-menu__title {
- display: flex;
- align-items: center;
- gap: 0.75em;
background: var(--tertiary-low);
color: var(--tertiary);
- padding: 0.75rem 1rem;
- font-weight: bold;
.d-icon {
color: var(--tertiary);
}
}
- .bookmark-menu__row {
+ .bookmark-menu__row-title,
+ .bookmark-menu__title {
display: flex;
-
- &:hover,
- &:focus {
- background: var(--d-hover);
-
- &.--remove {
- background: var(--danger-low);
- }
- }
-
- &.--clear-reminder {
- .d-icon {
- color: var(--primary-low-mid);
- }
- }
- }
-
- .bookmark-menu__row-title {
- padding: 0.75rem 1rem;
+ align-items: center;
font-weight: bold;
- }
-
- .bookmark-menu__row-btn {
- margin: 0;
- width: 100%;
- text-align: left;
- justify-content: left !important;
- gap: 0.75rem;
- color: var(--primary);
-
- &:hover,
- &:focus {
- color: var(--primary) !important;
- background: var(--tertiary-very-low);
- }
-
- .--remove & {
- color: var(--danger);
- }
-
- .d-button-label {
- color: inherit;
- }
+ gap: var(--d-sidebar-section-link-prefix-margin-right);
+ height: var(--d-sidebar-row-height);
+ padding-inline: var(--d-sidebar-row-horizontal-padding);
+ border-radius: var(--d-border-radius);
.d-icon {
- color: inherit;
- margin: 0 !important;
+ width: var(--d-sidebar-section-link-prefix-width);
}
}
}
diff --git a/app/assets/stylesheets/common/float-kit/d-menu.scss b/app/assets/stylesheets/common/float-kit/d-menu.scss
index e381d624990..eae656c8b1a 100644
--- a/app/assets/stylesheets/common/float-kit/d-menu.scss
+++ b/app/assets/stylesheets/common/float-kit/d-menu.scss
@@ -56,12 +56,6 @@
overflow: auto;
}
- &:not([data-identifier="usercard"]) {
- .btn {
- border-radius: 0;
- }
- }
-
.arrow {
position: absolute;
color: var(--secondary);
diff --git a/frontend/discourse/app/components/bookmark-menu.gjs b/frontend/discourse/app/components/bookmark-menu.gjs
index 484c8de8619..7baad93881e 100644
--- a/frontend/discourse/app/components/bookmark-menu.gjs
+++ b/frontend/discourse/app/components/bookmark-menu.gjs
@@ -42,6 +42,7 @@ export default class BookmarkMenu extends Component {
const custom = this.timeShortcuts.custom();
custom.label = "time_shortcut.more_options";
+ custom.icon = "far-calendar-plus";
this.reminderAtOptions.push(custom);
}
@@ -329,6 +330,7 @@ export default class BookmarkMenu extends Component {
{{else}}
<dropdown.item class="bookmark-menu__row-title">
+ {{icon "bell"}}
{{i18n "bookmarks.also_set_reminder"}}
</dropdown.item>
@@ -344,6 +346,7 @@ export default class BookmarkMenu extends Component {
@translatedTitle={{this.reminderShortcutTimeTitle option}}
@action={{fn this.onChooseReminderOption option}}
class="bookmark-menu__row-btn btn-transparent"
+ @icon={{option.icon}}
/>
</dropdown.item>
{{/each}}
diff --git a/frontend/discourse/app/lib/time-shortcut.js b/frontend/discourse/app/lib/time-shortcut.js
index e175eddd082..b9eed984189 100644
--- a/frontend/discourse/app/lib/time-shortcut.js
+++ b/frontend/discourse/app/lib/time-shortcut.js
@@ -94,7 +94,7 @@ export function timeShortcuts(timezone) {
twoHours() {
return {
id: TIME_SHORTCUT_TYPES.TWO_HOURS,
- icon: "angle-right",
+ icon: "far-clock",
label: "time_shortcut.in_two_hours",
time: twoHours(timezone),
timeFormatKey: "dates.time",
@@ -103,7 +103,7 @@ export function timeShortcuts(timezone) {
laterToday() {
return {
id: TIME_SHORTCUT_TYPES.LATER_TODAY,
- icon: "angle-right",
+ icon: "far-clock",
label: "time_shortcut.later_today",
time: laterToday(timezone),
timeFormatKey: "dates.time",
@@ -121,7 +121,7 @@ export function timeShortcuts(timezone) {
twoDays() {
return {
id: "two_days",
- icon: "angle-right",
+ icon: "calendar-days",
label: "time_shortcut.two_days",
time: twoDays(timezone),
timeFormatKey: "dates.time_short_day",
@@ -130,7 +130,7 @@ export function timeShortcuts(timezone) {
threeDays() {
return {
id: "three_days",
- icon: "angle-right",
+ icon: "calendar-days",
label: "time_shortcut.three_days",
time: inNDays(timezone, 3),
timeFormatKey: "dates.time_short_day",
@@ -139,7 +139,7 @@ export function timeShortcuts(timezone) {
laterThisWeek() {
return {
id: TIME_SHORTCUT_TYPES.LATER_THIS_WEEK,
- icon: "angles-right",
+ icon: "calendar-days",
label: "time_shortcut.later_this_week",
time: laterThisWeek(timezone),
timeFormatKey: "dates.time_short_day",
@@ -179,7 +179,7 @@ export function timeShortcuts(timezone) {
twoWeeks() {
return {
id: "two_weeks",
- icon: "far-clock",
+ icon: "far-calendar-plus",
label: "time_shortcut.two_weeks",
time: twoWeeks(timezone),
timeFormatKey: "dates.long_no_year",