Commit Graph

69395 Commits

Author SHA1 Message Date
Mads Rasmussen
49b95c1225 Introduce Section Alias condition const (#19633)
* Refactor section conditions into subfolders

Split section condition logic into 'section-alias' and 'section-user-permission' subfolders, each with their own constants, manifests, and types. Updated imports and manifest aggregation to use the new structure for improved modularity and maintainability.

* use const

* fix build

* Refactor section alias condition to use constant

Replaces hardcoded 'Umb.Condition.SectionAlias' strings with the UMB_SECTION_ALIAS_CONDITION_ALIAS constant across all manifests and related files. This improves maintainability and consistency by centralizing the section alias condition reference.
2025-06-30 13:24:00 +02:00
Peter
14063a0b89 Add support for file upload property editor within the block list and grid (#18976)
* Fix for https://github.com/umbraco/Umbraco-CMS/issues/18872

* Parsing added for current value

* Build fix.

* Cyclomatic complexity fix

* Resolved breaking change.

* Pass content key.

* Simplified collections.

* Added unit tests to verify behaviour.

* Allow file upload on block list.

* Added unit test verifying added property.

* Added unit test verifying removed property.

* Restored null return for null value fixing failing integration tests.

* Logic has been updated according edge cases

* Logic to copy files from block list items has been added.

* Logic to delete files from block list items on content deletion has been added

* Test fix.

* Refactoring.

* WIP: Resolved breaking changes, minor refactoring.

* Consistently return null over empty, resolving failure in integration test.

* Removed unnecessary code nesting.

* Handle distinct paths.

* Handles clean up of files added via file upload in rich text blocks on delete of the content.

* Update src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyEditor.cs

Co-authored-by: Sven Geusens <geusens@gmail.com>

* Fixed build of integration tests project.

* Handled delete of file uploads when deleting a block from an RTE using a file upload property.

* Refactored ensure of property type property populated on rich text values to a common helper extension method.

* Fixed integration tests build.

* Handle create of new file from file upload block in an RTE when the document is copied.

* Fixed failing integration tests.

* Refactored notification handlers relating to file uploads into separate classes.

* Handle nested rich text editor block with file upload when copying content.

* Handle nested rich text editor block with file upload when deleting content.

* Minor refactor.

* Integration test compatibility supressions.

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Sven Geusens <geusens@gmail.com>
2025-06-30 13:21:10 +02:00
Andy Butland
2cb114ffaf Fix check for pending package migration to use the package not the plan name (#19509)
* Fix check for pending package migration to use the package not plan name.

* Cover all package name/identifier permutations and fix the API output for multiple plans

* Adjusted log message to not refer to unattended migrations as migrations may be being run attended.

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2025-06-30 10:20:11 +00:00
Jacob Overgaard
fb2aad0b1d V16: Adds a state for "forbidden" for entities that return 403 (Access denied) (#19557)
* feat: adds new localization keys for forbidden routes

* feat: ignore all 400, 401, 403, and 404 errors as they are handled by the UI

* feat: adds new elements to show forbidden routes and entities

* feat: adds generic forbidden state to base entities

* feat: injects a forbidden route component to documents

* feat: adds 'forbidden' state to media workspace

* chore: aligns document and media workspaces

* test(mock): adds user configuration endpoint

* test(mock): adds calculate-start-nodes endpoint to users

* test(mock): adds missing endpoint for 'client-credentials'

* feat: clean up old observers on entity errors

* feat: aligns UI for better DX if there is no user

* fix: returns early if there is no user, instead of trying to append properties to the object

* feat: adds 'forbidden' state to members

* feat: adds support for forbidden document blueprints

* feat: allows parent to be undefined as well as null

* feat: forbidden route for members as a state

* chore: simplify language workspace

* test: adds forbidden mock data

* test: adds missing endpoints and a check for forbidden ids
2025-06-30 10:00:11 +01:00
Jacob Overgaard
861afde3a0 Fix for code scanning alert no. 1719: Client-side cross-site scripting (#19607)
* Fix for code scanning alert no. 1719: Client-side cross-site scripting

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* feat: uses built-in sanitizeHtml in backoffice

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-06-30 09:04:50 +01:00
Andy Butland
29b6c2d49e Assert dates in content editing integration tests to millisecond only (#19513)
* Assert dates in content editing integration tests to millisecond only.

* Add date time extension unit tests and refactor to switch statement.

* Removed whitespace.
2025-06-30 07:59:22 +02:00
Andy Butland
c223d93a53 Adds XML header docs indicating usage of options on NuCacheSerializerType (#19555)
Adds XML header docs indicating usage of options on NuCacheSerializerType.
2025-06-30 07:53:09 +02:00
Niels Lyngsø
c432f5a66c load more button component and styling (#19622)
* localization

* tree-load-more-button component

* implement

* ability to hide block actions

* Revert "ability to hide block actions"

This reverts commit bf8222f49b92ecbf6008d8e716a578d18ca43b19.
2025-06-29 18:39:07 +02:00
Lee Kelleher
9cb0557120 Tiptap RTE: A11Y label improvements (#19531)
* a11y: Adds labels to Tiptap RTE toolbar buttons/menus

* a11y: Adds labels to Tiptap toolbar designer actions

* a11y: Adds labels to Tiptap statusbar designer actions

* a11y: Adds label to Overlay Size dropdown

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2025-06-27 12:10:12 +00:00
Lee Kelleher
f7aab5e901 Table checkbox/icon alignment (#19615)
* Table checkboxes slotted whitespace

Fixes #19563

* Table markup tidy-up

Resolved the `style` attribute error

* localize texts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-06-27 11:58:00 +00:00
Mads Rasmussen
75ee1e65d1 Show success/failed state for workspace buttons with additional options (#19535)
* also show success/failed state when button have additional options

* rename method

* clear timeout
2025-06-27 13:38:21 +02:00
Mads Rasmussen
b7be95b239 Add folder workspace icon (#19366)
* add slot for icon

* expose icon data

* render icon

* load type for scaffold

* rename

* render icon for media

* add observable for content type icon

* request data in data source

* wire up document scaffolding

* remove unused

* export server data source

* render icon for member

* rename data source to align with other detail sources

* rename data source

* remove unused styling

* remove console log

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove console log

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* remove console log

* render workspace icon for document type folders

* make folder workspace editor

* use element

* remove const

* use folder-workspace-editor for templating folders

* introduce name write guard manager

* prevent name change of file system folders

* Update script-folder-workspace-editor.element.ts

* make guard optional

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-27 13:38:01 +02:00
Laura Neto
376a2c8ff6 V16.1: Fix broken content creation when using blueprints (#19518)
Fixes broken content creation based on blueprints

Fixes preset not overriding values in the various createScaffold methods.
2025-06-27 13:36:14 +02:00
Lee Kelleher
3e891972d0 Tiptap RTE: Adds token for statusbar context (#19530)
Tiptap: adds token for Statusbar context
2025-06-27 13:35:36 +02:00
Lee Kelleher
cdf7b3dbef Tiptap RTE: Toolbar menu active highlighting (#19532)
* Adds optional parameter to Tiptap toolbar item's `isActive`

* Adds `isActive` support to toolbar menus and cascading menus

* Adds `isActive` support to the font menus

* Adds `isActive` support to the table menu

+ UI/CSS tweak

* Adds `isActive` support to the style menu API

+ refactored the commands

* Improves cascading menu popover closing

it previously didn't close the menu when an action was clicked.
2025-06-27 13:33:17 +02:00
Mads Rasmussen
ede906e152 DocumentUrlDataResolver: Use UMB_VARIANT_CONTEXT instead of UMB_PROPERTY_DATASET_CONTEXT (#19537)
* change to variant context

* remove unused
2025-06-27 13:32:22 +02:00
Mads Rasmussen
5cafa599fa Remove trash success notifications (#19534)
* remove trash notifications

* Updated tests so we no longer use the notification for moving to recycle bin

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2025-06-27 13:31:08 +02:00
Andreas Zerbst
e3c52afbbb v16 QA Remove smoke tag from flaky test (#19611)
* Remove from smoke tag

* Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Content/ContentWithImageCropper.spec.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-26 13:10:58 +02:00
Kenn Jacobsen
c61fc7419c Cherry picked #19540 to V16 (and fixed changed signatures) (#19592) 2025-06-26 09:16:49 +02:00
WoutVanBoxem
67106f0813 Add missing media exports (#19585)
* Add missing media exports

Fixes #19560 and #19561

* Update src/Umbraco.Web.UI.Client/src/packages/media/media/index.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-24 12:17:40 +00:00
Laura Neto
55506bac3a Simplify creating content from a blueprint programmatically (#19528)
* Rename `IContentService.CreateContentFromBlueprint` to `CreateBlueprintFromContent`

In reality, this method is used by the core to create a blueprint from content, and not the other way around, which doesn't need new ids. This was causing confusion, so the old name has been marked as deprecated in favor of the new name. If developers want to create content from blueprints they should use `IContentBlueprintEditingService.GetScaffoldedAsync()` instead, which is what is used by the management api.

* Added integration tests to verify that new block ids are generated when creating content from a blueprint

* Return copy of the blueprint in `ContentBlueprintEditingService.GetScaffoldedAsync` instead of the blueprint itself

* Update CreateContentFromBlueprint xml docs to mention both replacement methods

* Fix tests for rich text blocks

* Small re-organization

* Adjusted tests that were still referencing `ContentService.CreateContentFromBlueprint`

* Add default implementation to new CreateBlueprintFromContent method

* Update tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentBlueprintEditingServiceTests.GetScaffold.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>

---------

Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-06-24 13:43:34 +02:00
Jacob Overgaard
b41eecf58c V16: Document shows blank page when clicking an active link (#19553)
* fix: if no workspace views are found at all, show a not found page

* fix: rather than redirecting to the first available tab, which may not always be available on secondary routing, let the router display the first tab on an empty url

this mirrors how workspace views are displayed in umb-workspace-editor
2025-06-24 09:45:31 +01:00
Lee Kelleher
0a7a92287b Variant workspace breadcrumb item parentheses (#19599)
* Refactored breadcrumb variant name

The parentheses will be added to unnamed variant ancestor items.

* Adds `last-item` attribute

(for semantics)

* Imports tidy-up

* Refactored `#getHref` to early exit for `.isFolder`

Saves on the string allocation.
2025-06-24 10:10:02 +02:00
Andy Butland
6237ddca89 Improves the layout on the create blueprint dialog (#19556)
* Improves the layout on the create blueprint dialog.

* localize texts

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-06-24 08:08:09 +00:00
Mads Rasmussen
ef453ad62e Docs: Collection example (#19593)
* add basic collection example

* add card view example

* update example readme

* Add workspace view example with collection
2025-06-24 08:31:26 +01:00
Nhu Dinh
e6791246e4 V16 QA Added acceptance tests for Webhook (#19545)
* Added tests for webhook

* Added tests for webhook trigger

* Bumped version

* Make all Webhook tests run in the pipeline

* Fixed comment

* Reverted npm command
2025-06-17 08:55:30 +00:00
Andy Butland
50272f7401 Removed duplicate/obsolete code fixing issue with document move permission checks (#19552)
Removed duplicate/obsolete code fixing issue with document move permission checks.
2025-06-13 14:41:08 +02:00
Nhu Dinh
9964e0b8ec V16 QA Added acceptance tests for granular property value permission (#19458)
* Updated due to test helper changes

* Updated user group tests due to api helper changes

* Updated tests for user group default configuration due to UI changes

* Added tests for document property value permission

* Added tests for document property value permission in content with block

* Bumped version

* Make specific tests run in the pipeline

* Added skip tag and issue link for the failing tests

* Added tests for granular property value permission

* Fixed comment

* Bumped version

* Bumped version

* Fixed comments

* Bumped version and reverted npm command

* Make all tests for user group permission run in the pipeline

* Updated smokeTest command

* Fixed comments

* Reverted npm command
2025-06-13 11:13:28 +07:00
Andy Butland
9d11c76ea1 Added start-up logging of document URL caching (#19538)
Added startup logging of document URL caching.
2025-06-12 22:20:44 +02:00
Andy Butland
da9c6e24ce Removed unnecessary compatibility suppressions file from integration tests. 2025-06-12 13:50:29 +02:00
Jacob Overgaard
cd72dbe4ea V16: Retry requests after timeout (#19495)
* feat: fix a small-ish nitpick where extensions would reload after login

this could potentially try to re-register all private extensions after each auth signal, which is being prevented anyway because of duplicate aliases, but still nice to remove and not have to listen to

* feat: align login UI extension load with backoffice, i.e. wait for external load before registering core extensions

* build(deps): bump @hey-api to newest and re-generate client

* chore: adds extra error logging

* feat: adds retry logic to the api interceptor

* feat: warn about incomplete actions

* fix: the body was already plain text, but we need to ensure the headers say so as well

* feat: warns the user when actions could not be completed

* build(deps): update @hey-api/client-fetch

* chore: generate new api

* feat: simplify error handling to just UmbApiError and UmbCancelError

* feat: moves error notifications from interceptors into tryExecute, so you more easily can opt out of it and everything is gathered in one place

* feat: recreate responses with correct 'status' and 'statusText'

* build: stop dotnet processes after debug session

* feat: extrapolate common logic into helper method to create responses

* feat: returns a UmbProblemDetails like object on interceptors to be handled by tryExecute

* chore: deprecates duplicate, outdated UmbProblemDetails interface and type guard

* feat: uses the 'title' of the problem details object to convey the main message

* chore: 401 and 403 uses their own interceptors

* feat: show no notification if 401

* feat: uses the real request method and url (instead of the template placeholders) to tell the user what did not succeed

* feat: retry requests with no timeout/race

* feat: throttle and delay signals and disallow them from being updated from the outside

* chore: adds more logging to timeouts

* chore: optimise imports

* test: ignores any test files left in node_modules folder

* feat: uses auditTime to wait a bit before showing the timeout screen

* feat: adds 404 handling to error interceptor

* chore: cleans up after response modification

* feat: preserve only a few headers

this mimicks the v15 behavior

* feat: lets the UI handle 404 errors instead of notifying directly

* test: uses create action menu option instead to find the correct locator, and skips a seemingly unnecessary timeout
2025-06-12 12:24:11 +01:00
Jacob Overgaard
e89e18f5ba V16: Item and Detail Base Repository should use correct typings for return types (#19447)
* fix: add a catcher to most `asPromise` for stores to prevent cascading errors

* fix: remove conditional instances - they should be able to be undefined

* fix: check for missing store and extract UmbProblemDetails

* fix: only append data if no error

* fix: adds error handling to missing stores and to extract the ProblemDetails object

* revert commit

* fix: ignore errors completely instead of unsetting stores

* revert commit

* chore: cleanup imports

* fix: do not unset store

* stop observation in a proper way

* stop observation of for document-user-permissions

* check for manager twice

* save action

* save action optional

* fix: ensure the right types are used for base stores

---------

Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
2025-06-12 11:59:11 +01:00
Andy Butland
cfcb708d26 Merge branch 'release/16.0' and enable package validation 2025-06-12 08:18:13 +02:00
Laura Neto
9a96ebf812 Replace keys in Rich Text Editor blocks on clone operations (#19526)
* Regenerate keys in RTE blocks on clone operations

This was already present for BlockList and BlockGrid, but not Blocks in RTE.

* Small adjustment from code review
2025-06-12 07:03:49 +02:00
Jacob Overgaard
9812630bb4 Prepare 16.0 release (#19523)
* Bump version to 16.0.0, update starter kit reference and enable package validation.

* Update version number in package.json.

* Re-disabled package validation (can't enable this yet).
2025-06-11 14:01:52 +02:00
Jacob Overgaard
47bc2c2647 build(deps): bump @umbraco-ui/uui to 1.14.0 (#19524) 2025-06-11 13:57:41 +02:00
Andy Butland
1cf95be97d Re-disabled package validation (can't enable this yet). 2025-06-11 12:07:10 +02:00
Andy Butland
8396249a38 Update version number in package.json. 2025-06-11 11:56:33 +02:00
Andy Butland
e231feb522 Bump version to 16.0.0, update starter kit reference and enable package validation. 2025-06-11 11:53:05 +02:00
Lee Kelleher
919b65ea19 Tiptap RTE: Style Menu action toggles (#19520)
* Tiptap style menu toggles (for classes and IDs)

Fixes #19244

* Tiptap style menu toggles (for font/color)

Fixes #19508

* Tiptap "Clear Formatting" remove classes and styles

* Tiptap font sizes, removes trailing semicolon

as the API handles the delimiter

* Tiptap global attrs: adds set/unset styles commands
2025-06-11 09:21:21 +02:00
Andy Butland
0c33a23c50 Bump version to 16.0.0-rc6. 2025-06-10 11:47:16 +02:00
Andy Butland
fe7f0558c1 Update template to reference latest LTS version (#19517)
Update template to reference latest LTS version.
2025-06-10 10:31:10 +02:00
Andy Butland
ab600cb798 Optimize initialization of document URLs on start-up (#19498)
* Optimize initialization of document URLs on startup.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 8d2ff6f92a)
2025-06-10 10:29:17 +02:00
Andy Butland
8d2ff6f92a Optimize initialization of document URLs on start-up (#19498)
* Optimize initialization of document URLs on startup.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-10 10:28:45 +02:00
Lee Kelleher
69224cb53c Tiptap RTE: Toolbar/statusbar config initial value state (#19514)
Tiptap configuration waits until initialized to set value

Fixes #19009
2025-06-10 08:54:33 +01:00
Andy Butland
3468177c0c Fix issues with removal of user logins on change to external login provider configuration (16) (#19512)
* Ensure to delete related tokens when removing logins for removed external login providers.
Ensure to avoid removing logins for members.

* Removed unnecessary <= check.
2025-06-10 08:22:02 +02:00
Andy Butland
89b2120c46 Obsoleted an unused constant ListViewMembers. 2025-06-06 13:49:52 +02:00
Andy Butland
6c769d6024 Adds attribute to ensure management API requests are never cached in the browser or via a CDN (#19496)
Adds attribute to ensure management API requests are never cached in the browser or via a CDN.
2025-06-06 10:41:13 +00:00
Andy Butland
67ab06715f Merge branch 'release/16.0' 2025-06-06 10:49:21 +02:00
Mads Rasmussen
82a063b1e2 Fix: V16 Variant breadcrumb wrong after creating a nested document (#19492)
fixes the breadcrumb after created a new nested document
2025-06-05 17:05:13 +01:00