mirror of
https://github.com/discourse/discourse.git
synced 2026-08-09 21:45:25 +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>
11 lines
266 B
Ruby
Vendored
11 lines
266 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
module DiscourseSolved::UserExtension
|
|
extend ActiveSupport::Concern
|
|
|
|
prepended do
|
|
has_many :discourse_solved_shared_issues,
|
|
class_name: "DiscourseSolved::SharedIssue",
|
|
dependent: :delete_all
|
|
end
|
|
end
|