feat: replace with new vue based style editor#13
feat: replace with new vue based style editor#13spectrachrome wants to merge 11 commits intomainfrom
Conversation
|
|
Hello @spectrachrome , thank you for the pull request and the updates! I am experimenting a bit and try to see what things pop up, i will list the things that i saw here:
Apart from that some potential enhancements:
|
**Fixed:** - GeoTIFF layers now load correctly when added via URL input - GeoTIFF layers now load correctly when auto-loaded from URL parameters - Source structure now uses sources array instead of direct url property **Changed:** - Updated loadUrlData() to use GeoTIFF sources array format - Updated autoSelectFromURL() to use GeoTIFF sources array format
|
Issues regarding the problematic URL loading have been fixed, you should now be able to edit GeoJSON and GeoTIFF properly when they are loaded from URL. |
|
Great! Thanks for the fixes! So i tested loading a geojson and then adding a tooltip and that all worked! If i try to add a jsonform the layercontrol is not updated though, for example adding following. Also while i was trying to type this it kept on autocollapsing all jsonform objects, so i needed to open, very quickly type and hope it would not collapse again on its own, can we completely disable the autocollapsing? |
**Fixed:** - Race condition where debounced style updates overwrote user input - Cursor jumping to end when editing invalid JSON (e.g., typing ".2") - External style changes interrupting active editing sessions - View position not preserved during external updates **Added:** - Focus check that gives user editing absolute priority - Debounce cancellation when JSON becomes invalid - Scroll position preservation during external updates - Editor toolbar with filled background (theme-aware) - Manual "Fold" button for code folding control **Removed:** - Auto-folding behavior when expanding sections (collapseAllExcept) - changeFold event listener and handleFoldChange function **Changed:** - Simplified fold button to clear and re-apply default folding - Improved watcher structure with early returns for better performance
**Added:** - Format button with JSON formatting functionality - Preserves cursor and scroll position during formatting - Re-applies default folds after formatting **Removed:** - EditorToolbar.vue component (functionality moved to CodeEditor) **Fixed:** - Disabled ACE editor smart behaviors that auto-format spacing - Prevents automatic removal of spaces around punctuation **Changed:** - Toolbar now uses space-around layout for better button distribution - Toolbar uses class instead of id selector - Buttons use BeerCSS "small" class for consistent styling
… updates **Fixed:** - Code editor no longer auto-collapses JSON sections when layer control updates variables - Layer control now updates instantly when style changes occur in the editor - Layer control preserves form state during variable-only updates **Changed:** - Layer control only recreates component when jsonform schema changes, not for variable updates - Added v-if visibility toggle mechanism for efficient layer control recreation - Implemented state tracking to distinguish between schema and variable changes - Removed initializeDefaultFolds() call from external update handler in code editor **Added:** - previousStyleState tracking in LayerControl to detect change types - Automatic map reference storage and reconnection for layer control - requestUpdate() call for variable-only changes to refresh without destroying component
Note: The Africa GeoJSON example does work, just not here in this PR because of the differing root (
/eodash-style-editor/pr-preview/pr-13/). As soon as the pull request is merged, the root defined in the software (/eodash-style-editor/) will be correct again and the example will load successfully.The large size of the pull request is due to the GeoJSON example, actual code is ~4.5KLoC, about 20 kilo-lines of data.