Commit Graph

69629 Commits

Author SHA1 Message Date
Jacob Overgaard
aa90253d71 build(deps): bump @umbraco-ui from 1.14.1 to 1.14.2 (#19656) 2025-07-03 11:27:37 +02:00
Jacob Overgaard
c9bef96c32 V16.1: Never reject a token response (#19651)
* fix: never reject a token response

If a token response is rejected, then the pipeline will also fail because it does not understand that error. Let the API interceptors do their job instead and simply return the old, now-invalid token which will prompt the API interceptors to store the request states and retry them afterwards.

* chore: removes unused timeoutsignal

* chore: captures the stale token before potentially clearing it
2025-07-02 16:10:30 +01:00
Jacob Overgaard
9cb8dc73e5 Merge branch 'release/16.1' 2025-07-02 10:21:20 +02:00
Jacob Overgaard
d10ba420f4 V16.1: 400 errors are being wrongfully ignored (#19648)
fix: allows 400 errors to have a default notification unless silenced manually by `disableNotifications`
2025-07-02 08:16:03 +00:00
Jacob Overgaard
be3a1759de GitHub: Only deploy to Azure on direct pull requests (#19647)
* build(github): check that the "close" job only runs when the appropriate label is applied

it follows that the "build" job would only have built an environment when the label was applied

* build(github): check that the action is run directly on the repository and not from a fork

this alleviates the problem that the deploymentToken for Azure only exists within the repository
2025-07-02 09:47:53 +02:00
Laura Neto
dcd8b42522 Move cache instructions pruning to background job (#19598)
* Remove pruning logic from `CacheInstructionService.ProcessInstructions()`

* Add and register `CacheInstructionsPruningJob` background job

* Add unit tests

* Remove breaking change in ICacheInstructionService

* Adjust some obsoletion messages to mention v17

* Added missing scope

* Update tests

* Fix obsoletion messages version

* Update ProcessInstructions methods summary
2025-07-01 11:17:59 +02:00
Mads Rasmussen
3b4639de08 Collection rendering performance improvements Part 1: Improve Entity actions render performance (#19605)
* Add null checks for editPath and name in render method

The render method now checks for the presence of both editPath and _name before rendering the button, preventing potential errors when these values are missing.

* Refactor dropdown open state handling

Replaces the public 'open' property with a private field and getter/setter to better control dropdown state. Moves popover open/close logic into the setter, removes the 'updated' lifecycle method, and conditionally renders dropdown content based on the open state.

* add opened and closed events

* dispatch opened and closed events

* Render dropdown content only when open

Introduces an _isOpen state to control rendering of the dropdown content in UmbEntityActionsBundleElement. Dropdown content is now only rendered when the dropdown is open, improving performance and preventing unnecessary DOM updates.

* Update dropdown.element.ts

* create a cache elements

* Optimize entity actions observation with IntersectionObserver

Adds an IntersectionObserver to only observe entity actions when the element is in the viewport, improving performance. Refactors element creation to use constructors, updates event handling, and ensures cleanup in disconnectedCallback.

* only observe once

* Update entity-actions-bundle.element.ts

* Update dropdown.element.ts

* Update entity-actions-bundle.element.ts

* split dropdown component

* pass compact prop

* fix label

* Update entity-actions-dropdown.element.ts

* Update entity-actions-dropdown.element.ts

---------

Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
2025-07-01 08:37:57 +00:00
Jacob Overgaard
d5159ae4f7 V16: Upgrade Storybook from V8 to V9 (#19640)
* build(deps-dev): bump storybook from v8 to v9

* chore: run storybook v9 migrations

* chore: updates import paths for storybook-webcomponents-vite (migration)

* chore: migrates eslint for storybook config

* fix: updates old link to composed storybook so we reference the latest production uui

* chore: formats eslint config file

* chore: changes import path to build mdx stories

* chore: updates language list to reflect v16
2025-07-01 09:50:27 +02:00
Niels Lyngsø
629635e0dd observable for detecting if split view is active (#19394)
* observable for detecting if split view is active

* declare splitView manager on content detail workspace

* remove declaration as it was a double
2025-07-01 09:30:55 +02:00
Andy Butland
876d229b7e Merge branch 'v15/dev'
# Conflicts:
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/Configuration/ContentSettingsExtensionsTests.cs
2025-07-01 08:28:48 +02:00
Brynjar Þorsteinsson
ad5a18f1ee Fix pagination in Content Delivery API Index Helper (#19606)
* Refactor descendant enumeration in DeliveryApiContentIndexHelper

Improved loop condition to allow for processing of more than 10.000 descendants for indexing.

* Add failing test for original issue.

* Renamed variable for clarity.

---------

Co-authored-by: Brynjar Þorsteinsson <brynjar@vettvangur.is>
Co-authored-by: Andy Butland <abutland73@gmail.com>
2025-07-01 08:23:58 +02:00
Andy Butland
cdc62d3020 Aligned jsdoc and inferred function type on UmbCurrentUserContext (#19642)
Aligned jsdoc and inferred function type on UmbCurrentUserContext.
2025-06-30 18:52:25 +02:00
Andy Butland
3e99c2f69d Removes full-width from toggle property editor (#19641)
* Removes full-width from toggle property editor.

* Fixed linting error.
2025-06-30 14:35:34 +00:00
Jacob Overgaard
b3d86d5395 build(deps): bump @umbraco-ui/uui from 1.14.0 to 1.14.1 2025-06-30 15:30:32 +02:00
Mads Rasmussen
50327be6e7 React on late read only guard rules (#19621)
* Observe read-only guard rules in variant selector

Added observation of read-only guard rules in the workspace split view variant selector to ensure read-only cultures are updated when rules change.

* Improve save action to react to read-only rule changes

* remove unused
2025-06-30 15:22:44 +02:00
Mads Rasmussen
e135599c96 Fix readonly UI for create document user permission (#19554)
* Update document-workspace.context.ts

* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts

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

* add check for undefined

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-30 15:19:46 +02:00
Lili
d6a66bc4d8 V15 Bugfix: Horizontal scrollbar in Media section #19479 (#19541)
fix to stop the scroll bar appearing in the media section.
2025-06-30 14:55:52 +02:00
Lili
32a4fbebd5 V15 Bugfix: Horizontal scrollbar in Media section #19479 (#19541)
fix to stop the scroll bar appearing in the media section.
2025-06-30 14:52:35 +02:00
Mads Rasmussen
283e6b2ff0 Entity type + Entity Unique conditions (#19614)
* Add entity-type and entity-unique condition support

Introduces new condition types for entity-type and entity-unique, including their constants, types, condition implementations, and manifests. Updates exports in core entity modules to include these new features, enabling more granular extension conditions based on entity type and uniqueness.

* register conditions

* add support for oneOf

* fix self imports

* Update manifests.ts

* remove unused
2025-06-30 14:51:21 +02:00
Andy Butland
cfbbfa004c Further fix to configuration classes using ISet, resolving regression with custom 404 pages (#19573)
Further fix to configuration classes using ISet, resolving regression with custom 404 pages.
2025-06-30 14:37:04 +02:00
Niels Lyngsø
b81d45901b ability to hide block actions (#19626)
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-06-30 12:35:18 +00:00
Niels Lyngsø
df39026d0d set height to match workspace top bar (#19384)
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2025-06-30 12:32:45 +00:00
Henrik
880d84b030 Reduce lookups needed in ConcurrentDictionaries in ContentNavigationServiceBase (#19603)
Reduce lookups needed in ConcurrentDictionaries and sort using List.Sort, make key removal O(1) by using hashsets and avoid duplicates, remove unneeded .ToList() and other minor tweaks
2025-06-30 14:24:04 +02:00
Lee Kelleher
f9c2b9594f Label property-editor, adds UFM template support (#19610)
* Adds `labelTemplate` config to Label editor

* Code tidyup for Label editor element

* Adds "format-bytes" UFM filter

* Renamed "format-bytes" to "bytes"

* Label element tidy-up + copilot amends

* Added `formatBytes` options

* Simplified condition, thanks CodeScene

* Reverted element export
2025-06-30 12:18:02 +00:00
Henrik
1f28f1043a Avoid async await Task.FromResult, plus some other minor tweaks (#19597) 2025-06-30 14:15:22 +02:00
Andy Butland
e78eee50ed Minor refactor following merge of PR #19617. 2025-06-30 14:08:50 +02:00
Davor Zlotrg
ba2072c979 fix: json serialization and deserialization for NuCacheSerializerType (#19617)
fix: json serialization and deserialization
2025-06-30 14:07:00 +02:00
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