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

Primer Colors for Work Package Comments with Restricted Visibility

Kabiru Mwenja1041225b9ee3
diff --git a/app/components/work_packages/activities_tab/journals/item_component.html.erb b/app/components/work_packages/activities_tab/journals/item_component.html.erb
index 4e5b0f71189..80b23ea7652 100644
--- a/app/components/work_packages/activities_tab/journals/item_component.html.erb
+++ b/app/components/work_packages/activities_tab/journals/item_component.html.erb
@@ -15,14 +15,13 @@
"anchor-activity-id": journal.sequence_version,
"anchor-comment-id": journal.id
},
- border_color: container_border_color
+ classes: container_classes
)
) do |border_box_component|
border_box_component.with_header(
px: 2, py: 1,
data: { test_selector: "op-journal-notes-header" },
- classes: comment_header_classes,
- border_color: container_border_color
+ classes: comment_header_classes
) do
flex_layout(align_items: :center, justify_content: :space_between) do |header_container|
header_container.with_column(
@@ -122,8 +121,7 @@
end
border_box_component.with_body(
classes: comment_body_classes,
- data: { test_selector: "op-journal-notes-body" },
- border_color: container_border_color
+ data: { test_selector: "op-journal-notes-body" }
) do
if noop?
render(Primer::Beta::Text.new(font_style: :italic, color: :subtle, mt: 1)) do
diff --git a/app/components/work_packages/activities_tab/journals/item_component.rb b/app/components/work_packages/activities_tab/journals/item_component.rb
index f93b90da0f5..80068b354b7 100644
--- a/app/components/work_packages/activities_tab/journals/item_component.rb
+++ b/app/components/work_packages/activities_tab/journals/item_component.rb
@@ -60,6 +60,14 @@ module WorkPackages
}
end
+ def container_classes
+ [].tap do |classes|
+ if journal.restricted?
+ classes << "work-packages-activities-tab-journals-item-component--container__restricted-comment"
+ end
+ end
+ end
+
def comment_header_classes
[].tap do |classes|
if journal.restricted?
@@ -76,10 +84,6 @@ module WorkPackages
end
end
- def container_border_color
- journal.restricted? ? :attention_emphasis : :default
- end
-
def show_comment_container?
(journal.notes.present? || noop?) && filter != :only_changes
end
diff --git a/app/components/work_packages/activities_tab/journals/item_component.sass b/app/components/work_packages/activities_tab/journals/item_component.sass
index c5959643723..c99886ace95 100644
--- a/app/components/work_packages/activities_tab/journals/item_component.sass
+++ b/app/components/work_packages/activities_tab/journals/item_component.sass
@@ -11,8 +11,14 @@
color: var(--bgColor-accent-emphasis)
&--header-start-container
flex-grow: 1
+ &--container__restricted-comment
+ border-color: var(--display-auburn-borderColor-muted)
&--header__restricted-comment
- background-color: var(--data-auburn-color-muted)
+ color: var(--fgColor-default)
+ border-color: var(--display-auburn-borderColor-muted)
+ background-color: var(--display-auburn-borderColor-muted)
&--journal-notes-body__restricted-comment
- background-color: var(--bgColor-severe-muted)
+ color: var(--fgColor-default)
+ border-color: var(--display-auburn-borderColor-muted)
+ background-color: var(--display-auburn-bgColor-muted)
diff --git a/app/components/work_packages/activities_tab/journals/new_component.sass b/app/components/work_packages/activities_tab/journals/new_component.sass
index 7a14e5eb9be..90e033cb92d 100644
--- a/app/components/work_packages/activities_tab/journals/new_component.sass
+++ b/app/components/work_packages/activities_tab/journals/new_component.sass
@@ -28,5 +28,6 @@
.ck-editor__preview
max-height: 30vh
&--journal-notes-body__restricted-comment
- background-color: var(--bgColor-severe-muted) !important
- border-top: var(--borderWidth-thick) solid var(--data-auburn-color-muted)
+ color: var(--fgColor-default)
+ background-color: var(--display-auburn-bgColor-muted) !important
+ border-top: var(--borderWidth-thick) solid var(--display-auburn-borderColor-muted)