Skip to content

feat(manager): Remove deprecated toolbar filter ids in SettingsGrid - #16976

Open
Ibochkarev wants to merge 1 commit into
modxcms:3.xfrom
Ibochkarev:fix/16972-remove-deprecated-filter-ids
Open

feat(manager): Remove deprecated toolbar filter ids in SettingsGrid#16976
Ibochkarev wants to merge 1 commit into
modxcms:3.xfrom
Ibochkarev:fix/16972-remove-deprecated-filter-ids

Conversation

@Ibochkarev

Copy link
Copy Markdown
Collaborator

What changed and why

The namespace and area filter combos in MODx.grid.SettingsGrid used global Ext ids (modx-filter-namespace, modx-filter-area). Two settings grids on the same page collide on those ids. The source already flagged this for removal in 3.1:

@deprecated use of id config property deprecated in 3.0, to be removed in 3.1

This PR drops the id config from both combos and renames itemId filter-ns to filter-namespace, matching the naming already used in the lexicon and user group namespace grids. MODx.window.CreateSetting now reads filter values through getFilterComponent() instead of getTopToolbar().getComponent(...), so the lookup goes through the same helper the rest of the codebase already uses.

How to test

Open System Settings, a Context settings tab, and a User/User Group ACL settings grid. Namespace, area, and query filters should work, Clear Filters should reset them, and the Create Setting window should prefill namespace/area from the active grid filters.

Related issue(s)/PR(s)

Resolves #16972

Compatibility notes

Manager-only change, no platform or environment dependency. Anything relying on the removed global ids (modx-filter-namespace, modx-filter-area) via Ext.getCmp would break, but a repo-wide search found no such references.

Breaking change assessment

No public API or return type changes. itemId values are internal to the grid's toolbar and were already accessed through getComponent()/getFilterComponent() rather than exposed as public contract, so this is safe for 3.x consumers.

Test coverage

No automated tests added; this is a JS/ExtJS UI change with no existing test harness for grid toolbars. Verified manually per the steps above.

Contributors

@Ibochkarev

AI tool use

Cursor AI helped implement the rename and the getFilterComponent() refactor, and drafted this PR description.

Drop the global Ext id config on the namespace/area filter combos and
rename itemId 'filter-ns' to 'filter-namespace', matching the 3.1
removal noted in the deprecated JSDoc and the convention already used
by other grids (lexicon, user group namespace).

Reuse the existing getFilterComponent helper in
MODx.window.CreateSetting instead of duplicating
getTopToolbar().getComponent(...) lookups.

Refs modxcms#16972
@Ibochkarev
Ibochkarev marked this pull request as ready for review July 23, 2026 07:20
@Ibochkarev Ibochkarev added the requires build Grunt build is required for integration label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires build Grunt build is required for integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Remove deprecated toolbar filter ids in MODx.grid.SettingsGrid (3.1)

1 participant