add CSV export format and UI enhancements #45
Merged
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 a comprehensive export feature for annotations in the SAT Annotator web application. The changes include adding an export modal with options for scope and format, implementing functionality for exporting annotations in both JSON and CSV formats, and updating the UI and styles to accommodate the new modal.
New Export Modal and Functionality
web/index.html: Added a new export modal with options for selecting export scope (current image or all images) and export format (JSON or CSV). Updated the export button text from "Export JSON" to "Export" for clarity. [1] [2]web/js/annotations.js: Implemented the logic for handling export modal events, dynamically updating options, and exporting annotations in the selected format and scope. Added methods for exporting annotations in CSV format and updated existing JSON export methods to support the new modal workflow. [1] [2] [3] [4]Enhancements to Export Formats
web/js/annotations.js: Added support for exporting annotations in CSV format. Included metadata in the CSV file and ensured compatibility with both single-image and multi-image exports. Updated toast notifications to reflect the selected format. [1] [2] [3]UI and Accessibility Improvements
web/styles.css: Updated modal styles to improve layout and responsiveness, including adjustments to modal dimensions, padding, and scroll behavior. Added focus handling for accessibility. [1] [2] [3] [4] [5]These changes collectively enhance the user experience by providing flexible and accessible options for exporting annotation data in a structured and user-friendly manner.