Skip to content

[WIP] Issue #6: Frontend Implementation#31

Open
justFadel19 wants to merge 1 commit intoAhmedFatthy1040:mainfrom
justFadel19:issue-6-frontend-implementation
Open

[WIP] Issue #6: Frontend Implementation#31
justFadel19 wants to merge 1 commit intoAhmedFatthy1040:mainfrom
justFadel19:issue-6-frontend-implementation

Conversation

@justFadel19
Copy link
Copy Markdown
Collaborator

[WIP] Issue #6: Frontend Implementation

This PR adds the initial implementation of the frontend for the Satellite Image Annotation Tool. It includes the image viewer, annotation tools, and supporting components.

Changes:

  • Added new components:
    • AnnotationCanvas
    • AnnotationList
    • AnnotationToolbar
    • AttributeEditor
    • FileManager
    • HomePage
    • ImageStatistics
    • ProjectEditor
    • RegionAttributes
    • RegionsList
    • Tooltip
  • Implemented basic image viewer in ImageViewer.tsx
  • Updated App, ImageGallery, ImageUpload, index.html, styles
  • Added models, utils, and updated API services
  • Added logo asset
  • Updated config and package files

This is a work in progress. Some features are incomplete and may have bugs.

Closes #6

Copy link
Copy Markdown

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.

Pull Request Overview

This work‐in‐progress PR introduces the initial frontend implementation for the Satellite Image Annotation Tool. Key changes include implementing new UI components (e.g. ImageViewer, ImageGallery, ImageUpload, ProjectEditor, HomePage), enhancing annotation and segmentation interfaces, and adding features like AI-assisted segmentation and a responsive header with scroll‐based visibility.

Reviewed Changes

Copilot reviewed 22 out of 26 changed files in this pull request and generated 3 comments.

File Description
web/src/models/Project.ts Added model interfaces for project, image metadata and attributes
web/src/components/* New components for toolbars, viewer, gallery, upload, editor, and home page with updated UI flows
web/src/App.tsx Updated main app structure with responsive header and conditional routing between homepage, gallery and image viewer
web/index.html Updated title and basic HTML to reflect the new tool branding
Files not reviewed (4)
  • web/package-lock.json: Language not supported
  • web/package.json: Language not supported
  • web/src/App.css: Language not supported
  • web/src/index.css: Language not supported

ref={fileInputRef}
onChange={handleFileChange}
className="hidden"
accept="image/*"
Copy link

Copilot AI May 1, 2025

Choose a reason for hiding this comment

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

Consider updating the input element's accept attribute to match the supported file types (e.g. "image/jpeg,image/png,image/tiff,image/webp") so that users are prevented from selecting unsupported file formats.

Suggested change
accept="image/*"
accept="image/jpeg,image/png,image/tiff,image/webp"

Copilot uses AI. Check for mistakes.
Comment thread web/src/App.tsx
// Initial check
handleScroll();

window.addEventListener('scroll', handleScroll);
Copy link

Copilot AI May 1, 2025

Choose a reason for hiding this comment

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

Consider extracting the scroll listener logic into a custom hook and/or debouncing the scroll events to improve performance and code organization.

Copilot uses AI. Check for mistakes.
Comment on lines +226 to +229
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4">
<div className="bg-white rounded-lg shadow-md max-w-md w-full p-6" onClick={e => e.stopPropagation()}>
<h3 className="text-lg font-medium text-gray-900 mb-4">Delete Image?</h3>
<p className="text-gray-600 mb-6">
Copy link

Copilot AI May 1, 2025

Choose a reason for hiding this comment

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

For the delete confirmation modal, consider adding appropriate ARIA roles and labels (e.g. role="dialog" and aria-modal="true") to improve accessibility.

Suggested change
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4">
<div className="bg-white rounded-lg shadow-md max-w-md w-full p-6" onClick={e => e.stopPropagation()}>
<h3 className="text-lg font-medium text-gray-900 mb-4">Delete Image?</h3>
<p className="text-gray-600 mb-6">
<div
className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4"
role="dialog"
aria-modal="true"
aria-labelledby="delete-modal-title"
aria-describedby="delete-modal-description"
>
<div className="bg-white rounded-lg shadow-md max-w-md w-full p-6" onClick={e => e.stopPropagation()}>
<h3 id="delete-modal-title" className="text-lg font-medium text-gray-900 mb-4">Delete Image?</h3>
<p id="delete-modal-description" className="text-gray-600 mb-6">

Copilot uses AI. Check for mistakes.
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.

[Feature] Create Image Visualization and Navigation in Frontend

2 participants