Merge branch 'main' into mobile/search-scrolling
* main: Extract event particulars helper method Reapply "Push event payload body updates" Bump z-index Bump z-index dep: Fix up Gemfile.saas.lock
This commit is contained in:
@@ -286,6 +286,7 @@
|
||||
inset-inline-end: 0;
|
||||
position: absolute;
|
||||
translate: 100%;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
|
||||
@@ -91,6 +91,10 @@
|
||||
.card__board {
|
||||
border-radius: 0 var(--border-radius) var(--border-radius) 0;
|
||||
}
|
||||
|
||||
.card-perma__notch--bottom {
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Search
|
||||
|
||||
@@ -22,8 +22,32 @@ class Notification::EventPayload < Notification::DefaultPayload
|
||||
card.closure ? "Moved to Done by #{event.creator.name}" : "Closed by #{event.creator.name}"
|
||||
when "card_reopened"
|
||||
"Reopened by #{event.creator.name}"
|
||||
when "card_triaged"
|
||||
if column_name.present?
|
||||
"Moved to #{column_name} by #{event.creator.name}"
|
||||
else
|
||||
"Moved by #{event.creator.name}"
|
||||
end
|
||||
when "card_sent_back_to_triage"
|
||||
"Moved back to Maybe? by #{event.creator.name}"
|
||||
when "card_board_changed", "card_collection_changed"
|
||||
if new_location_name.present?
|
||||
"Moved to #{new_location_name} by #{event.creator.name}"
|
||||
else
|
||||
"Moved by #{event.creator.name}"
|
||||
end
|
||||
when "card_title_changed"
|
||||
if new_title.present?
|
||||
"Renamed to #{new_title} by #{event.creator.name}"
|
||||
else
|
||||
"Renamed by #{event.creator.name}"
|
||||
end
|
||||
when "card_postponed"
|
||||
"Moved to Not Now by #{event.creator.name}"
|
||||
when "card_auto_postponed"
|
||||
"Moved to Not Now due to inactivity"
|
||||
else
|
||||
event.creator.name
|
||||
"Updated by #{event.creator.name}"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -57,6 +81,22 @@ class Notification::EventPayload < Notification::DefaultPayload
|
||||
card.title.presence || "Card #{card.number}"
|
||||
end
|
||||
|
||||
def event_particulars
|
||||
event.particulars.dig("particulars") || {}
|
||||
end
|
||||
|
||||
def column_name
|
||||
event_particulars["column"]
|
||||
end
|
||||
|
||||
def new_location_name
|
||||
event_particulars["new_board"] || event_particulars["new_collection"]
|
||||
end
|
||||
|
||||
def new_title
|
||||
event_particulars["new_title"]
|
||||
end
|
||||
|
||||
def card_url_with_comment_anchor(comment)
|
||||
Rails.application.routes.url_helpers.card_url(
|
||||
comment.card,
|
||||
|
||||
Reference in New Issue
Block a user