Skip to content

Introduce Section Alias condition const#19633

Merged
madsrasmussen merged 6 commits intomainfrom
v16/feature/section-alias-const
Jun 30, 2025
Merged

Introduce Section Alias condition const#19633
madsrasmussen merged 6 commits intomainfrom
v16/feature/section-alias-const

Conversation

@madsrasmussen
Copy link
Member

@madsrasmussen madsrasmussen commented Jun 30, 2025

Introduce UMB_SECTION_ALIAS_CONDITION_ALIAS for the section alias condition + reuse across all manifests

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.
Copilot AI review requested due to automatic review settings June 30, 2025 08:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@madsrasmussen madsrasmussen merged commit 49b95c1 into main Jun 30, 2025
27 checks passed
@madsrasmussen madsrasmussen deleted the v16/feature/section-alias-const branch June 30, 2025 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants