Skip to content

Commit

Permalink
Merge branch '1057-flash-and-fade-when-updating-comments-status' into…
Browse files Browse the repository at this point in the history
… staging
  • Loading branch information
ferrisoxide committed Jan 14, 2025
2 parents 9a0ab18 + ebbd1ba commit 7975c63
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions app/assets/stylesheets/application.tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@
@tailwind components;
@tailwind utilities;

@keyframes flash-yellow {
0% {
background-color: #f1e3ab98;
}
100% {
background-color: transparent;
}
}

@layer utilities {
.animate-flash-yellow {
animation: flash-yellow 1s ease-in-out;
}
}
/*
@layer components {
Expand Down
2 changes: 1 addition & 1 deletion app/views/checklist_items/_link.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
link_to(
edit_checklist_item_path(checklist_item),
data: { turbo_frame: dom_id(checklist_item) },
class: 'flex items-center space-x-2 text-gray-700 dark:text-white hover:bg-gray-200 dark:hover:bg-gray-800'
class: "flex items-center space-x-2 text-gray-700 dark:text-white hover:bg-gray-200 dark:hover:bg-gray-800 rounded-sm #{local_assigns[:link_class]}"
) do %>
<%= checklist_item.characteristic.name %>
<%= render_icon(:chat) if checklist_item.comment.present? %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/checklist_items/update.turbo_stream.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%= turbo_stream.replace @checklist_item do %>
<%= turbo_frame_tag dom_id(@checklist_item) do %>
<%= render 'link', checklist_item: @checklist_item %>
<%= render 'link', checklist_item: @checklist_item, link_class: 'transition-colors ease-in duration-700 animate-flash-yellow' %>
<% end %>
<% end %>

0 comments on commit 7975c63

Please sign in to comment.