mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
feature/63646 Remove work_package_comment_id_url feature flag (#18740)
https://community.openproject.org/work_packages/63646
This commit is contained in:
@@ -34,7 +34,6 @@ jobs:
|
||||
echo "OPENPROJECT_LOOKBOOK__ENABLED=true" >> .env.pullpreview
|
||||
echo "OPENPROJECT_HSTS=false" >> .env.pullpreview
|
||||
echo "OPENPROJECT_NOTIFICATIONS_POLLING_INTERVAL=10000" >> .env.pullpreview
|
||||
echo "OPENPROJECT_FEATURE_WORK_PACKAGE_COMMENT_ID_URL_ACTIVE=true" >> .env.pullpreview
|
||||
- name: Boot as BIM edition
|
||||
if: contains(github.ref, 'bim/') || contains(github.head_ref, 'bim/')
|
||||
run: |
|
||||
|
||||
@@ -59,11 +59,7 @@
|
||||
end
|
||||
end
|
||||
header_start_container.with_column(mr: 1, classes: "hidden-for-mobile") do
|
||||
if OpenProject::FeatureDecisions.work_package_comment_id_url_active?
|
||||
activity_anchor_link(journal) { journal_updated_at_formatted_time(journal) }
|
||||
else
|
||||
journal_updated_at_formatted_time(journal)
|
||||
end
|
||||
activity_anchor_link(journal)
|
||||
end
|
||||
end
|
||||
header_container.with_column(flex_layout: true, align_items: :center) do |header_end_container|
|
||||
@@ -95,12 +91,6 @@
|
||||
end
|
||||
end
|
||||
|
||||
unless OpenProject::FeatureDecisions.work_package_comment_id_url_active?
|
||||
header_end_container.with_column do
|
||||
activity_anchor_link(journal)
|
||||
end
|
||||
end
|
||||
|
||||
header_end_container.with_column(
|
||||
ml: 1,
|
||||
classes: "work-packages-activities-tab-journals-item-component--action-menu"
|
||||
|
||||
@@ -163,28 +163,19 @@ module WorkPackages
|
||||
|
||||
def render_mobile_updated_time(container)
|
||||
container.with_column do
|
||||
if OpenProject::FeatureDecisions.work_package_comment_id_url_active?
|
||||
activity_anchor_link(journal) { journal_updated_at_formatted_time(journal) }
|
||||
else
|
||||
journal_updated_at_formatted_time(journal)
|
||||
end
|
||||
activity_anchor_link(journal)
|
||||
end
|
||||
end
|
||||
|
||||
def render_updated_time(container)
|
||||
container.with_column(mr: 1, classes: "hidden-for-mobile") do
|
||||
if OpenProject::FeatureDecisions.work_package_comment_id_url_active?
|
||||
activity_anchor_link(journal) { journal_updated_at_formatted_time(journal) }
|
||||
else
|
||||
journal_updated_at_formatted_time(journal)
|
||||
end
|
||||
activity_anchor_link(journal)
|
||||
end
|
||||
end
|
||||
|
||||
def render_header_end(header_container)
|
||||
header_container.with_column(flex_layout: true) do |header_end_container|
|
||||
render_notification_bubble(header_end_container) if has_unread_notifications
|
||||
render_activity_link(header_end_container)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -199,17 +190,6 @@ module WorkPackages
|
||||
end
|
||||
end
|
||||
|
||||
def render_activity_link(container)
|
||||
return if OpenProject::FeatureDecisions.work_package_comment_id_url_active?
|
||||
|
||||
container.with_column(
|
||||
pr: 3,
|
||||
classes: "work-packages-activities-tab-journals-item-component-details--activity-link-container"
|
||||
) do
|
||||
activity_anchor_link(journal)
|
||||
end
|
||||
end
|
||||
|
||||
def icon_aria_label
|
||||
if journal.initial?
|
||||
I18n.t("activities.work_packages.activity_tab.created")
|
||||
|
||||
@@ -49,7 +49,5 @@
|
||||
color: var(--fgColor-muted, var(--color-fg-subtle))
|
||||
&--notification-dot-icon
|
||||
color: var(--bgColor-accent-emphasis)
|
||||
&--activity-link-container
|
||||
padding-top: 2px
|
||||
&--journal-detail-description-container
|
||||
max-width: 95% // otherwise the stem branch might get too short for long descriptions
|
||||
max-width: 95% // otherwise the stem branch might get too short for long descriptions
|
||||
|
||||
@@ -49,7 +49,7 @@ module WorkPackages
|
||||
"work-packages--activities-tab--index-anchor-name-param": activity_anchor_name
|
||||
}
|
||||
)) do
|
||||
block_given? ? yield : "##{journal_activity_id(journal)}"
|
||||
journal_updated_at_formatted_time(journal)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -72,15 +72,11 @@ module WorkPackages
|
||||
end
|
||||
|
||||
def activity_anchor_name
|
||||
OpenProject::FeatureDecisions.work_package_comment_id_url_active? ? "comment" : "activity"
|
||||
"comment"
|
||||
end
|
||||
|
||||
def journal_activity_id(journal)
|
||||
if OpenProject::FeatureDecisions.work_package_comment_id_url_active?
|
||||
journal.id
|
||||
else
|
||||
journal.sequence_version
|
||||
end
|
||||
journal.id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -55,8 +55,3 @@ OpenProject::FeatureDecisions.add :oidc_token_exchange,
|
||||
description: "Enables the under construction OAuth2 token exchange, allowing " \
|
||||
"users to interact with storage providers without consenting " \
|
||||
"in OAuth screens before first use."
|
||||
|
||||
OpenProject::FeatureDecisions.add :work_package_comment_id_url,
|
||||
description: "Introduced a new WP comment URL identifier structure " \
|
||||
"`#comment-<journal-id>` replacing the old " \
|
||||
"`#activity-<journal-sequence_number>`."
|
||||
|
||||
@@ -1030,11 +1030,11 @@ RSpec.describe "Work package activity", :js, :with_cuprite do
|
||||
wait_for_auto_scrolling_to_finish
|
||||
activity_tab.expect_journal_container_at_position(50) # would be at the bottom if no anchor would be provided
|
||||
|
||||
activity_tab.expect_activity_anchor_link(text: "#1")
|
||||
activity_tab.expect_activity_anchor_link(text: format_time(comment_1.updated_at))
|
||||
end
|
||||
end
|
||||
|
||||
context "with #comment- anchor", with_flag: { work_package_comment_id_url: true } do
|
||||
context "with #comment- anchor" do
|
||||
before do
|
||||
visit project_work_package_path(project, work_package.id, "activity", anchor: "comment-#{comment_1.id}")
|
||||
wp_page.wait_for_activity_tab
|
||||
@@ -1052,7 +1052,7 @@ RSpec.describe "Work package activity", :js, :with_cuprite do
|
||||
end
|
||||
end
|
||||
|
||||
context "when on mobile screen size", with_flag: { work_package_comment_id_url: true } do
|
||||
context "when on mobile screen size" do
|
||||
before do
|
||||
page.current_window.resize_to(500, 1000)
|
||||
|
||||
@@ -1086,11 +1086,11 @@ RSpec.describe "Work package activity", :js, :with_cuprite do
|
||||
wait_for_auto_scrolling_to_finish
|
||||
activity_tab.expect_journal_container_at_bottom # would be at the top if no anchor would be provided
|
||||
|
||||
activity_tab.expect_activity_anchor_link(text: "#2")
|
||||
activity_tab.expect_activity_anchor_link(text: format_time(comment_2.updated_at))
|
||||
end
|
||||
end
|
||||
|
||||
context "with #comment- anchor", with_flag: { work_package_comment_id_url: true } do
|
||||
context "with #comment- anchor" do
|
||||
before do
|
||||
visit project_work_package_path(project, work_package.id, "activity", anchor: "comment-#{comment_1.id}")
|
||||
wp_page.wait_for_activity_tab
|
||||
|
||||
Reference in New Issue
Block a user