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
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.erbindex 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) doflex_layout(align_items: :center, justify_content: :space_between) do |header_container|header_container.with_column(@@ -122,8 +121,7 @@endborder_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" }) doif noop?render(Primer::Beta::Text.new(font_style: :italic, color: :subtle, mt: 1)) dodiff --git a/app/components/work_packages/activities_tab/journals/item_component.rb b/app/components/work_packages/activities_tab/journals/item_component.rbindex 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 WorkPackagesendend- def container_border_color- journal.restricted? ? :attention_emphasis : :default- end-def show_comment_container?(journal.notes.present? || noop?) && filter != :only_changesenddiff --git a/app/components/work_packages/activities_tab/journals/item_component.sass b/app/components/work_packages/activities_tab/journals/item_component.sassindex 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-containerflex-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.sassindex 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__previewmax-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)