Skip to content

Documents: Use single-transaction create/update-and-publish endpoints (FE) - #23031

Merged
nielslyngsoe merged 30 commits into
v17/improvement/save-and-publish-take-threefrom
v17/feature/68071-save-and-publish-fe
Jun 22, 2026
Merged

nielslyngsoe merged 30 commits into
v17/improvement/save-and-publish-take-threefrom
v17/feature/68071-save-and-publish-fe

Documents: Address review feedback on save-and-publish FE

3fb8ac4
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Code Health Review (v17/improvement/save-and-publish-take-three) failed Jun 1, 2026 in 1m 10s

CodeScene PR Check

Quality Gate Failed

Code Health Improved (2 files improve in Code Health)

Gates Failed
Enforce advisory code health rules (3 files with String Heavy Function Arguments, Overall Code Complexity, Complex Method)

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce advisory code health rules Violations Code Health Impact
document-detail.server.data-source.ts 1 advisory rule 9.61 → 9.02 Suppress
document-publishing.manager.ts 1 advisory rule 9.10 → 8.82 Suppress
document-workspace.context.ts 1 advisory rule 8.48 → 8.51 Suppress
View Improvements
File Code Health Impact Categories Improved
document-publishing.workspace-context.ts 7.61 → 7.63 Complex Method, Overall Code Complexity
document-workspace.context.ts 8.48 → 8.51 Primitive Obsession, String Heavy Function Arguments

Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Overall Code Complexity document-detail.server.data-source.ts
  • String Heavy Function Arguments document-publishing.manager.ts
  • Complex Method document-workspace.context.ts: UmbDocumentWorkspaceContext.createAndPublish

✅ Improving Code Health:

  • Overall Code Complexity document-publishing.workspace-context.ts
  • Primitive Obsession document-workspace.context.ts
  • Complex Method document-publishing.workspace-context.ts: UmbDocumentPublishingWorkspaceContext.performSaveAndPublish
  • String Heavy Function Arguments document-workspace.context.ts

Annotations

Check warning on line 1 in src/Umbraco.Web.UI.Client/mocks/db/document-publishing.manager.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (v17/improvement/save-and-publish-take-three)

❌ New issue: String Heavy Function Arguments

In this module, 46.7% of all arguments to its 9 functions are strings. The threshold for string arguments is 39.0%. The functions in this file have a high ratio of strings as arguments. Avoid adding more.

Check notice on line 431 in src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/workspace-context/document-publishing.workspace-context.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (v17/improvement/save-and-publish-take-three)

✅ Getting better: Complex Method

UmbDocumentPublishingWorkspaceContext.performSaveAndPublish decreases in cyclomatic complexity from 10 to 9, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 1 in src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/workspace-context/document-publishing.workspace-context.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (v17/improvement/save-and-publish-take-three)

✅ Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 6.78 to 6.72, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check warning on line 1 in src/Umbraco.Web.UI.Client/src/packages/documents/documents/repository/detail/document-detail.server.data-source.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (v17/improvement/save-and-publish-take-three)

❌ New issue: Overall Code Complexity

This module has a mean cyclomatic complexity of 4.78 across 9 functions. The mean complexity threshold is 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check warning on line 449 in src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/context/document-workspace.context.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (v17/improvement/save-and-publish-take-three)

❌ New issue: Complex Method

UmbDocumentWorkspaceContext.createAndPublish has a cyclomatic complexity of 10, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 1 in src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/context/document-workspace.context.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (v17/improvement/save-and-publish-take-three)

✅ Getting better: Primitive Obsession

The ratio of primitive types in function arguments decreases from 61.11% to 42.31%, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.

Check notice on line 1 in src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/context/document-workspace.context.ts

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (v17/improvement/save-and-publish-take-three)

✅ No longer an issue: String Heavy Function Arguments

The ratio of strings in function arguments is no longer above the threshold