Skip de-arrayification if connecting to a MapGuide Open Source 4.0+ server#1649
Merged
Conversation
- Updated snapshot test description for clarity. - Introduced normalization functions to handle pre-de-arrayified app definitions. - Created a new utility function to canonicalize state for comparison. - Modified the test to dispatch and compare states from both legacy and clean app definitions. - Ensured that the redux state produced from both app definitions matches. - Adjusted mock expectations for site version and runtime map creation calls.
Contributor
Bundle Size Report ✅ PASS
Top Changes
Generated by build-size-diff Commit: 874073c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several important improvements to the handling of MapAgent API responses and UI widget processing, as well as updates to related test snapshots. The changes focus on supporting "clean" resource content for newer site versions, improving type detection for UI widgets, and ensuring better compatibility and consistency in the application's Redux state and UI conversion logic.
MapAgent API Enhancements:
ApplicationDefinitionresources when supported (MapGuide 4.0+), which simplifies resource parsing and improves future compatibility. [1] [2] [3]createRuntimeMap_v4anddescribeRuntimeMap_v4to use the clean API and extract the relevant JSON payload, ensuring more reliable and predictable data structures. [1] [2]UI Widget Handling Improvements:
isUIWidgettype guard to recognize widgets using either theWidgetTypeproperty or the@xsi:typeproperty, increasing compatibility with various widget definitions.Test and Redux State Updates:
undefinedproperties, and normalization of flyout and toolbar IDs for consistency between legacy and clean app definitions. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]These changes improve maintainability, compatibility with future MapGuide versions, and the reliability of UI and state initialization logic.
Fixes #217