Skip to content

Conversation

@pollardld
Copy link
Member

Portal Sync - Merge 2025

This pull request includes several updates to the visualize application, focusing on database migrations, JavaScript functions for managing bookmarks and layers, and adding new functionalities to the map and theme models. The most important changes include altering database fields for bookmarks and user layers, updating URL shortening logic, and adding new event listeners for layer and theme interactions.

Database Migrations:

  • Added migration to alter fields in bookmark and userlayer models to improve handling of content types, sharing groups, and user relationships. (visualize/migrations/0012_alter_bookmark_content_type_and_more.py)
  • Created a merge migration to resolve dependencies between different migration branches. (visualize/migrations/0013_merge_20240411_2135.py)

JavaScript Updates:

  • Updated bookmarksModel to handle URL shortening more robustly, including CSRF token integration and error handling. (visualize/static/js/bookmarks.js) [1] [2]
  • Enhanced layerModel to include new properties, improve visibility logic, and add event dispatching for layer activation and deactivation. (visualize/static/js/models.js) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
  • Added new functions and event listeners to handle interactions with React components, such as toggling themes and layers. (visualize/static/js/models.js) [1] [2] [3] [4]

Map Enhancements:

  • Modified addLayerToMap function to support new layer types, including slider. (visualize/static/js/map.js)

These changes collectively enhance the functionality and maintainability of the visualize application, ensuring better data management and user interaction handling.

bwithchewoo and others added 30 commits April 18, 2024 14:36
bwithchewoo and others added 24 commits August 26, 2024 08:14
@pollardld pollardld requested a review from Copilot April 10, 2025 00:20
@pollardld pollardld self-assigned this Apr 10, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 11 out of 15 changed files in this pull request and generated 1 comment.

Files not reviewed (4)
  • visualize/templates/visualize/bookmark-modals.html: Language not supported
  • visualize/templates/visualize/embedded.html: Language not supported
  • visualize/templates/visualize/modals.html: Language not supported
  • visualize/templates/visualize/planner.html: Language not supported

Remove debugger statement

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Member Author

@pollardld pollardld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

return true;
}
return false;
// if (!self.isVisibleAtZoom() || self.isLocked()) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no longer needed, please delete commented out code

// example use: saveStateMode will be false when a user is viewing a bookmark
app.saveStateMode = true;

window.app = app;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am curious to learn the reason for assigning app to window.

@pollardld pollardld merged commit 10127a2 into main Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants