File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed
Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 4242 concat(
4343 flex_layout do |flex_container|
4444 flex_container.with_column do
45- render Primer::Beta ::AvatarStack.new(
45+ render Primer::OpenProject ::AvatarStack.new(
4646 data: { "documents--live-events-target": "users" }
4747 ) do |component|
4848 users.map do |user|
49- component.with_avatar(src: avatar_url (user), alt: user.name )
49+ component.with_avatar_with_fallback(**avatar_options_for (user))
5050 end
5151 end
5252 end
6767 component.with_body(caret: :top_left) do
6868 flex_layout do |container|
6969 users.each do |user|
70- container.with_row do
71- render Users::AvatarComponent.new(
72- user: user,
73- show_name: true,
74- link: false,
75- hover_card: { active: false },
76- size: :mini
77- )
70+ container.with_column do
71+ render Primer::OpenProject::AvatarWithFallback.new(**avatar_options_for(user))
72+ end
73+
74+ container.with_column(ml: 2) do
75+ render(Primer::Beta::Text.new(color: :subtle)) { user.name }
7876 end
7977 end
8078 end
Original file line number Diff line number Diff line change @@ -49,6 +49,14 @@ def initialize(users: [User.current])
4949 def active_editors
5050 I18n . t ( "documents.active_editors_count" , count : users . count ) . html_safe
5151 end
52+
53+ def avatar_options_for ( user )
54+ {
55+ src : avatar_url ( user ) ,
56+ alt : user . name ,
57+ unique_id : user . id
58+ }
59+ end
5260 end
5361 end
5462 end
You can’t perform that action at this time.
0 commit comments