FrancescoCastaldi commented on PR #45038: URL: https://github.com/apache/superset/pull/45038#issuecomment-6058329378
Hi @sadpandajoe, Addressed both scope remapping gaps in commits `d7e799a54f` and `2813150228`: 1. `scope.selectedLayers` remapping: Updated `_remap_filter_scope` in `superset/daos/dashboard.py` to inspect `scope.selectedLayers`. Handled both standard frontend list format (`string[]`) and dictionary configurations. Keys matching `chart-<old_id>-layer-<idx>` have their chart ID segment remapped using `old_to_new_slice_ids` while preserving the layer suffix. Unmapped or unrecognized keys remain untouched. 2. `chart_customization_config` remapping: In `_remap_filter_scopes`, `metadata["chart_customization_config"]` entries are now passed through `_remap_filter_scope` alongside native filter configurations and global cross-filter scopes, ensuring chart exclusions and target references point to the duplicated chart copies. Added divider detection for `CHART_CUSTOMIZATION_DIVIDER`. 3. Single-pass remapping: Consolidated scope remapping strictly through `set_dash_metadata` to prevent double remapping on overlapping chart IDs. Added regression unit tests in `tests/unit_tests/dao/dashboard_test.py` covering `selectedLayers` list and dict remapping, helper edge cases, and `chart_customization_config` scope remapping during dashboard duplication. All 19 unit tests and Astral Ruff pass cleanly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
