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

Make Upsell widget full width

Henriette Dargeca01770a860d
diff --git a/app/components/homescreen/blocks/upsell.rb b/app/components/homescreen/blocks/upsell.rb
index f6bf6fc5104..686c9ef8b65 100644
--- a/app/components/homescreen/blocks/upsell.rb
+++ b/app/components/homescreen/blocks/upsell.rb
@@ -38,7 +38,7 @@ module Homescreen
end
def wrapper_arguments
- { content_padding: :none }
+ { content_padding: :none, full_width: true }
end
end
end
diff --git a/frontend/src/global_styles/content/_widget_box.sass b/frontend/src/global_styles/content/_widget_box.sass
index e50056210ab..68d64f5c69a 100644
--- a/frontend/src/global_styles/content/_widget_box.sass
+++ b/frontend/src/global_styles/content/_widget_box.sass
@@ -42,6 +42,9 @@ $widget-box--enumeration-width: 20px
display: flex
flex-direction: column
+ &_full-width
+ flex-basis: 100%
+
.widget-box--enumeration,
.widget-box--arrow-links,
.widget-box--feature-list
diff --git a/modules/grids/app/components/grids/widget_box_component.rb b/modules/grids/app/components/grids/widget_box_component.rb
index 4b366124506..14b804dd702 100644
--- a/modules/grids/app/components/grids/widget_box_component.rb
+++ b/modules/grids/app/components/grids/widget_box_component.rb
@@ -35,7 +35,7 @@ module Grids
renders_one :header, HeaderComponent
renders_one :body, BodyComponent
- def initialize(title:, content_padding: BodyComponent::DEFAULT_PADDING, **system_arguments)
+ def initialize(title:, content_padding: BodyComponent::DEFAULT_PADDING, full_width: false, **system_arguments)
super()
@title = title
@@ -44,7 +44,8 @@ module Grids
@system_arguments[:tag] = :div
@system_arguments[:classes] = class_names(
@system_arguments[:classes],
- "widget-box"
+ "widget-box",
+ "widget-box_full-width" => full_width
)
end