UX: makes avatar non interactive in thread participants list (#23847)

It was slightly surprising to have a user card show when click on a thread item list.

More over this commit does:
- moves chat/user-avatar to chat-user-avatar and converts it to gjs
- moves chat/thread/participants to chat-thread-participants
- rewrite the `toggleCheckIfPossible` modifier to only be applied when selecting messages, it prevents the click event to collide with the click of avatars in regular messages
This commit is contained in:
Joffrey JAFFEUX
2023-10-09 21:12:50 +02:00
committed by GitHub
parent 245e9f30a4
commit a39ff830e8
20 changed files with 134 additions and 82 deletions

View File

@ -63,7 +63,7 @@ end
Fabricator(:chat_message_without_service, class_name: "Chat::Message") do
user
chat_channel
message { Faker::Lorem.paragraph_by_chars(number: 500).gsub("...", "") }
message { Faker::Lorem.paragraph_by_chars(number: 500).gsub("...", "").gsub("..", "") }
after_build { |message, attrs| message.cook }
after_create { |message, attrs| message.create_mentions }
@ -90,7 +90,8 @@ Fabricator(:chat_message_with_service, class_name: "Chat::CreateMessage") do
chat_channel_id: channel.id,
guardian: user.guardian,
message:
transients[:message] || Faker::Lorem.paragraph_by_chars(number: 500).gsub("...", ""),
transients[:message] ||
Faker::Lorem.paragraph_by_chars(number: 500).gsub("...", "").gsub("..", ""),
thread_id: transients[:thread]&.id,
in_reply_to_id: transients[:in_reply_to]&.id,
upload_ids: transients[:upload_ids],