Skip to content

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

Apply grid_layout on the user row in shareWP modal

Henriette Darge689e8f3ee600
diff --git a/app/components/_index.sass b/app/components/_index.sass
new file mode 100644
index 00000000000..8f41e0d929f
--- /dev/null
+++ b/app/components/_index.sass
@@ -0,0 +1 @@
+@import "work_packages/share/modal_component"
diff --git a/app/components/work_packages/share/modal_component.html.erb b/app/components/work_packages/share/modal_component.html.erb
index abf68374a45..0b05b6cf1a1 100644
--- a/app/components/work_packages/share/modal_component.html.erb
+++ b/app/components/work_packages/share/modal_component.html.erb
@@ -37,16 +37,16 @@
role = share.roles.first
invited_user_list.with_row(data: { 'test-selector': "op-share-wp-active-user-#{user.id}" }) do
- flex_layout(align_items: :center) do |user_row_container|
- user_row_container.with_column(flex: :auto) do
+ grid_layout('op-share-wp-modal--user-row', tag: :div, align_items: :center, classes: 'ellipsis') do |user_row_grid|
+ user_row_grid.with_area(:user, tag: :div, classes: 'ellipsis') do
render(Users::AvatarComponent.new(user: user, size: :medium))
end
- user_row_container.with_column(text_align: :right, color: :subtle, style: "width: 150px;") do
+ user_row_grid.with_area(:button, tag: :div, color: :subtle) do
render(WorkPackages::Share::PermissionButtonComponent.new(permission_value: role.builtin))
end
- user_row_container.with_column(text_align: :right, style: "width: 100px;") do
+ user_row_grid.with_area(:remove, tag: :div) do
form_with url: work_packages_share_path(share), method: :delete do
render(Primer::Beta::Button.new(type: :submit, scheme: :invisible)) { I18n.t('work_package.sharing.remove') }
end
diff --git a/app/components/work_packages/share/modal_component.sass b/app/components/work_packages/share/modal_component.sass
new file mode 100644
index 00000000000..728c63f3f3a
--- /dev/null
+++ b/app/components/work_packages/share/modal_component.sass
@@ -0,0 +1,5 @@
+.op-share-wp-modal
+ &--user-row
+ display: grid
+ grid-template-columns: 1fr auto auto
+ grid-template-areas: "user button remove"
diff --git a/frontend/src/global_styles/openproject.sass b/frontend/src/global_styles/openproject.sass
index cb19b44297a..f084557cc17 100644
--- a/frontend/src/global_styles/openproject.sass
+++ b/frontend/src/global_styles/openproject.sass
@@ -19,3 +19,6 @@
// Module specific Styles
@import "../../../modules/meeting/app/components/_index.sass"
+
+// Component specific Styles
+@import "../../../app/components/_index.sass"