Skip to content

Commit 98bfec8

Browse files
committed
Release OpenProject 16.5.1
2 parents 38b8903 + dfa440e commit 98bfec8

File tree

225 files changed

+2661
-693
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+2661
-693
lines changed

.github/workflows/pullpreview.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
echo "OPENPROJECT_ENTERPRISE__CHARGEBEE__SITE=openproject-enterprise-test" >> .env.pullpreview
3838
echo "OPENPROJECT_ENTERPRISE__TRIAL__CREATION__HOST=https://start.openproject-edge.com" >> .env.pullpreview
3939
echo "OPENPROJECT_FEATURE_BLOCK_NOTE_EDITOR=true" >> .env.pullpreview
40+
echo "OPENPROJECT_FEATURE_WP_ACTIVITY_TAB_LAZY_PAGINATION_ACTIVE=true" >> .env.pullpreview
4041
- name: Boot as BIM edition
4142
if: contains(github.ref, 'bim/') || contains(github.head_ref, 'bim/')
4243
run: |

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ gem "request_store", "~> 1.7.0"
5555
gem "warden", "~> 1.2"
5656
gem "warden-basic_auth", "~> 0.2.1"
5757

58+
gem "pagy"
5859
gem "will_paginate", "~> 4.0.0"
5960

6061
gem "friendly_id", "~> 5.5.0"

Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,7 @@ GEM
11191119
ostruct (0.6.3)
11201120
ox (2.14.23)
11211121
bigdecimal (>= 3.0)
1122+
pagy (9.4.0)
11221123
paper_trail (16.0.0)
11231124
activerecord (>= 6.1)
11241125
request_store (~> 1.4)
@@ -1710,6 +1711,7 @@ DEPENDENCIES
17101711
opentelemetry-sdk (~> 1.9)
17111712
overviews!
17121713
ox
1714+
pagy
17131715
paper_trail (~> 16.0.0)
17141716
parallel_tests (~> 4.0)
17151717
pdf-inspector (~> 1.2)
@@ -2147,6 +2149,7 @@ CHECKSUMS
21472149
ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
21482150
overviews (1.0.0)
21492151
ox (2.14.23) sha256=4a9aedb4d6c78c5ebac1d7287dc7cc6808e14a8831d7adb727438f6a1b461b66
2152+
pagy (9.4.0) sha256=db3f2e043f684155f18f78be62a81e8d033e39b9f97b1e1a8d12ad38d7bce738
21502153
paper_trail (16.0.0) sha256=e9b9f0fb1b8b590c8231cfa931b282ba92f90e066e393930a5e1c61ae4c5019d
21512154
parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
21522155
parallel_tests (4.10.1) sha256=df05458c691462b210f7a41fc2651d4e4e8a881e8190e6d1e122c92c07735d70

app/components/admin/custom_fields/calculated_values/details_component.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ See COPYRIGHT and LICENSE files for more details.
2828
++#%>
2929

3030
<%=
31-
component_wrapper do
32-
with_enterprise_banner_guard(:calculated_values, variant: :large, image: "enterprise/calculated-values.png") do
31+
with_enterprise_banner_guard(:calculated_values, variant: :large, image: "enterprise/calculated-values.png") do
32+
component_wrapper do
3333
settings_primer_form_with(
3434
model:,
3535
scope: :custom_field,

app/models/work_package/exports/formatters/work_hours.rb renamed to app/components/concerns/work_packages/activities_tab/journal_sorting_inquirable.rb

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
#-- copyright
3+
# -- copyright
44
# OpenProject is an open source project management software.
55
# Copyright (C) the OpenProject GmbH
66
#
@@ -26,17 +26,16 @@
2626
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2727
#
2828
# See COPYRIGHT and LICENSE files for more details.
29-
#++
29+
# ++
3030

31-
module WorkPackage::Exports
32-
module Formatters
33-
class WorkHours < ::Exports::Formatters::Default
34-
def self.apply?(name, export_format)
35-
%i[estimated_hours remaining_hours].include?(name.to_sym) && export_format == :csv
36-
end
31+
module WorkPackages
32+
module ActivitiesTab
33+
module JournalSortingInquirable
34+
extend ActiveSupport::Concern
3735

38-
def format_options
39-
{ number_format: }
36+
def journal_sorting
37+
ActiveSupport::StringInquirer
38+
.new(User.current.preference&.comments_sorting || OpenProject::Configuration.default_comment_sort_order)
4039
end
4140
end
4241
end

app/components/concerns/work_packages/activities_tab/stimulus_controllers.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def auto_scrolling_stimulus_controller(suffix = nil) = "#{stimulus_controller_na
3737
def editor_stimulus_controller(suffix = nil) = "#{stimulus_controller_namespace}--editor#{suffix}"
3838
def index_stimulus_controller(suffix = nil) = "#{stimulus_controller_namespace}--index#{suffix}"
3939
def internal_comment_stimulus_controller(suffix = nil) = "#{stimulus_controller_namespace}--internal-comment#{suffix}"
40+
def lazy_page_stimulus_controller(suffix = nil) = "#{stimulus_controller_namespace}--lazy-page#{suffix}"
4041
def polling_stimulus_controller(suffix = nil) = "#{stimulus_controller_namespace}--polling#{suffix}"
4142
def stems_stimulus_controller(suffix = nil) = "#{stimulus_controller_namespace}--stems#{suffix}"
4243
def quote_comments_stimulus_controller(suffix = nil) = "#{stimulus_controller_namespace}--quote-comment#{suffix}"

app/components/enterprise_edition/upsell_buttons_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def upgrade_now_button
103103
def more_info_button
104104
return if @feature_key == :teaser
105105

106-
render(Primer::Beta::Link.new(href: enterprise_link)) do |link|
106+
render(Primer::Beta::Link.new(href: enterprise_link, target: "_blank")) do |link|
107107
link.with_trailing_visual_icon(icon: "link-external")
108108
link_title
109109
end

app/components/work_packages/activities_tab/index_component.html.erb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
classes: "work-packages-activities-tab-index-component--journals-container work-packages-activities-tab-index-component--journals-container_with-initial-input-compensation",
2929
data: { "work-packages--activities-tab--index-target": "journalsContainer" }
3030
) do
31-
render(
32-
WorkPackages::ActivitiesTab::Journals::IndexComponent.new(work_package:, filter:)
33-
)
31+
render(list_journals_component)
3432
end
3533

3634
if adding_comment_allowed?

app/components/work_packages/activities_tab/index_component.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ def self.index_content_wrapper_key = WorkPackages::ActivitiesTab::StimulusContro
5151
def self.add_comment_wrapper_key = "work-packages-activities-tab-add-comment-component"
5252
delegate :index_content_wrapper_key, :add_comment_wrapper_key, to: :class
5353

54+
def list_journals_component
55+
WorkPackages::ActivitiesTab::Journals::IndexComponent.new(work_package:, filter:)
56+
end
57+
5458
private
5559

5660
attr_reader :work_package, :filter, :last_server_timestamp, :deferred
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<%=
2+
component_wrapper(class: "work-packages-activities-tab-journals-index-component") do
3+
flex_layout(data: { test_selector: "op-wp-journals-#{filter}-#{journal_sorting}" }) do |journals_index_wrapper_container|
4+
journals_index_wrapper_container.with_row(
5+
classes: "work-packages-activities-tab-journals-index-component--journals-inner-container",
6+
mb: inner_container_margin_bottom
7+
) do
8+
flex_layout(
9+
data: { test_selector: "op-wp-journals-container" }
10+
) do |journals_index_container|
11+
if empty_state?
12+
journals_index_container.with_row(mt: 2, mb: 3) do
13+
render(WorkPackages::ActivitiesTab::Journals::EmptyComponent.new)
14+
end
15+
else
16+
journals_index_container.with_row(id: insert_target_modifier_id) do
17+
pages.map { concat render(it) }
18+
end
19+
end
20+
end
21+
end
22+
23+
unless empty_state?
24+
journals_index_wrapper_container
25+
.with_row(classes: "work-packages-activities-tab-journals-index-component--stem-connection")
26+
end
27+
end
28+
end
29+
%>

0 commit comments

Comments
 (0)