Skip to content

Commit b3d2733

Browse files
committed
Fix most playwright tests
1 parent 1eb0ce3 commit b3d2733

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

web_ui/packages/smart-tools/src/edit-bounding-box/edit-bounding-box/edit-bounding-box.component.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export const EditBoundingBox = ({
3131
}: EditBoundingBoxProps): JSX.Element => {
3232
const [shape, setShape] = useState(annotation.shape);
3333

34+
const ariaLabel = `${annotation.isSelected ? 'Selected' : 'Not selected'} shape ${annotation.id}`;
35+
3436
useEffect(() => setShape(annotation.shape), [annotation.shape]);
3537

3638
const onComplete = () => {
@@ -66,20 +68,23 @@ export const EditBoundingBox = ({
6668
translateShape={translate}
6769
onComplete={onComplete}
6870
>
69-
<g id={`canvas-annotation-${annotation.id}`}>
71+
<g
72+
id={`canvas-annotation-${annotation.id}`}
73+
fill={annotation.color || '#0095ca'}
74+
fillOpacity='var(--annotation-fill-opacity, 0.2)'
75+
stroke={annotation.color || '#0095ca'}
76+
strokeWidth={2 / zoom}
77+
strokeOpacity='var(--annotation-border-opacity, 0.8)'
78+
strokeLinecap='round'
79+
strokeDasharray='0'
80+
strokeDashoffset='0'
81+
>
7082
<rect
7183
x={shape.x}
7284
y={shape.y}
7385
width={shape.width}
7486
height={shape.height}
75-
fill={annotation.color || 'var(--intel-blue, #0068b5)'}
76-
fillOpacity='var(--annotation-fill-opacity, 0.2)'
77-
stroke={annotation.color || 'var(--intel-blue, #0068b5)'}
78-
strokeWidth={2 / zoom}
79-
strokeOpacity='var(--annotation-border-opacity, 0.8)'
80-
strokeLinecap='round'
81-
strokeDasharray='0'
82-
strokeDashoffset='0'
87+
aria-label={ariaLabel}
8388
/>
8489
</g>
8590
</TranslateShape>

web_ui/src/pages/annotator/tools/edit-tool/edit-circle/edit-circle.component.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { Annotation as AnnotationType, RegionOfInterest } from '../../../../../c
1111
import { Point } from '../../../../../core/annotations/shapes.interface';
1212
import { ShapeType } from '../../../../../core/annotations/shapetype.enum';
1313
import { Annotation } from '../../../annotation/annotation.component';
14-
import { Labels } from '../../../annotation/labels/labels.component';
1514
import { AnnotationToolContext } from '../../../core/annotation-tool-context.interface';
1615
import { useROI } from '../../../providers/region-of-interest-provider/region-of-interest-provider.component';
1716
import { useZoom } from '../../../zoom/zoom-provider.component';
@@ -135,8 +134,6 @@ export const EditCircle = ({
135134
/>
136135
</svg>
137136

138-
<Labels annotation={{ ...annotation, shape }} />
139-
140137
{disablePoints === false ? (
141138
<svg
142139
id={`edit-circle-points-${annotation.id}`}

web_ui/src/pages/annotator/tools/edit-tool/edit-polygon/edit-polygon.component.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { Annotation as AnnotationType } from '../../../../../core/annotations/an
88
import { Polygon } from '../../../../../core/annotations/shapes.interface';
99
import { ShapeType } from '../../../../../core/annotations/shapetype.enum';
1010
import { Annotation } from '../../../annotation/annotation.component';
11-
import { Labels } from '../../../annotation/labels/labels.component';
1211
import { AnnotationScene } from '../../../core/annotation-scene.interface';
1312
import { AnnotationToolContext, ToolType } from '../../../core/annotation-tool-context.interface';
1413
import { useROI } from '../../../providers/region-of-interest-provider/region-of-interest-provider.component';
@@ -128,8 +127,6 @@ export const EditPolygon = ({
128127
</TranslateShape>
129128
</svg>
130129

131-
{shape.points.length > 0 && !isBrushSubTool && <Labels annotation={{ ...annotation, shape }} />}
132-
133130
{disablePoints === false && !isBrushSubTool ? (
134131
<svg
135132
id={`edit-polygon-points-${annotation.id}`}

0 commit comments

Comments
 (0)