Introduce Section Alias condition const#19633
Merged
madsrasmussen merged 6 commits intomainfrom Jun 30, 2025
Merged
Conversation
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.
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.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a constant for the section alias condition and replaces all hardcoded string literals ('Umb.Condition.SectionAlias') with the new constant (UMB_SECTION_ALIAS_CONDITION_ALIAS) across manifests and related files. This helps to centralize the condition alias value and ensures consistency across the codebase.
- Updated import statements to include UMB_SECTION_ALIAS_CONDITION_ALIAS from the backoffice/section package.
- Replaced hardcoded string alias values in conditions arrays with UMB_SECTION_ALIAS_CONDITION_ALIAS.
- Adjusted re-exports and reorganization in the core/section conditions modules to support the new constant.
Reviewed Changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Umbraco.Web.UI.Client/src/packages/user/section/sidebar-app/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/umbraco-news/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/translation/menu/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/templating/menu/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/telemetry/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/settings/welcome/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/settings/structure/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/settings/advanced/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/search/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/publish-cache/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/performance-profiling/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/packages/package-section/manifests.ts | Introduced additional import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/models-builder/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/members/section/sidebar-app/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/media/media/dashboard/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/media/media-section/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/language/app-language-select/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/health-check/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/documents/section/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/documents/document-redirect-management/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/dictionary/dashboard/manifests.ts | Updated import and replaced string alias with constant. |
| src/Umbraco.Web.UI.Client/src/packages/core/section/conditions/types.ts | Replaced file content with re-exports for section alias and user permission types. |
| src/Umbraco.Web.UI.Client/src/packages/core/section/conditions/section-user-permission/types.ts | Added new type definitions for the section user permission condition. |
| src/Umbraco.Web.UI.Client/src/packages/core/section/conditions/section-user-permission/section-user-permission.condition.ts | Updated import path to the condition types. |
| src/Umbraco.Web.UI.Client/src/packages/core/section/conditions/section-user-permission/section-user-permission.condition.test.ts | Adjusted imports for the section user permission condition test. |
| src/Umbraco.Web.UI.Client/src/packages/core/section/conditions/section-user-permission/manifests.ts | Added manifest for section user permission condition. |
| src/Umbraco.Web.UI.Client/src/packages/core/section/conditions/section-user-permission/constants.ts | Introduced new constant for section user permission condition. |
| src/Umbraco.Web.UI.Client/src/packages/core/section/conditions/section-alias/types.ts | Created type definitions for section alias condition based on the new constant. |
| src/Umbraco.Web.UI.Client/src/packages/core/section/conditions/section-alias/section-alias.condition.ts | Updated import paths for the section alias condition. |
| src/Umbraco.Web.UI.Client/src/packages/core/section/conditions/section-alias/manifests.ts | Added manifest for section alias condition using the new constant. |
| src/Umbraco.Web.UI.Client/src/packages/core/section/conditions/section-alias/constants.ts | Introduced new constant for section alias condition. |
| src/Umbraco.Web.UI.Client/src/packages/core/section/conditions/manifests.ts | Composed manifests via re-exports of section alias and user permission manifests. |
| src/Umbraco.Web.UI.Client/src/packages/core/section/conditions/constants.ts | Re-exported constants for section alias and user permission conditions. |
| src/Umbraco.Web.UI.Client/examples/validation-context/index.ts | Updated import and replaced string alias with constant in example. |
| src/Umbraco.Web.UI.Client/examples/collection/collection/table-view/index.ts | Removed export statement (likely intentional cleanup). |
| src/Umbraco.Web.UI.Client/examples/collection/collection/card-view/index.ts | Removed export statement (likely intentional cleanup). |
| .github/contributing-backoffice.md | Updated documentation snippet to use the new constant. |
bjarnef
reviewed
Jun 30, 2025
nielslyngsoe
approved these changes
Jun 30, 2025
This was referenced Jul 28, 2025
This was referenced Aug 26, 2025
This was referenced Sep 8, 2025
This was referenced Aug 26, 2025
This was referenced Sep 8, 2025
This was referenced Oct 20, 2025
This was referenced Oct 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce
UMB_SECTION_ALIAS_CONDITION_ALIASfor the section alias condition + reuse across all manifests