-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The problem: email preview showing full email message in email threads list view: <img width="1728" alt="Screen Shot 2023-08-10 at 5 05 05 PM" src="https://github.com/restarone/violet_rails/assets/35935196/1942d52a-9df8-4aa2-8989-fe1f9a0f31d1"> fixes, - rendering overflow in email list view - list items are now a fixed size - sorting when email threads are updated with new messages - threads with unread messages, or new thread show up at the top https://github.com/restarone/violet_rails/assets/35935196/438b3148-708c-4473-b1cb-436685d7e14b
- Loading branch information
1 parent
66a63e4
commit 5fbeb9a
Showing
10 changed files
with
104 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
- @message_threads.each do |message_thread| | ||
= link_to mailbox_message_thread_path(id: message_thread.id), class: 'text-reset text-decoration-none' do | ||
.card.my-3 | ||
%div{class: message_thread.unread? ? "card-body card-header border-secondary" : "card-body"} | ||
.card-title.d-flex.justify-content-between | ||
= message_thread.subject | ||
.item-categories | ||
= render "comfy/admin/cms/categories/categories", object: message_thread | ||
.card-subtitle.mb-2.text-muted | ||
%strong | ||
%span= message_thread.recipients.join(', ') | ||
- last_message = message_thread.messages.first | ||
%div | ||
- if message_thread.messages.any? | ||
%small= "#{distance_of_time_in_words(Time.now, last_message.created_at)} ago (#{last_message.created_at})" | ||
- else | ||
%small= "#{distance_of_time_in_words(Time.now, message_thread.updated_at)} ago (#{message_thread.updated_at})" | ||
- if message_thread.messages.any? | ||
%p.card-text.bg-light.p-2{ :style => "white-space: nowrap; text-overflow: ellipsis; overflow-y: hidden;" } | ||
= render_trix_preview(last_message.content) | ||
= render partial: 'mailbox/mailbox/pagination', locals: { data: @message_threads } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters