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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,807 changes: 66 additions & 3,741 deletions web_ui/package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion web_ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.

"spin-delay": "^2.0.1",
"static-path": "^0.0.4",
"svg2pdf.js": "^2.5.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { View, ViewProps } from '@react-spectrum/view';
import { View, ViewProps } from '@adobe/react-spectrum';
import { StyleProps } from '@react-types/shared';

export interface ColorThumbProps extends StyleProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { DimensionValue, Flex, ProgressCircle } from '@adobe/react-spectrum';
import { SpectrumProgressCircleProps } from '@react-types/progress';
import { Responsive } from '@react-types/shared/src/style';
import { Responsive } from '@react-types/shared';

interface LoadingIndicatorProps extends SpectrumProgressCircleProps {
height?: Responsive<DimensionValue>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Divider, Flex, Text, View } from '@adobe/react-spectrum';
import { Divider, Flex, Heading, Text, View } from '@adobe/react-spectrum';
import { Button } from '@geti/ui';
import { Heading } from '@react-spectrum/text';
import { motion } from 'framer-motion';

import { AnalyticsIcon, ExternalLinkIcon } from '../../assets/icons';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { View } from '@react-spectrum/view';
import { View } from '@adobe/react-spectrum';

interface CornerIndicatorProps {
isActive: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Flex } from '@adobe/react-spectrum';
import { FooterProps, Footer as FooterView, View } from '@react-spectrum/view';
import { Flex, FooterProps, Footer as FooterView, View } from '@adobe/react-spectrum';
import clsx from 'clsx';

import { MediaItem } from '../../../../core/media/media.interface';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Flex, Text } from '@adobe/react-spectrum';
import { View } from '@react-spectrum/view';
import { Flex, Text, View } from '@adobe/react-spectrum';
import { isEmpty } from 'lodash-es';

import { LabelTreeItem } from '../../../../../core/labels/label-tree-view.interface';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { View } from '@react-spectrum/view';
import { View } from '@adobe/react-spectrum';
import { usePress } from 'react-aria';

import { Label } from '../../../../../core/labels/label.interface';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Provider } from '@adobe/react-spectrum';
import { Provider, View } from '@adobe/react-spectrum';
import { Flex } from '@react-spectrum/layout';
import { View } from '@react-spectrum/view';
import { partition } from 'lodash-es';

import { Divider } from '../../../../shared/components/divider/divider.component';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { ButtonGroup, Content, Dialog, Divider, Text } from '@adobe/react-spectrum';
import { ButtonGroup, Content, Dialog, Divider, Heading, Text } from '@adobe/react-spectrum';
import { Button } from '@geti/ui';
import { Heading } from '@react-spectrum/text';

import { usePrediction } from '../../providers/prediction-provider/prediction-provider.component';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Flex } from '@adobe/react-spectrum';
import { Heading } from '@react-spectrum/text';
import { Flex, Heading } from '@adobe/react-spectrum';
import { isEmpty, isNil } from 'lodash-es';

import { DOMAIN } from '../../../../../core/projects/core.interface';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { ButtonGroup, Content, Dialog, Divider, Text } from '@adobe/react-spectrum';
import { ButtonGroup, Content, Dialog, Divider, Heading, Text } from '@adobe/react-spectrum';
import { Button } from '@geti/ui';
import { Heading } from '@react-spectrum/text';
import { UseMutationResult } from '@tanstack/react-query';

interface PropagateAnnotationsDialogProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Flex } from '@adobe/react-spectrum';
import { Text } from '@react-spectrum/text';
import { Flex, Text } from '@adobe/react-spectrum';

export const SecondaryToolbar = (): JSX.Element => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Flex } from '@adobe/react-spectrum';
import { Flex, Text } from '@adobe/react-spectrum';
import { Slider } from '@geti/ui';
import { Text } from '@react-spectrum/text';

import { Divider } from '../../../../shared/components/divider/divider.component';
import { ToolType } from '../../core/annotation-tool-context.interface';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const useCanSelectDifferentInferenceModel = () => {
return true;
};

export const SelectInferenceModelPicker = (props: Omit<ComponentProps<typeof Picker>, 'children'>) => {
const SelectInferenceModelPicker = (props: Omit<ComponentProps<typeof Picker>, 'children'>) => {
const [selectedModel, setSelectedModel] = useSelectedInferenceModel();

const { useProjectModelsQuery } = useModels();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Flex, Tooltip, TooltipTrigger } from '@adobe/react-spectrum';
import { Text } from '@react-spectrum/text';
import { Flex, Text, Tooltip, TooltipTrigger } from '@adobe/react-spectrum';

import { Combine, New, Subtract } from '../../../../assets/icons';
import { Label } from '../../../../core/labels/label.interface';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Flex, Tooltip, TooltipTrigger } from '@adobe/react-spectrum';
import { Text } from '@react-spectrum/text';
import { Flex, Text, Tooltip, TooltipTrigger } from '@adobe/react-spectrum';

import { Delete, LineMappingLight, Reject } from '../../../../assets/icons';
import { isKeypointAnnotation } from '../../../../core/annotations/services/utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { WebWorker } from '../../../../webworkers/web-worker.interface';
import { Hotkeys } from '../../providers/annotator-provider/utils';
import { PolygonMode } from './polygon-tool.enum';

export interface IntelligentScissorsInstance {
interface IntelligentScissorsInstance {
new (imageData: ImageData): IntelligentScissorsMethods;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Flex, Tooltip, TooltipTrigger } from '@adobe/react-spectrum';
import { Flex, Text, Tooltip, TooltipTrigger } from '@adobe/react-spectrum';
import { Switch } from '@geti/ui';
import { Text } from '@react-spectrum/text';

import { Divider } from '../../../../shared/components/divider/divider.component';
import { useDrawingToolsKeyboardShortcut } from '../../../annotator/hot-keys/use-drawing-tools-keyboard-shortcut/use-drawing-tools-keyboard-shortcut';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Flex } from '@adobe/react-spectrum';
import { Text } from '@react-spectrum/text';
import { Flex, Text } from '@adobe/react-spectrum';

export const SecondaryToolbar = (): JSX.Element => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Flex } from '@adobe/react-spectrum';
import { Flex, Text } from '@adobe/react-spectrum';
import { Switch } from '@geti/ui';
import { Text } from '@react-spectrum/text';
import { useMediaQuery } from '@react-spectrum/utils';
import { isEmpty } from 'lodash-es';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

import { Key } from 'react';

import { Item, Picker, Section } from '@adobe/react-spectrum';
import { Text } from '@react-spectrum/text';
import { Item, Picker, Section, Text } from '@adobe/react-spectrum';

import { LabelTag } from '../../components/labels/label-tag/label-tag.component';
import { WatershedLabel } from './watershed-tool.interface';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

import { Key, useEffect } from 'react';

import { Flex } from '@adobe/react-spectrum';
import { Text } from '@react-spectrum/text';
import { Flex, Text } from '@adobe/react-spectrum';
import { useMediaQuery } from '@react-spectrum/utils';
import { isEmpty } from 'lodash-es';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

import { View } from '@adobe/react-spectrum';
import { ActionButton } from '@geti/ui';
import { BorderRadiusValue } from '@react-types/shared/src/dna';
import { Responsive } from '@react-types/shared/src/style';
import { BorderRadiusValue, Responsive } from '@react-types/shared';

interface ChangeColorButtonProps {
size: 'S' | 'L';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@

import { useEffect } from 'react';

import { Flex, Radio, RadioGroup, Text } from '@adobe/react-spectrum';
import { Heading } from '@react-spectrum/text';
import { Flex, Heading, Radio, RadioGroup, Text, View } from '@adobe/react-spectrum';
import { useMediaQuery } from '@react-spectrum/utils';
import { View } from '@react-spectrum/view';
import { isEqual } from 'lodash-es';

import { DOMAIN } from '../../../../core/projects/core.interface';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@

import { CSSProperties, FC, useState } from 'react';

import { ButtonGroup, Content, Dialog, DialogContainer, Divider, Flex, Text } from '@adobe/react-spectrum';
import {
ButtonGroup,
Content,
Dialog,
DialogContainer,
Divider,
Flex,
Heading,
Text,
View,
} from '@adobe/react-spectrum';
import { Button } from '@geti/ui';
import { Heading } from '@react-spectrum/text';
import { dimensionValue, useMediaQuery } from '@react-spectrum/utils';
import { View } from '@react-spectrum/view';
import { OverlayTriggerState } from '@react-stately/overlays';
import { isEmpty } from 'lodash-es';
import { useNavigate } from 'react-router-dom';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Content } from '@adobe/react-spectrum';
import { Content, Heading } from '@adobe/react-spectrum';
import { Button } from '@geti/ui';
import { Heading } from '@react-spectrum/text';

import { NotFound } from '../../../assets/images';
import { redirectTo } from '../../../shared/utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Flex, Heading, Image, Text } from '@adobe/react-spectrum';
import { View } from '@react-spectrum/view';
import { Flex, Heading, Image, Text, View } from '@adobe/react-spectrum';
import { OverlayTriggerState } from '@react-stately/overlays';

import NoProjectsPlaceholder from '../../../../../assets/images/no-projects-placeholder.webp';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import { useEffect, useState } from 'react';

import { DatePicker } from '@geti/ui';
import { View } from '@adobe/react-spectrum';
import { DateValue, getLocalTimeZone, parseAbsolute, parseDateTime, today } from '@internationalized/date';
import { View } from '@react-spectrum/view';

import { SearchRuleValue } from '../../../../core/media/media-filter.interface';
import { formatLocalToUtc, isDateBetween } from '../../../../shared/utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

import { Dispatch, Key, SetStateAction } from 'react';

import { Flex, Item, Picker, Text, Tooltip, TooltipTrigger, View } from '@adobe/react-spectrum';
import { Heading } from '@react-spectrum/text';
import { Flex, Heading, Item, Picker, Text, Tooltip, TooltipTrigger, View } from '@adobe/react-spectrum';
import { capitalize, isEmpty } from 'lodash-es';

import { PressableElement } from '../../../../../../shared/components/pressable-element/pressable-element.component';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Flex } from '@adobe/react-spectrum';
import { Text } from '@react-spectrum/text';
import { Flex, Text } from '@adobe/react-spectrum';
import CountUp from 'react-countup';

import { CardContent } from '../../../../../shared/components/card-content/card-content.component';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

import { Dispatch, Key, SetStateAction } from 'react';

import { Item, Picker } from '@adobe/react-spectrum';
import { Text } from '@react-spectrum/text';
import { Item, Picker, Text } from '@adobe/react-spectrum';
import { StyleProps } from '@react-types/shared';

import { idMatchingFormat } from '../../../../../test-utils/id-utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

import { Key, useRef, useState } from 'react';

import { Flex, Tooltip, TooltipTrigger } from '@adobe/react-spectrum';
import { Flex, Tooltip, TooltipTrigger, View } from '@adobe/react-spectrum';
import { Checkbox } from '@geti/ui';
import { View } from '@react-spectrum/view';

import { MediaItem } from '../../../../core/media/media.interface';
import { MediaItemView } from '../../../../shared/components/media-item-view/media-item-view.component';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

import { ComponentProps } from 'react';

import { DimensionValue, Flex, ProgressCircle } from '@adobe/react-spectrum';
import { View } from '@react-spectrum/view';
import { DimensionValue, Flex, ProgressCircle, View } from '@adobe/react-spectrum';
import { BackgroundColorValue, BoxAlignmentStyleProps, Responsive, StyleProps } from '@react-types/shared';

interface LoadingOverlayProps extends StyleProps, BoxAlignmentStyleProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?

import NotFound from '@spectrum-icons/illustrations/NotFound';
import { isEmpty } from 'lodash-es';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Flex } from '@adobe/react-spectrum';
import { Text } from '@react-spectrum/text';
import { Flex, Text } from '@adobe/react-spectrum';

import { MEDIA_TYPE } from '../../../../../core/media/base-media.interface';
import { useUsers } from '../../../../../core/users/hook/use-users.hook';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useMemo } from 'react';

import { DialogTrigger, Flex, Link, ProgressCircle, Text, Tooltip, TooltipTrigger, View } from '@adobe/react-spectrum';
import { ActionButton } from '@geti/ui';
import { IconColorValue } from '@react-types/shared/src/dna';
import { IconColorValue } from '@react-types/shared';
import AlertCircle from '@spectrum-icons/workflow/AlertCircle';

import { AcceptCircle, Alert, Image, Play, Refresh } from '../../../../../../assets/icons';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (C) 2022-2025 Intel Corporation
// LIMITED EDGE SOFTWARE DISTRIBUTION LICENSE

import { Content, Dialog, Divider, Heading, View } from '@adobe/react-spectrum';
import { Text } from '@react-spectrum/text';
import { Content, Dialog, Divider, Heading, Text, View } from '@adobe/react-spectrum';

import { ErrorListItem } from '../../../../../../providers/media-upload-provider/media-upload.interface';

Expand Down
Loading
Loading