Merge pull request #805 from basecamp/bold-event-actions
Update system message to highlight verbs
This commit is contained in:
@@ -126,7 +126,6 @@
|
||||
max-inline-size: var(--comment-max);
|
||||
text-align: center;
|
||||
|
||||
|
||||
&::before {
|
||||
/* Make up space for lack of avatar */
|
||||
content: "";
|
||||
|
||||
@@ -15,19 +15,19 @@ class Card::Eventable::SystemCommenter
|
||||
def comment_body
|
||||
case event.action
|
||||
when "card_assigned"
|
||||
"#{event.creator.name} assigned this to #{event.assignees.pluck(:name).to_sentence}."
|
||||
"#{event.creator.name} <strong>assigned</strong> this to #{event.assignees.pluck(:name).to_sentence}."
|
||||
when "card_unassigned"
|
||||
"#{event.creator.name} unassigned from #{event.assignees.pluck(:name).to_sentence}."
|
||||
"#{event.creator.name} <strong>unassigned</strong> from #{event.assignees.pluck(:name).to_sentence}."
|
||||
when "card_staged"
|
||||
"#{event.creator.name} moved this to '#{event.stage_name}'."
|
||||
"#{event.creator.name} <strong>moved</strong> this to ‘#{event.stage_name}’."
|
||||
when "card_closed"
|
||||
"Closed as “#{ card.closure.reason }” by #{ event.creator.name }"
|
||||
"<strong>Closed</strong> as ‘#{ card.closure.reason }’ by #{ event.creator.name }"
|
||||
when "card_reopened"
|
||||
"Reopened by #{ event.creator.name }"
|
||||
"<strong>Reopened</strong> by #{ event.creator.name }"
|
||||
when "card_title_changed"
|
||||
"#{event.creator.name} changed the title from '#{event.particulars.dig('particulars', 'old_title')}' to '#{event.particulars.dig('particulars', 'new_title')}'."
|
||||
"#{event.creator.name} <strong>changed the title</strong> from ‘#{event.particulars.dig('particulars', 'old_title')}’ to ‘#{event.particulars.dig('particulars', 'new_title')}’."
|
||||
when "card_collection_changed"
|
||||
"#{event.creator.name} moved this from '#{event.particulars.dig('particulars', 'old_collection')}' to '#{event.particulars.dig('particulars', 'new_collection')}'."
|
||||
"#{event.creator.name} <strong>moved</strong> this from ‘#{event.particulars.dig('particulars', 'old_collection')}’ to ‘#{event.particulars.dig('particulars', 'new_collection')}’."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<%= link_to edit_card_comment_path(comment.card, comment),
|
||||
class: "comment__edit btn btn--circle borderless translucent" do %>
|
||||
<%= icon_tag "menu-dots-horizontal" %>
|
||||
<%= icon_tag "menu-dots-horizontal" %>
|
||||
<span class="for-screen-reader">Edit this comment</span>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ class Card::Eventable::SystemCommenterTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
test "card_assigned" do
|
||||
assert_system_comment "David assigned this to Kevin." do
|
||||
assert_system_comment "David assigned this to Kevin" do
|
||||
@card.toggle_assignment users(:kevin)
|
||||
end
|
||||
end
|
||||
@@ -22,19 +22,19 @@ class Card::Eventable::SystemCommenterTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
test "card_staged" do
|
||||
assert_system_comment "David moved this to 'In progress'" do
|
||||
assert_system_comment "David moved this to ‘In progress’" do
|
||||
@card.change_stage_to workflow_stages(:qa_in_progress)
|
||||
end
|
||||
end
|
||||
|
||||
test "card_closed" do
|
||||
assert_system_comment "Closed as “Done” by David" do
|
||||
assert_system_comment "Closed as ‘Done’ by David" do
|
||||
@card.close
|
||||
end
|
||||
end
|
||||
|
||||
test "card_title_changed" do
|
||||
assert_system_comment "David changed the title from 'The text is too small' to 'Make text larger'." do
|
||||
assert_system_comment "David changed the title from ‘The text is too small’ to ‘Make text larger’" do
|
||||
@card.update! title: "Make text larger"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user