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
[#66093] Rudimentary styling for project list errors
Tobias Dillmann52e19f69c69e
diff --git a/app/components/projects/row_component.rb b/app/components/projects/row_component.rbindex bf12dbb470f..76c26d6e928 100644--- a/app/components/projects/row_component.rb+++ b/app/components/projects/row_component.rb@@ -97,8 +97,18 @@ module Projectserrors = cf.calculated_value_errors.where(project:)if errors.any?- # TODO: format like an error- errors.map(&:error_message).join(" ")+ # TODO: move into a dedicated component?+ render(Primer::OpenProject::FlexLayout.new(align_items: :center)) do |container|+ container.with_column do+ render Primer::Beta::Octicon.new(icon: :"alert-fill", color: :danger)+ end+ container.with_column(ml: 2) do+ # FIXME: text content gets cut off if the column is not wide enough.+ render Primer::Beta::Text.new(color: :danger) do+ errors.map(&:error_message).join(" ")+ end+ end+ endelsecustom_valueenddiff --git a/modules/overviews/app/components/overviews/project_custom_fields/item_component.rb b/modules/overviews/app/components/overviews/project_custom_fields/item_component.rbindex a5a404aa06f..c16026a462d 100644--- a/modules/overviews/app/components/overviews/project_custom_fields/item_component.rb+++ b/modules/overviews/app/components/overviews/project_custom_fields/item_component.rb@@ -55,8 +55,18 @@ module Overviewsenddef render_calculation_error- render(Primer::Beta::Text.new(color: :danger)) do- @project_custom_field.calculated_value_errors.where(project: @project).map(&:error_message).join(" ")+ errors = @project_custom_field.calculated_value_errors.where(project: @project)++ # FIXME: this is a copy from the project list row component. Reuse it here.+ render(Primer::OpenProject::FlexLayout.new(align_items: :center)) do |container|+ container.with_column do+ render Primer::Beta::Octicon.new(icon: :"alert-fill", color: :danger)+ end+ container.with_column(ml: 2) do+ render Primer::Beta::Text.new(color: :danger) do+ errors.map(&:error_message).join(" ")+ end+ endendend