Harmonize attribute help texts in widegts

This commit is contained in:
Henriette Darge
2026-03-23 14:10:03 +01:00
parent 5afbb96f07
commit e0ca62c9c8
8 changed files with 16 additions and 15 deletions
@@ -32,7 +32,7 @@
end
end
unless hide_help_text?
unless hide_help_text_caption?
container.with_row do
render(
OpenProject::Common::AttributeHelpTextCaptionComponent.new(
@@ -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
@@ -10,12 +10,12 @@
class="grid--area-drag-handle hidden-for-mobile"></svg>
}
<ng-content select="[slot=prepend]" />
<editable-toolbar-title [title]="name"
(onSave)="renamed($event)"
[editable]="isRenameable"
class="op-widget-box--header-title" />
<ng-content select="[slot=append]" />
</h3>
<ng-content select="[slot=menu]" />
@@ -2,9 +2,9 @@
[name]="widgetName"
[editable]="isEditable">
<attribute-help-text slot="prepend"
attribute="members"
[attributeScope]="'Project'" />
<attribute-help-text slot="append"
attribute="members"
[attributeScope]="'Project'" />
<widget-menu slot="menu"
[resource]="resource" />
@@ -2,9 +2,9 @@
[name]="widgetName"
[editable]="isEditable">
<attribute-help-text slot="prepend"
attribute="description"
[attributeScope]="'Project'" />
<attribute-help-text slot="append"
attribute="description"
[attributeScope]="'Project'" />
<widget-menu slot="menu"
[resource]="resource" />
@@ -2,7 +2,7 @@
[name]="widgetName"
[editable]="isEditable">
<attribute-help-text slot="prepend"
<attribute-help-text slot="append"
attribute="status"
[attributeScope]="'Project'" />
@@ -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
@@ -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",