From e0ca62c9c86c4e6f9775d8366efafe7d434a2a91 Mon Sep 17 00:00:00 2001 From: Henriette Darge Date: Mon, 23 Mar 2026 14:10:03 +0100 Subject: [PATCH] Harmonize attribute help texts in widegts --- app/components/projects/status_button_component.html.erb | 2 +- app/components/projects/status_button_component.rb | 6 ++++-- .../components/grids/widgets/header/header.component.html | 4 ++-- .../components/grids/widgets/members/members.component.html | 6 +++--- .../project-description/project-description.component.html | 6 +++--- .../widgets/project-status/project-status.component.html | 2 +- frontend/src/global_styles/content/_widget_box.sass | 2 +- .../app/components/grids/widgets/project_status.html.erb | 3 +-- 8 files changed, 16 insertions(+), 15 deletions(-) diff --git a/app/components/projects/status_button_component.html.erb b/app/components/projects/status_button_component.html.erb index 0ef761c1ff7..f48f6430611 100644 --- a/app/components/projects/status_button_component.html.erb +++ b/app/components/projects/status_button_component.html.erb @@ -32,7 +32,7 @@ end end - unless hide_help_text? + unless hide_help_text_caption? container.with_row do render( OpenProject::Common::AttributeHelpTextCaptionComponent.new( diff --git a/app/components/projects/status_button_component.rb b/app/components/projects/status_button_component.rb index 6d2fa2b5635..92ab5fffeee 100644 --- a/app/components/projects/status_button_component.rb +++ b/app/components/projects/status_button_component.rb @@ -34,16 +34,18 @@ class Projects::StatusButtonComponent < ApplicationComponent include OpPrimer::ComponentHelpers include ProjectStatusHelper - attr_reader :project, :user, :hide_help_text + attr_reader :project, :user, :hide_help_text, :hide_help_text_caption alias :hide_help_text? :hide_help_text + alias :hide_help_text_caption? :hide_help_text_caption - def initialize(project:, user:, size: :medium, hide_help_text: false) + def initialize(project:, user:, size: :medium, hide_help_text: false, hide_help_text_caption: false) super @project = project @user = user @size = size @hide_help_text = hide_help_text + @hide_help_text_caption = hide_help_text_caption @status = find_status(project.status_code) end diff --git a/frontend/src/app/shared/components/grids/widgets/header/header.component.html b/frontend/src/app/shared/components/grids/widgets/header/header.component.html index 913865975d8..5c77e052f48 100644 --- a/frontend/src/app/shared/components/grids/widgets/header/header.component.html +++ b/frontend/src/app/shared/components/grids/widgets/header/header.component.html @@ -10,12 +10,12 @@ class="grid--area-drag-handle hidden-for-mobile"> } - - + + diff --git a/frontend/src/app/shared/components/grids/widgets/members/members.component.html b/frontend/src/app/shared/components/grids/widgets/members/members.component.html index 34510881d4c..848e4c13944 100644 --- a/frontend/src/app/shared/components/grids/widgets/members/members.component.html +++ b/frontend/src/app/shared/components/grids/widgets/members/members.component.html @@ -2,9 +2,9 @@ [name]="widgetName" [editable]="isEditable"> - + diff --git a/frontend/src/app/shared/components/grids/widgets/project-description/project-description.component.html b/frontend/src/app/shared/components/grids/widgets/project-description/project-description.component.html index 2e49d28a6e2..f6a09c1544e 100644 --- a/frontend/src/app/shared/components/grids/widgets/project-description/project-description.component.html +++ b/frontend/src/app/shared/components/grids/widgets/project-description/project-description.component.html @@ -2,9 +2,9 @@ [name]="widgetName" [editable]="isEditable"> - + diff --git a/frontend/src/app/shared/components/grids/widgets/project-status/project-status.component.html b/frontend/src/app/shared/components/grids/widgets/project-status/project-status.component.html index 1d0e28d6a65..2c8f9962519 100644 --- a/frontend/src/app/shared/components/grids/widgets/project-status/project-status.component.html +++ b/frontend/src/app/shared/components/grids/widgets/project-status/project-status.component.html @@ -2,7 +2,7 @@ [name]="widgetName" [editable]="isEditable"> - diff --git a/frontend/src/global_styles/content/_widget_box.sass b/frontend/src/global_styles/content/_widget_box.sass index 559b8f5046d..967e32e33d9 100644 --- a/frontend/src/global_styles/content/_widget_box.sass +++ b/frontend/src/global_styles/content/_widget_box.sass @@ -180,7 +180,7 @@ $widget-box--enumeration-width: 20px .help-text--entry vertical-align: -1px - margin-right: 4px + margin-left: 4px .op-widget-box--header-title vertical-align: middle diff --git a/modules/grids/app/components/grids/widgets/project_status.html.erb b/modules/grids/app/components/grids/widgets/project_status.html.erb index d4c8515849f..f276cd08699 100644 --- a/modules/grids/app/components/grids/widgets/project_status.html.erb +++ b/modules/grids/app/components/grids/widgets/project_status.html.erb @@ -32,14 +32,13 @@ See COPYRIGHT and LICENSE files for more details. component_wrapper do flex_layout do |flex| flex.with_row(mb: 3) do - render(Projects::StatusButtonComponent.new(project:, user: current_user)) + render(Projects::StatusButtonComponent.new(project:, user: current_user, hide_help_text: true)) end flex.with_row do render OpenProject::Common::InplaceEditFieldComponent.new( model: project, attribute: :status_explanation, - visually_hide_label: true, rich_text_options: { showAttachments: false, editorType: "constrained",