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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
include life cycle type component in lookbook
ulferts65c917f7cac8
diff --git a/app/components/projects/life_cycle_type_component.html.erb b/app/components/projects/life_cycle_type_component.html.erbindex cb685a9ab71..728082531b7 100644--- a/app/components/projects/life_cycle_type_component.html.erb+++ b/app/components/projects/life_cycle_type_component.html.erb@@ -1,5 +1,4 @@-<%= flex_layout(align_items: :center,- justify_content: :space_between) do |element_container|+<%= flex_layout(align_items: :center) do |element_container|element_container.with_column(mr: 1, classes: icon_color_class) dorender Primer::Beta::Octicon.new(icon: icon)enddiff --git a/app/components/projects/life_cycle_type_component.rb b/app/components/projects/life_cycle_type_component.rbindex f6793e45b74..9ada0c43461 100644--- a/app/components/projects/life_cycle_type_component.rb+++ b/app/components/projects/life_cycle_type_component.rb@@ -51,7 +51,10 @@ module Projectsenddef text_options- { color: :muted, font_size: :small }.merge(options)+ # The tag: :div is is a hack to fix the line height difference+ # caused by font_size: :small. That line height difference+ # would otherwise lead to the text being not on the same height as the icon+ { color: :muted, font_size: :small, tag: :div }.merge(options)endendenddiff --git a/lookbook/previews/open_project/projects/life_cycle_type_component_preview.rb b/lookbook/previews/open_project/projects/life_cycle_type_component_preview.rbnew file mode 100644index 00000000000..dd73a64cc94--- /dev/null+++ b/lookbook/previews/open_project/projects/life_cycle_type_component_preview.rb@@ -0,0 +1,14 @@+module OpenProject+ module Projects+ # @logical_path OpenProject/Projects+ class LifeCycleTypeComponentPreview < Lookbook::Preview+ def gate+ render_with_template(locals: { model: Gate.new(id: 1, name: "The first gate") })+ end++ def stage+ render_with_template(locals: { model: Stage.new(id: 1, name: "The first stage") })+ end+ end+ end+enddiff --git a/lookbook/previews/open_project/projects/life_cycle_type_component_preview/gate.html.erb b/lookbook/previews/open_project/projects/life_cycle_type_component_preview/gate.html.erbnew file mode 100644index 00000000000..442cbfcb2e3--- /dev/null+++ b/lookbook/previews/open_project/projects/life_cycle_type_component_preview/gate.html.erb@@ -0,0 +1,6 @@+<!-- Depends on having the color defined in the highlighting/styles.css.erb file. -->+<style>+ .__hl_inline_life_cycle_step_definition_1 { color: red; }+</style>++<%= render(::Projects::LifeCycleTypeComponent.new(model)) %>diff --git a/lookbook/previews/open_project/projects/life_cycle_type_component_preview/stage.html.erb b/lookbook/previews/open_project/projects/life_cycle_type_component_preview/stage.html.erbnew file mode 100644index 00000000000..442cbfcb2e3--- /dev/null+++ b/lookbook/previews/open_project/projects/life_cycle_type_component_preview/stage.html.erb@@ -0,0 +1,6 @@+<!-- Depends on having the color defined in the highlighting/styles.css.erb file. -->+<style>+ .__hl_inline_life_cycle_step_definition_1 { color: red; }+</style>++<%= render(::Projects::LifeCycleTypeComponent.new(model)) %>