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

fix[Op#50212]: Align icon buttons at end in edit view

Kabiru Mwenja71a1c4651e3c
diff --git a/modules/storages/app/components/storages/admin/storage_view_component.html.erb b/modules/storages/app/components/storages/admin/storage_view_component.html.erb
index 547e50ff106..5d106ac6cc6 100644
--- a/modules/storages/app/components/storages/admin/storage_view_component.html.erb
+++ b/modules/storages/app/components/storages/admin/storage_view_component.html.erb
@@ -20,17 +20,21 @@
render(Primer::Beta::Truncate.new(font_weight: :light)) { storage_description }
end
- grid.with_area(:"icon-button", tag: :div, color: :subtle, mr: 3, justify_self: :end) do
- render(
- Primer::Beta::IconButton.new(
- icon: :pencil,
- tag: :a,
- scheme: :invisible,
- href: edit_host_admin_settings_storage_path(storage),
- aria: { label: I18n.t('storages.label_edit_storage_host') } ,
- test_selector: 'storage-edit-host-button'
- )
- )
+ grid.with_area(:"icon-button", tag: :div, color: :subtle) do
+ flex_layout(justify_content: :flex_end) do |icons_container|
+ icons_container.with_column do
+ render(
+ Primer::Beta::IconButton.new(
+ icon: :pencil,
+ tag: :a,
+ scheme: :invisible,
+ href: edit_host_admin_settings_storage_path(storage),
+ aria: { label: I18n.t('storages.label_edit_storage_host') } ,
+ test_selector: 'storage-edit-host-button'
+ )
+ )
+ end
+ end
end
end
end
@@ -56,25 +60,29 @@
render(Primer::Beta::Truncate.new(font_weight: :light)) { openproject_oauth_client_description }
end
- grid.with_area(:"icon-button", tag: :div, color: :subtle, mr: 3, justify_self: :end, test_selector: 'storage-replace-openproject-oauth-application') do
- primer_form_with(
- model: storage,
- url: replace_oauth_application_admin_settings_storage_path(storage),
- method: :delete
- ) do |_form|
- render(
- Primer::Beta::IconButton.new(
- icon: :sync,
- scheme: :invisible,
- type: :submit,
- aria: {
- label: I18n.t("storages.buttons.replace_provider_type_oauth",
- provider_type: I18n.t("storages.provider_types.#{storage.short_provider_type}.name"))
- },
- data: { turbo_confirm: I18n.t("storages.confirm_replace_oauth_client") },
- test_selector: 'storage-replace-openproject-oauth-application-button'
- )
- )
+ grid.with_area(:"icon-button", tag: :div, color: :subtle, test_selector: 'storage-replace-openproject-oauth-application') do
+ flex_layout(justify_content: :flex_end) do |icons_container|
+ icons_container.with_column do
+ primer_form_with(
+ model: storage,
+ url: replace_oauth_application_admin_settings_storage_path(storage),
+ method: :delete
+ ) do |_form|
+ render(
+ Primer::Beta::IconButton.new(
+ icon: :sync,
+ scheme: :invisible,
+ type: :submit,
+ aria: {
+ label: I18n.t("storages.buttons.replace_provider_type_oauth",
+ provider_type: I18n.t("storages.provider_types.#{storage.short_provider_type}.name"))
+ },
+ data: { turbo_confirm: I18n.t("storages.confirm_replace_oauth_client") },
+ test_selector: 'storage-replace-openproject-oauth-application-button'
+ )
+ )
+ end
+ end
end
end
end
@@ -93,17 +101,21 @@
render(Primer::Beta::Truncate.new(font_weight: :light)) { provider_oauth_client_description }
end
- grid.with_area(:"icon-button", tag: :div, color: :subtle, mr: 3, justify_self: :end) do
- render(
- Primer::Beta::IconButton.new(
- icon: :sync,
- tag: :a,
- href: new_admin_settings_storage_oauth_client_path(storage),
- scheme: :invisible,
- aria: { label: I18n.t('storages.label_edit_storage_oauth_client') },
- test_selector: 'storage-edit-oauth-client-button'
- )
- )
+ grid.with_area(:"icon-button", tag: :div, color: :subtle) do
+ flex_layout(justify_content: :flex_end) do |icons_container|
+ icons_container.with_column do
+ render(
+ Primer::Beta::IconButton.new(
+ icon: :sync,
+ tag: :a,
+ href: new_admin_settings_storage_oauth_client_path(storage),
+ scheme: :invisible,
+ aria: { label: I18n.t('storages.label_edit_storage_oauth_client') },
+ test_selector: 'storage-edit-oauth-client-button'
+ )
+ )
+ end
+ end
end
end
end