OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#55581] prefer flex layout
Tobias Dillmann89587fdfce50
diff --git a/app/components/users/hover_card_component.html.erb b/app/components/users/hover_card_component.html.erbindex c6387b50199..8a71b8fa434 100644--- a/app/components/users/hover_card_component.html.erb+++ b/app/components/users/hover_card_component.html.erb@@ -1,24 +1,36 @@<%=if @user.present?- grid_layout('op-user-hover-card', tag: :div) do |grid|- grid.with_area(:avatar, tag: :div) do+ flex_layout(classes: 'op-user-hover-card') do |flex|+ flex.with_row dorender(Users::AvatarComponent.new(user: @user, show_name: false, size: :large))end- grid.with_area(:subject, tag: :div) do- concat(render(Primer::Beta::Text.new(font_weight: :semibold)) { @user.name })- end- grid.with_area(:email, tag: :div) do- concat(render(Primer::Beta::Text.new(color: :muted)) { @user.mail }) # TODO: only with permission+ flex.with_row do+ flex_layout(classes: 'op-user-hover-card-user-info') do |f|+ f.with_column do+ render(Primer::Beta::Text.new(font_weight: :semibold)) { @user.name }+ end++ f.with_column do+ render(Primer::Beta::Text.new(color: :muted)) { @user.mail } # TODO: only with permission+ end+ endend- grid.with_area(:projects, tag: :div, font_size: :small, color: :muted) do- concat(render(Primer::Beta::Octicon.new(icon: :people)))- concat(render(Primer::Beta::Text.new) { "Member of ..., ... and 4 more" })+ flex.with_row do+ flex_layout(classes: 'op-user-hover-card-project-list') do |f|+ f.with_column do+ render(Primer::Beta::Octicon.new(icon: :people))+ end++ f.with_column do+ render(Primer::Beta::Text.new(color: :muted)) { "Member of ..., ... and 4 more" }+ end+ endend- grid.with_area(:actions, tag: :div) do- render(Primer::Beta::Button.new) { "Open Profile" }+ flex.with_row do+ render(Primer::Beta::Button.new) { "Open profile" }endendelsediff --git a/app/components/users/hover_card_component.sass b/app/components/users/hover_card_component.sassindex 6ef3b9a8c28..dcd734e5a0d 100644--- a/app/components/users/hover_card_component.sass+++ b/app/components/users/hover_card_component.sass@@ -1,6 +1,9 @@.op-user-hover-card- display: grid- grid-template-areas: "avatar avatar" "subject email" "projects projects" "actions actions"gap: 1rem-overflow: hidden++ .op-user-hover-card-user-info+ gap: 0.5rem++ .op-user-hover-card-project-list+ gap: 0.5rem