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

Refactor update flash component

Mir Bhatia1d242bddca0d
diff --git a/modules/meeting/app/components/_index.sass b/modules/meeting/app/components/_index.sass
index 3082e33be43..5fe00eaece2 100644
--- a/modules/meeting/app/components/_index.sass
+++ b/modules/meeting/app/components/_index.sass
@@ -2,3 +2,4 @@
@import "./meeting_agenda_items/form_component.sass"
@import "./meeting_sections/header_component.sass"
@import "./meetings/sidebar/state_component.sass"
+@import "./meetings/update_flash_component.sass"
diff --git a/modules/meeting/app/components/meetings/update_flash_component.html.erb b/modules/meeting/app/components/meetings/update_flash_component.html.erb
index ccebc5201c5..112a6bd5427 100644
--- a/modules/meeting/app/components/meetings/update_flash_component.html.erb
+++ b/modules/meeting/app/components/meetings/update_flash_component.html.erb
@@ -1,16 +1,24 @@
-<%= render(Primer::Alpha::Banner.new(
- full: false,
- icon: 'info',
- scheme: :default,
- dismiss_scheme: :remove,
- data: {
- singleton: true
- }
-)) do |component| %>
- <% component.with_action_button(
- tag: :a,
- href: meeting_path(@meeting),
- data: { turbo: false },
- size: :medium) { I18n.t("label_meeting_reload") } %>
- <%= I18n.t("notice_meeting_updated") %>
-<% end %>
+<%=
+ component_wrapper do
+ flex_layout do |flex|
+ # flex.with_row(classes: "op-meeting-update-flash") do
+ flex.with_row(classes: "op-toast--wrapper op-meeting-update-flash") do
+ render(Primer::Alpha::Banner.new(
+ full: false,
+ icon: 'info',
+ scheme: :default,
+ data: {
+ singleton: true
+ }
+ )) do |component|
+ component.with_action_button(
+ tag: :a,
+ href: meeting_path(@meeting),
+ data: { turbo: false },
+ size: :medium) { I18n.t("label_meeting_reload") }
+ I18n.t("notice_meeting_updated")
+ end
+ end
+ end
+ end
+%>
diff --git a/modules/meeting/app/components/meetings/update_flash_component.sass b/modules/meeting/app/components/meetings/update_flash_component.sass
new file mode 100644
index 00000000000..4c8f623c25f
--- /dev/null
+++ b/modules/meeting/app/components/meetings/update_flash_component.sass
@@ -0,0 +1,4 @@
+@import 'helpers'
+
+.op-meeting-update-flash
+ max-width: rem-calc(650)