Repository navigation
Map Editor in Portals - Part 2 - Add/Remove Map page in Portal Editor - #2894
Conversation
00abd6e to
617c68d
Compare
348a95f to
484f0c1
Compare
1682383 to
0ea1b54
Compare
d69b3e0 to
68507e8
Compare
DarianGill
left a comment
There was a problem hiding this comment.
This all looks like a solid foundation to me! I noted a few minor things below, but am not sure if you just intend to get to them in a future part, so am approving now so as to keep you unblocked.
I can confirm all 3027 tests pass locally for me and I was able to make a portal with a map page that I could rename. As I was making that portal, I expected the new map page to automatically open the rename input (as new freeform pages do). Is there a reason you chose not to implement that behavior? I think it'd be nice for consistency and because I doubt anyone wants their map to be "Untitled." 😁
Also, npm run format changes line 588 in XMLUtilities.spec.js.
- Allow adding and removing Cesium map pages in the portal editor - Serialize new visualization sections with required labels and type metadata - Add a skeleton PortEditorMapSectionView - Add model and editor tests plus Cesium section SVG Issue #1995
- Give Cesium visualization section its own map model - Add a skeleton MapEditorView to render map editor UI (independent from portals) - Render map layers list as initial test - Test map model creation and editor ownership Issue #1995
- PortalOption handles parsing, updating DOM, and validation - Add cData function to XML utils - Add corresponding unit tests Issue #1995
- In PortalModel, parse options using the new model and its methods - Add pathway to serialize mapConfig (though currently it just returns the incoming config unchanged) - Add tests Issue #1995
- Fix the map container class and remove extra markup - Add basic styles and clarify that maps are not yet editable Issue #1995
68507e8 to
9544f1c
Compare
- Catch invalid map JSON when loading the portal - Show an error when the map JSON is invalid - Prevent replacing the original config with an empty config when the map JSON is invalid Issue #1995
- When mapConfig JSON is invalid, show error on map editor section rather than preventing edits to the entire portal - Include tests for new error handling Issue #1995
- Use a single listener to handle both Freeform and map availability updates Issue #1995
- Autofocus the tab name field when adding a new map page - Don't assign the PortEditorSectionView class to PortEditorMapSectionView - Use BASE_CLASS constant for CSS class names in PortEditorMapSectionView - Format the XML Utilities test file Issue #1995
|
Made all your suggested changes @DarianGill ! Thanks for a very thoughtful review |
This PR adds support for adding, renaming, and removing Cesium map pages in the Portal Editor, along with the model and view setup needed for future map editing.
MapEditorViewthat lists the map's layersPortalOptionto parse, validate, and serialize portal<options>elements<option>. At this stage, it just returns the original unchanged map configuration (the same behaviour before this updated)Part of #1995