Skip to content

Add Conditions to ManifestHeaderApp#19124

Merged
madsrasmussen merged 1 commit intoumbraco:contribfrom
warrenbuckley:add-conditions-to-headerapps
Apr 24, 2025
Merged

Add Conditions to ManifestHeaderApp#19124
madsrasmussen merged 1 commit intoumbraco:contribfrom
warrenbuckley:add-conditions-to-headerapps

Conversation

@warrenbuckley
Copy link
Contributor

@warrenbuckley warrenbuckley commented Apr 23, 2025

Prerequisites

  • I have added steps to test this contribution in the description below

Fixes: #18979

Description

Adds ManifestWithDynamicConditions to ManifestHeaderApp so Header Apps can be conditionally shown/loaded like other Manifest/Extension types.

Test Notes

  • Checkout PR
  • Verify it builds
  • Update or create a new Header App manifest
  • Verify Conditions can be added
  • Ensure conditions run and load/unload Header App as needed

Add a simple condition such as this to verify that should make a header app only show if in the Settings section

{
  ...
  "conditions": [
    {
      "alias": "Umb.Condition.SectionAlias",
      "match": "Umb.Section.Settings",
    },
  ]
}

Copilot AI review requested due to automatic review settings April 23, 2025 20:04
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 adds dynamic condition support to Header Apps by extending ManifestHeaderApp so that it can handle conditions similarly to other Manifest/Extension types.

  • Updated the ManifestHeaderApp interface to extend ManifestWithDynamicConditions with UmbExtensionConditionConfig.
  • Modified the import statement accordingly.
Comments suppressed due to low confidence (1)

src/Umbraco.Web.UI.Client/src/packages/core/extension-registry/extensions/header-app.extension.ts:7

  • UmbExtensionConditionConfig is used as a generic parameter but it is not imported. Please ensure that UmbExtensionConditionConfig is imported from its appropriate module to avoid compilation errors.
export interface ManifestHeaderApp extends ManifestElement, ManifestWithDynamicConditions<UmbExtensionConditionConfig> {

@madsrasmussen
Copy link
Member

Thanks @warrenbuckley, it makes sense, and works as expected!

@warrenbuckley
Copy link
Contributor Author

@madsrasmussen still shows as open PR here at my end ?! 😕🙃

@madsrasmussen madsrasmussen merged commit 1564313 into umbraco:contrib Apr 24, 2025
24 checks passed
madsrasmussen pushed a commit that referenced this pull request Apr 24, 2025
@madsrasmussen
Copy link
Member

@warrenbuckley I forgot to approve 🙈 All good now. I have cherry-picked to v16 to ensure it gets included. Thanks 👍

@warrenbuckley warrenbuckley deleted the add-conditions-to-headerapps branch April 24, 2025 10:57
madsrasmussen added a commit that referenced this pull request May 1, 2025
…#19201)

* Incorrect forum and security urls when raising issue (#19080)

* Add 'ManifestWithDynamicConditions' to ManifestHeaderApp so Header Apps can be conditionally shown/loaded (#19124)

* V15 QA Added acceptance tests for bulk trash dialog (#19125)

* Added tests for bulk trash content dialog

* Updated tests for trash content dialog

* Added tests for trash and bulk trash media dialog

* Moved trash content tests into a folder

* Bumped version

* Make trash tests run in the pipeline

* Make trash tests run in the pipeline

* Fixed comments

* Reverted npm command

* readme shield for forum

* Allow deselection of color picker property. (#19174)

* V15 Added acceptance tests for tiptap statusbar (#19131)

* Updated tests for tiptap RTE

* Moved tests for titptap toolbar to another class

* Added tests for titptap toolbar

* Added tests for tiptap statusbar

* Bumped version

* Make tiptap tests run in the pipeline

* Bumped version

* Reverted npm command

* build: restores some of the behavior from V13 in relation to StaticAssets (#19189)

In v13, the StaticAssets build was only triggered based on the existence of either the output folder or a preserve.* marker file. Here, we also additionally check for the node_modules/.package-lock.json file before reinstalling npm dependencies. We also now only run `npm install` rather than `npm ci` to optimise the build.

* filter search to only include element types

* V16 QA update failing nightly tests (#19190)

* Fixed tests

* More updates for tests

* Bumped version of testhelpers

* Fixed notifications in tests

* Last fixes

* Revert "Merge branch 'v16/dev' into v16/hotfix/filter-element-type-search-for-block-types"

This reverts commit 7b8b5c2, reversing
changes made to 6d4ddb7.

* disable not pickable search results

* correct use of pickable filter

---------

Co-authored-by: Lotte Pitcher <LottePitcher@users.noreply.github.com>
Co-authored-by: Warren Buckley <warren@hackmakedo.com>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Lotte Pitcher <github@lottepitcher.co.uk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
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.

Unable to set conditions for HeaderApp manifest

3 participants