Skip to content

Version 2.2

Choose a tag to compare

@pollardld pollardld released this 15 Nov 20:42
· 33 commits to main since this release
cfeff39

Closes: Shapefile Exports.

What's Changed

This Release includes various changes to the landmapper project, mainly focusing on CSS updates, JavaScript improvements, template modifications, and the addition of new tests. The most important changes include enhancements to the export layer functionality, CSS updates for better styling, and new tests for exporting shapefiles.

Export Layer Functionality:

  • landmapper/app/js/report.js: Added functionality to disable the export button during the export process and re-enable it afterward to prevent multiple clicks. [1] [2]
  • landmapper/app/urls.py: Changed the URL parameter from property_id to property_pk for the export layer endpoint.
  • landmapper/app/views.py: Updated the export_layer function to use the primary key (property_pk) and added input sanitization for filenames. [1] [2]

CSS Updates:

  • landmapper/app/static/landmapper/css/base.css: Added RGB variables for primary colors and adjusted the margin for horizontal rules. [1] [2]
  • landmapper/app/static/landmapper/css/or.css and landmapper/app/static/landmapper/css/wa.css: Added RGB variables for primary colors for OR and WA themes. [1] [2]
  • landmapper/app/static/landmapper/css/report.css: Added styles for disabled buttons, anchor links, and action buttons. [1] [2] [3] [4]

Template Modifications:

  • landmapper/app/templates/landmapper/report/report-overview.html: Enhanced the export layer button logic and added new sections for downloading and sharing reports. [1] [2]
  • landmapper/app/templates/landmapper/report/report-share.html: Updated the share button to use the new action button styles and added accessibility attributes.

New Tests:

  • landmapper/app/tests/test_exportshp.py: Added comprehensive tests for the export layer functionality, including success, property not found, export error, unauthenticated user, and cleanup scenarios.

Full Changelog: v2.1...v2.2