Skip to content

Support configuring urlPropsIgnore via appdef app settings#1602

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/support-urlpropsignore-app-settings
Draft

Support configuring urlPropsIgnore via appdef app settings#1602
Copilot wants to merge 3 commits intomasterfrom
copilot/support-urlpropsignore-app-settings

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

urlPropsIgnore could only be set via viewer mount options (IAppProps.urlPropsIgnore), requiring HTML template modification. This adds support for configuring it via an app setting in the loaded Application Definition — the established pattern for avoiding template changes.

Changes

src/containers/app.tsx

  • Exported APP_SETTING_URL_PROPS_IGNORE = "urlPropsIgnore" constant for the app setting key
  • Exported getEffectiveUrlPropsIgnore(propIgnore, settingsValue) helper that merges the prop value with a comma-separated app settings value
  • Added useCustomAppSettings() call in App to subscribe to Redux app settings state
  • Mount effect: reads initial URL state using effective ignore list (prop + props.appSettings["urlPropsIgnore"])
  • URL update effect: applies effective ignore list (prop + Redux configuredAppSettings["urlPropsIgnore"]) to updateUrl() and getEffectiveUrlPropsIgnore is re-evaluated when appdef settings land in Redux state

test/containers/app.spec.ts (new)

  • Unit tests for getEffectiveUrlPropsIgnore covering merging, trimming, empty filtering, and undefined inputs

Usage

In an appdef ViewerSettings (no HTML template change needed):

<Setting name="urlPropsIgnore" value="x,y,scale" />

Appdef-provided values are merged with any urlPropsIgnore prop already specified at mount time, so the two approaches compose rather than conflict.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • storybook.js.org
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node /home/REDACTED/work/mapguide-react-layout/mapguide-react-layout/node_modules/.bin/storybook build -c .storybook (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Support setting urlPropsIgnore from app settings from loaded appdef</issue_title>
<issue_description>In addition to fixing #1465 we have now adopted the pattern of using app settings in an appdef as the proper replacement over viewer mount options as the latter requires a potentially-invasive viewer html template modification whereas the former does not.

So the urlPropsIgnore property should also be allowed to be init based on a specific app setting found in the loaded appdef</issue_description>

Comments on the Issue (you are @copilot in this section)

@jumpinjackie Pushing back milestone

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: jumpinjackie <563860+jumpinjackie@users.noreply.github.com>
Copilot AI changed the title [WIP] Support setting urlPropsIgnore from app settings Support configuring urlPropsIgnore via appdef app settings Mar 11, 2026
@jumpinjackie
Copy link
Owner

@copilot Integrate latest changes from master and revalidate your current work

Copy link
Contributor Author

Copilot AI commented Mar 13, 2026

@copilot Integrate latest changes from master and revalidate your current work

Done. Merged master into the branch (commit d58ad2a) — no conflicts in the changed files. All 656 tests pass (93 test files, including the 92 test files from master and the new test/containers/app.spec.ts added in this PR).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • storybook.js.org
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node /home/REDACTED/work/mapguide-react-layout/mapguide-react-layout/node_modules/.bin/storybook build -c .storybook (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@coveralls
Copy link

Coverage Status

coverage: 37.886% (+0.1%) from 37.763%
when pulling d58ad2a on copilot/support-urlpropsignore-app-settings
into 7cb3116 on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support setting urlPropsIgnore from app settings from loaded appdef

3 participants