From 123ea81353b88f5994db8b1e4730540ef299d654 Mon Sep 17 00:00:00 2001 From: Henriette Darge Date: Mon, 18 Dec 2023 10:45:21 +0100 Subject: [PATCH] =?UTF-8?q?The=20Primer=20dialog=20component=20normally=20?= =?UTF-8?q?expects=20the=20body=20and=20the=20footer=20being=20a=20direct?= =?UTF-8?q?=20sibling=20of=20the=20header.=20If=20that=20is=20not=20the=20?= =?UTF-8?q?case=20(e.g.=20when=20a=20form=20is=20in=20between),=20the=20di?= =?UTF-8?q?alog=20does=20not=20handle=20overflows=20correctly.=20For=20tha?= =?UTF-8?q?t=20case,=20Primer=20offers=20the=20class=20`Ove=C2=B4rlay-form?= =?UTF-8?q?`.=20Since=20we=20have=20multiple=20hierarchy=20elements=20in?= =?UTF-8?q?=20between,=20we=20have=20to=20set=20that=20class=20onto=20all?= =?UTF-8?q?=20of=20them=20to=20prevent=20an=20overflow=20of=20the=20dialog?= =?UTF-8?q?.=20See=20#51734?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../meetings/sidebar/participants_form_component.html.erb | 7 ++++--- .../op_turbo/op_primer/async_dialog_component.html.erb | 1 + .../add_work_package_to_meeting_form_component.html.erb | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/meeting/app/components/meetings/sidebar/participants_form_component.html.erb b/modules/meeting/app/components/meetings/sidebar/participants_form_component.html.erb index b1643d62d8cc..8cd962c23d88 100644 --- a/modules/meeting/app/components/meetings/sidebar/participants_form_component.html.erb +++ b/modules/meeting/app/components/meetings/sidebar/participants_form_component.html.erb @@ -1,13 +1,14 @@ <%= content_tag("turbo-frame", id: "edit-participants-dialog-frame") do - component_wrapper do + component_wrapper(class: 'Overlay-form') do primer_form_with( model: @meeting, method: :put, - url: update_participants_meeting_path(@meeting) + url: update_participants_meeting_path(@meeting), + class: 'Overlay-form' ) do |f| component_collection do |collection| - collection.with_component(Primer::Alpha::Dialog::Body.new(style: "max-height: 460px;", my: 3)) do + collection.with_component(Primer::Alpha::Dialog::Body.new(my: 3)) do flex_layout(mt: 3) do |form_container| form_container.with_row do flex_layout(justify_content: :flex_end) do |header| diff --git a/modules/meeting/app/components/op_turbo/op_primer/async_dialog_component.html.erb b/modules/meeting/app/components/op_turbo/op_primer/async_dialog_component.html.erb index 2f55d2afbf57..2955f10eb7f3 100644 --- a/modules/meeting/app/components/op_turbo/op_primer/async_dialog_component.html.erb +++ b/modules/meeting/app/components/op_turbo/op_primer/async_dialog_component.html.erb @@ -14,6 +14,7 @@ id: "#{@id}-frame", loading: :lazy, src: @src, + class: 'Overlay-form', data: { 'op-turbo-op-primer-async-dialog-target': "frameElement" }) do flex_layout(justify_content: :center) do |flex| flex.with_column(my: 5) do diff --git a/modules/meeting/app/components/work_package_meetings_tab/add_work_package_to_meeting_form_component.html.erb b/modules/meeting/app/components/work_package_meetings_tab/add_work_package_to_meeting_form_component.html.erb index 30319961c8f9..f663caa2b5de 100644 --- a/modules/meeting/app/components/work_package_meetings_tab/add_work_package_to_meeting_form_component.html.erb +++ b/modules/meeting/app/components/work_package_meetings_tab/add_work_package_to_meeting_form_component.html.erb @@ -1,10 +1,11 @@ <%= content_tag("turbo-frame", id: "add-work-package-to-meeting-dialog-frame") do - component_wrapper do + component_wrapper(class: 'Overlay-form') do primer_form_with( model: @meeting_agenda_item, method: :post, - url: work_package_meeting_agenda_items_path(@work_package) + url: work_package_meeting_agenda_items_path(@work_package), + class: 'Overlay-form' ) do |f| component_collection do |collection| collection.with_component(Primer::Alpha::Dialog::Body.new(test_selector: 'op-add-work-package-to-meeting-dialog-body')) do