Commit Graph

69453 Commits

Author SHA1 Message Date
Jacob Overgaard
e6c169e566 Adds background worker to check timeout state (#19702)
* feat: converts tokenResponse into an object state

* feat: adds worker that checks token lifetime

* feat: initialises token worker to check up on tokens

* revert

* chore: defines typings for shared workers

* chore: uses correct assets url for core package

* feat: sets correct values for token check expiration

* feat: adds labels to confirm modal

* feat: separates logic for session monitoring to own controller

* feat: adds a timeout modal to correctly inform the user

* feat: opens the timeout modal (and closes it again) if a timeout occurs

* feat: log out when user clicks log out button

* feat: adds localization

* feat: sets sensible defaults for the web worker to check

* feat: adds more languages

* chore: adds more comments

* chore: removes nodejs types

* Update src/Umbraco.Web.UI.Client/src/packages/core/auth/workers/token-check.worker.ts

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

* chore: removes nodejs types

* chore: resolves cyclic imports

* chore: removes circular dependencies from the 'modal' package

* chore: redefine SharedWorkerGlobalScope because of Github Actions CI

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-10 13:56:03 +00:00
Lee Kelleher
3c6f222c8b Fixes Block Catalogue Modal Filter (#19700)
* Mock data updates

The `icon` is not part the block-type data.

* Adds `description` to the mock doctype model

* Refactors block catalogue modal

to make the filter/search work with a block-type's name & description.

This removes the need to use the `<umb-block-type-card>` component,
all element-type data is requested upfront.

* Reverted dev/debug change

* Abstracted out the element-type items observation to its own method

* Updated CSS rule

thanks to a Copilot suggestion.
2025-07-10 09:33:56 +00:00
Andy Butland
50282ea2e9 Bumped version to 16.2.0-rc. 2025-07-10 11:08:54 +02:00
Andy Butland
a91aefc185 Added comments for no-op partial view cache invalidator. 2025-07-10 07:33:07 +02:00
Lee Kelleher
1fe29d921b UFM: JavaScript-like Expressions (#19685)
* Adds `markedExtension` extension-type

* Relocates the Component and Filter extension-type interface code files

to under "extensions"

* Moves `UfmPlugin` type to its own referencable file

* Adds UFM support for JS expressions

making use of "@heximal/expressions" library.

* Modified regex pattern to match nested braces

* try/catch for invalid JS expressions

* Capitalizing the JS in `UmbUfmJsMarkedExtensionApi` class name

for consistency and improved readability.

* Abstracted out `ufmjs()` to its own Marked extension file

making it simpler to add unit-tests.

* Fixed up types in UFM context

added JSDocs for public methods

* Adds a generic Least Recently Used (LRU) cache implementation
2025-07-09 11:34:12 +02:00
Nhu Dinh
91e19c4faf V16 QA Reverted npx command (#19699)
* Reverted npx command

* Fixed npx command
2025-07-09 09:07:05 +00:00
Nhu Dinh
60580ff8bd V16 QA Added acceptance tests for granular document permission (#19546)
* Added tests for granular document permission

* Updated tests for Webhook

* Bumped version

* Make all tests for granular permission run in the pipeline

* Added issue link for the failing tests

* Remove .skip

* Removed unnecessary tests

* Updated assertion step for create and delete document for a specific document

* Updated tests for read permission

* Fixed comments
2025-07-09 13:30:47 +07:00
Nhu Dinh
17bc6dde28 V16 QA Removed unused API acceptance tests (#19679)
Removed unused API acceptance tests
2025-07-09 03:41:01 +00:00
Andy Butland
4e6f3f6d1d Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS 2025-07-08 15:53:52 +02:00
Andy Butland
9bd3076abf Register no-op implementation of IMemberPartialViewCacheInvalidator in headless setups (#19666)
* Register no-op implementation of IMemberPartialViewCacheInvalidator in headless setups.

* Tidied usings.
# Conflicts:
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs
2025-07-08 15:53:37 +02:00
Lee Kelleher
05010fc707 UFM: Code tidy-up (#19687)
* Reverted `elementName` constant

* UFM base element: simplify context check

* Adds console warning if UFM filter does not exist

* Removed unnecessary casting/typing

* Apply suggestion from @Copilot

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

* Moved console warnings outside of loop

* Added "ufm-" prefix to eslint local rules

---------

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-08 14:21:47 +02:00
Andy Butland
118b26a8b9 Clear member cache by older user name when member user name is updated (16) (#19690)
* Pass notification state to cache refreshers.
Pass previous user name into member saved notification state and use when refreshing cache to clear the member by keys based on this.

* Fixed issue raised in code review.

* Fixed casing for state key.

* Added removed parameter to unit tests.

* Fix breaking change.
2025-07-08 11:28:11 +02:00
Lee Kelleher
e00dcef4d6 UFM: Make Block Settings data available (#19686)
* Adds support to UFM for Block settings data

Fixes #17619

* Code/markup tidy-up

makes use of Lit's `when` directive
to simplify the conditional.
2025-07-08 10:12:58 +02:00
Lee Kelleher
1f84fe4701 UFM: Adds markedExtension extension-type (#19684)
* Adds `markedExtension` extension-type

* Relocates the Component and Filter extension-type interface code files

to under "extensions"

* Moves `UfmPlugin` type to its own referencable file
2025-07-08 10:10:22 +02:00
Mole
9baf04026e V16: Siblings endpoints (#19657)
* PoC implementation

* Move to controller base

* Implement solution that seems worse, but works better

* Don't require parent key in repository method

* Fix typos

* Add siblings for data type, media type and media

* Add endpoint for template

* Add DocumentType and DocumentBlueprint controllers

* Fix naming

* Fix case if siblings are under root

* Take item ordering into account

not all entities are ordered by sort order

* Add default implementation

* Fix parentkey

* Add tests

* Format optimizations for split view

* Add test covered requirement to description

* Cover positive case and make test case output more readable

* reduce allocations

* Clarify test

---------

Co-authored-by: Migaroez <geusens@gmail.com>
2025-07-07 12:53:42 +00:00
Andy Butland
b5195ed8eb Fixes issues with creation of documents from blueprints that have populated file upload properties (#19655)
* Fixes issue where content created from blueprint would not persist file upload property values.

* Ensure a copy of a file upload is created when scaffolding content from a blueprint, like we do when copying content.

* Clarified comment.

* Removed unneeded usings.

* Fixed spelling.

* Handle create of blueprint from content to create a new uploaded file.
Handle delete of blueprint to delete uploaded files.
2025-07-07 14:15:17 +02:00
Andy Butland
4c87cc5fd9 Adds support for custom granular permissions when aggregating across user groups (#19660)
* Added abstraction for aggregation of granular permissions to support custom permissions.

* Refactor to move responsibility for aggregating granular permissions to the respective mappers.

* Added XML header comments for permission mappers.

* Tidied up/removed warnings in UserPresentationFactory interface and implementation.

* Optimized retrieval of documents in DocumentPermissionMapper.

* Fixed method header comment.

* Use entity service rather than content service to retrieve key and path.
2025-07-07 12:59:55 +02:00
Andy Butland
8b4849be05 Fix issue with preview in delivery API for MNTP property editor (#19668)
* Passes the preview flag to the cache retrieval when resolving the delivery API object for the MNTP property editor.

* Added unit test verifying fix and adjusted mocks for tests to acoomodate.

* Provided preview flag for Razor rendering.
2025-07-07 11:33:59 +02:00
Peter
7b929a7c53 Title returns "Server Error" in non-debug mode (#19665)
* Add isDebug check for Title

* Error title has been added
2025-07-07 10:04:10 +02:00
Mads Rasmussen
af52e68b6e Clean up workspace conditions folder structure (#19634)
* 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.

* clean up workspace conditions
2025-07-07 07:34:01 +01:00
Mads Rasmussen
05aef6a91f Hide Document/Media Collection Workspace View until the item is created (#19644)
* only show collection items workspace view when document is created

* do not pass null for collection

* only show media collection view when media is created
2025-07-07 07:31:27 +01:00
Mads Rasmussen
8489d1a63e Docs: Tree example (#19624)
* add basic collection example

* add card view example

* update example readme

* Add workspace view example with collection

* wip tree example

* clean up

* Update README.md

* Update README.md
2025-07-07 07:13:16 +01:00
Peter
e0a00bfd04 Amend accessibility modifiers on file upload property editor components to support extension (#19643)
* Logic of getting media path moved to separate method.

* TemporaryFileUploadValidator marked as public

* Typo fix.
2025-07-04 14:22:50 +02:00
Jacob Overgaard
914bc409f6 Merge branch 'release/16.1' 2025-07-03 14:16:29 +02:00
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