Skip to content

:chore: ITEP-66905 - UI components cleanup [PART 2] #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jpggvilaca
Copy link
Contributor

📝 Description

  • Remove dead code
  • Replace 3dotsflashing custom implementation with framer-motion implementation
  • Replace spectrum subpackages import by importing the parent (meta) package
  • Move circular-progress component to dataset-import folder
  • Delete screenfull package

✨ Type of Change

Select the type of change your PR introduces:

  • 🐞 Bug fix – Non-breaking change which fixes an issue
  • 🚀 New feature – Non-breaking change which adds functionality
  • 🔨 Refactor – Non-breaking change which refactors the code base
  • 💥 Breaking change – Changes that break existing functionality
  • 📚 Documentation update
  • 🔒 Security update
  • 🧪 Tests

🧪 Testing Scenarios

Describe how the changes were tested and how reviewers can test them too:

  • ✅ Tested manually
  • 🤖 Run automated end-to-end tests

✅ Checklist

Before submitting the PR, ensure the following:

  • 🔍 PR title is clear and descriptive
  • 📝 For internal contributors: If applicable, include the JIRA ticket number (e.g., ITEP-123456) in the PR title. Do not include full URLs
  • 💬 I have commented my code, especially in hard-to-understand areas
  • 📄 I have made corresponding changes to the documentation
  • ✅ I have added tests that prove my fix is effective or my feature works

Copy link

@Copilot 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

A refactor PR targeting UI component cleanup and import consolidations in the annotator and analytics sections.

  • Consolidated and unified import statements across multiple components
  • Adjusted export settings for an interface and a component
  • Removed dead code and updated package imports to use meta packages

Reviewed Changes

Copilot reviewed 78 out of 80 changed files in this pull request and generated no comments.

Show a summary per file
File Description
web_ui/src/pages/annotator/tools/ssim-tool/secondary-toolbar.component.tsx Combined import statements from separate packages
web_ui/src/pages/annotator/tools/rotated-bounding-box-tool/secondary-toolbar.component.tsx Combined import statements from separate packages
web_ui/src/pages/annotator/tools/polygon-tool/secondary-toolbar.component.tsx Combined import statements from separate packages
web_ui/src/pages/annotator/tools/polygon-tool/polygon-tool.interface.ts Removed export from an interface
web_ui/src/pages/annotator/tools/keypoint-tool/secondary-toolbar.component.tsx Combined import statements from separate packages
web_ui/src/pages/annotator/tools/grabcut-tool/secondary-toolbar.component.tsx Combined import statements from separate packages
web_ui/src/pages/annotator/tools/explanation-tool/select-model.component.tsx Changed export declaration to a local const
web_ui/src/pages/annotator/tools/circle-tool/secondary-toolbar.component.tsx Combined import statements from separate packages
web_ui/src/pages/annotator/tools/bounding-box/secondary-toolbar.component.tsx Combined import statements from separate packages
web_ui/src/pages/annotator/components/video-player/propagate-annotations/propagate-annotations-dialog.component.tsx Updated import for Heading to use meta package
web_ui/src/pages/annotator/components/sidebar/annotations/annotations-header.component.tsx Combined import statements from separate packages
web_ui/src/pages/annotator/components/secondary-toolbar/replace-or-merge-user-annotations-dialog.component.tsx Updated import for Heading to use meta package
web_ui/src/pages/annotator/components/primary-toolbar/primary-toolbar.component.tsx Consolidated Provider and View imports from meta package
web_ui/src/pages/annotator/components/labels/selectable-label-tag/selectable-label-tag.component.tsx Updated import for View to use meta package
web_ui/src/pages/annotator/components/labels/label-search/label-result-panel.component.tsx Consolidated import statements from separate packages
web_ui/src/pages/annotator/components/footer/annotator-footer.component.tsx Consolidated import statements from separate packages
web_ui/src/pages/annotator/annotation/annotation-filter/corner-indicator.component.tsx Updated import for View to use meta package
web_ui/src/pages/analytics/analytics-dashboard-card.component.tsx Updated import for Heading to use meta package and consolidated imports
Files not reviewed (2)
  • web_ui/package-lock.json: Language not supported
  • web_ui/package.json: Language not supported
Comments suppressed due to low confidence (2)

web_ui/src/pages/annotator/tools/polygon-tool/polygon-tool.interface.ts:11

  • Removing the 'export' keyword restricts the interface's visibility; please verify that this change is intentional and won't affect external usage if the interface was meant to be shared.
-export interface IntelligentScissorsInstance {

web_ui/src/pages/annotator/tools/explanation-tool/select-model.component.tsx:28

  • Changing the component from an exported function to a locally defined constant may impact its external availability; confirm that this change is deliberate.
-export const SelectInferenceModelPicker = (props: Omit<ComponentProps<typeof Picker>, 'children'>) => {

@@ -5,8 +5,7 @@ import { Dispatch, FC, ReactNode, SVGProps } from 'react';

import { Divider, Flex, IllustratedMessage, View } from '@adobe/react-spectrum';
import { useMediaQuery } from '@react-spectrum/utils';
import { DimensionValue } from '@react-types/shared/src/dna';
import { Responsive } from '@react-types/shared/src/style';
import { DimensionValue, Responsive } from '@react-types/shared';
Copy link
Contributor

Choose a reason for hiding this comment

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

Based on loading-overlay.component.tsx I can see that DimensionValue is also available in the @adobe/react-spectrum. Could you update this as well?

@dwesolow dwesolow force-pushed the jvilaca/ITEP-66905-ui-components-cleanup-2 branch from 49bda51 to e48f1ef Compare May 16, 2025 08:52
@@ -67,7 +67,6 @@
"react-webcam": "^7.2.0",
"react-zoom-pan-pinch": "^3.7.0",
"recharts": "^2.15.1",
"screenfull": "^6.0.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

What was it for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good Q, i have no idea.

Copy link
Contributor

Choose a reason for hiding this comment

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

It was used fot learning videos that got removed some time ago.

checkMarkColor?: ColorValue | string;
}

export const CircularProgress = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't it need tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants