lunit-io / insight-viewer

medical image viewer component for React
https://insight-viewer.lunit.io
MIT License
34 stars 6 forks source link

VIEWER-163 / data Attribute 적용 #414

Closed LTakhyunKim closed 1 year ago

LTakhyunKim commented 1 year ago

πŸ“ Description

data attribute κ°€ μ μš©λ˜μ§€ μ•ŠλŠ” 이슈λ₯Ό ν•΄κ²°ν•©λ‹ˆλ‹€. AnnotationOverlay 의 onAdd prop 을 ν™œμš©, annotation 의 dataAttrs 값을 ν• λ‹Ήν•˜λ©΄ data attribute κ°€ μ μš©λ©λ‹ˆλ‹€. 이와 ν•¨κ»˜ dataAttrs 의 νƒ€μž…μ„ Template Literal Types λ₯Ό μ μš©ν•˜μ—¬ 보닀 μ •ν™•ν•œ 값을 κΈ°μž…ν•  수 μžˆλ„λ‘ κ°œμ„ ν–ˆμŠ΅λ‹ˆλ‹€.

            <AnnotationOverlay
              {...props}
              onAdd={(annotation) => {
                const addedAnnotation = { ...annotation }
                addedAnnotation.dataAttrs = { 'data-index': '1' }
                return addedAnnotation
              }}
            />

βœ”οΈ PR Type

What kind of change does this PR introduce?

🎯 Current behavior

data attribute λ₯Ό μ μš©ν•  수 μ—†μŠ΅λ‹ˆλ‹€.

Issue Number: https://lunit.atlassian.net/browse/VIEWER-163

πŸš€ New behavior

annotation μΆ”κ°€ μ‹œ data attribute λ₯Ό 지정할 수 μžˆμŠ΅λ‹ˆλ‹€.

πŸ’£ Is this a breaking change?

github-actions[bot] commented 1 year ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟒 Statements 93.02% 80/86
🟒 Branches 94.55% 52/55
🟑 Functions 77.78% 21/27
🟒 Lines 92.31% 72/78

Test suite run success

66 tests passing in 9 suites.

Report generated by πŸ§ͺjest coverage report action from 4984f2bf5a63f6266244fa9f176fe5962d9f754f