mirror of
https://github.com/discourse/discourse.git
synced 2026-08-06 13:08:40 +08:00
Members can share that they’re experiencing a reported issue so that admins can see how pervasive an issue is and members can opt into hearing about the issue’s solution. ### Acceptance criteria - When viewing an unsolved topic in a support category, members can click or tap a Me too (N) button to indicate that they are also experiencing this issue. - The (N) indicates how many people have already clicked this button. It should start at 1 to represent the topic author. - When a topic has a solution, hide the Me too (N) button. - After clicking the button, the topic’s notification level will change to Tracking (if not already Tracking or Watching). - If an anonymous user clicks the Me too (N) button, they will be prompted to log in. ### How it looks The **topic author** will see the button which already includes them as the initial user with the issue. The button has read-only state for the OP user (no-op): <img width="1562" height="494" alt="image" src="https://github.com/user-attachments/assets/2006b95a-04a3-427f-8250-334949d4fb53" /> **Other signed in users** can toggle the button: <img width="1332" height="482" alt="image" src="https://github.com/user-attachments/assets/68ee4c9e-c87a-47a1-94aa-04d7eaaaacc5" /> Internal ref: /t/181764 --------- Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
122 lines
2.5 KiB
SCSS
Vendored
122 lines
2.5 KiB
SCSS
Vendored
@use "lib/viewport";
|
|
|
|
:root {
|
|
--d-button-border-radius: 6.25rem;
|
|
}
|
|
|
|
.discourse-no-touch .topic-body .actions .fade-out {
|
|
transition: none;
|
|
}
|
|
|
|
.sidebar-new-topic-button__wrapper {
|
|
&:has(.fk-d-tooltip__trigger) {
|
|
#create-topic.btn {
|
|
border-radius: var(--d-button-border-radius) 0 0
|
|
var(--d-button-border-radius);
|
|
}
|
|
}
|
|
}
|
|
|
|
.discourse-no-touch .btn-default.sidebar-new-topic-button,
|
|
.discourse-no-touch .btn-default,
|
|
.discourse-no-touch .select-kit .select-kit-header.btn-default {
|
|
background: var(--primary-100);
|
|
|
|
.d-icon {
|
|
color: var(--accent-color);
|
|
}
|
|
|
|
&:focus-visible,
|
|
&:hover {
|
|
background: var(--primary-100);
|
|
color: var(--primary);
|
|
box-shadow: 0 0 0 4px var(--button-box-shadow);
|
|
|
|
.d-icon {
|
|
color: var(--accent-color);
|
|
}
|
|
}
|
|
|
|
&:active:not(:hover, :focus) {
|
|
color: var(--primary);
|
|
background: var(--tertiary-300);
|
|
background-image: none;
|
|
|
|
.d-icon {
|
|
color: var(--tertiary-high);
|
|
}
|
|
}
|
|
}
|
|
|
|
.btn-primary,
|
|
.discourse-no-touch .btn-default.ai-new-question-button {
|
|
background-color: var(--accent-color);
|
|
color: var(--accent-text-color);
|
|
|
|
.d-icon {
|
|
color: var(--accent-text-color);
|
|
}
|
|
|
|
&:not([disabled]):focus-visible,
|
|
&:not([disabled]):hover {
|
|
.discourse-no-touch & {
|
|
background-color: var(--accent-color);
|
|
box-shadow: 0 0 0 4px var(--button-box-shadow);
|
|
color: var(--accent-text-color);
|
|
|
|
.d-icon {
|
|
color: var(--accent-text-color);
|
|
}
|
|
}
|
|
}
|
|
|
|
&:active {
|
|
background: light-dark(
|
|
oklch(from var(--accent-color) 40% c h),
|
|
oklch(from var(--accent-color) 50% c h)
|
|
);
|
|
}
|
|
|
|
&:visited {
|
|
color: var(--accent-text-color);
|
|
}
|
|
}
|
|
|
|
.btn-danger {
|
|
.discourse-no-touch & {
|
|
&:not([disabled]):focus-visible,
|
|
&:not([disabled]):hover {
|
|
background-color: var(--danger);
|
|
box-shadow: 0 0 0 4px var(--d-button-danger-bg-color--hover);
|
|
}
|
|
}
|
|
}
|
|
|
|
// DiscoToc plugin
|
|
.d-toc-main,
|
|
.timeline-footer-controls {
|
|
.btn.timeline-toggle {
|
|
border-top-right-radius: 8px;
|
|
border-top-left-radius: 8px;
|
|
border-bottom-left-radius: 0;
|
|
border-bottom-right-radius: 0;
|
|
bottom: var(--main-grid-gap);
|
|
}
|
|
}
|
|
|
|
.d-combo-button:hover {
|
|
border-radius: var(--d-button-border-radius);
|
|
box-shadow: 0 0 0 4px var(--button-box-shadow);
|
|
|
|
button:hover {
|
|
// remove duplicate shadow from child button
|
|
box-shadow: none;
|
|
}
|
|
}
|
|
|
|
// Solved
|
|
.btn-default.post-action-menu__solved-shared-issue:not(.has-shared-issue) {
|
|
.d-icon {
|
|
color: var(--icon-color);
|
|
}
|
|
}
|