From 1d879235998c38b2e6a7d2005e517e3a17b8ad3f Mon Sep 17 00:00:00 2001 From: Tobias Date: Fri, 30 Sep 2022 13:26:09 +0200 Subject: [PATCH] fix(Tooltip): merge style property with internal + Add some more tests --- ...ave-to-match-with-tooltip-1-b282d.snap.png | Bin 13840 -> 13840 bytes ...-to-match-the-focus-state-1-1e3c0.snap.png | Bin 5596 -> 5605 bytes .../components/tooltip/TooltipContainer.tsx | 85 ++++++++++-------- .../tooltip/__tests__/Tooltip.test.tsx | 84 ++++++++++++++++- 4 files changed, 133 insertions(+), 36 deletions(-) diff --git a/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-target-blank-have-to-match-with-tooltip-1-b282d.snap.png b/packages/dnb-eufemia/src/components/button/__tests__/__snapshots__/button-screenshot-test-js-button-target-blank-have-to-match-with-tooltip-1-b282d.snap.png index cd484d19c877653c6bcb1f738b162b0acb9d4233..d75cc2775572f9f670158e8cd09c3a3efb37b68c 100644 GIT binary patch literal 13840 zcmcgz1y@yF*F}*K1Ox=65v038O1eY3L6Gil5NRoiONVrK*9AekJEXh2^V>Y{fB435 zIPN&yd(Muv=9+V^eL@uE#8Hs&kYHe7P$VTp6k%Xq;)Bnoi16TlbySu+7#I>5NfAM1 z*OY?=7ww4)*zOY?k2PvxIOV^-NJxjTNi*ve1|SeJH8X4aeim`nDaOz~f&#OSMDk@s zEG*j(TudVb`lO`!BwWkCoLU9GhqfG|zU3e8?g%>FI6Qlpce{Fkwx(aG#Poh+c_sK3 z{8JWbX{04V{6T^!bU@J__}?d*9E}C6x35+g%>pg=`kIHPuC zdb)dlKE-%2X|zmFASE@GnT?H(Lw((gL3BHxPozJPWa10C*M$)aZb(RoViv9FW=RU07L>t0d$U684=X?kl{NG zikJ$wGvivzS;d`7fyZk@=-nZYrKM$gRn^+Go{vg?snEj7l$H&%QQteaaw-BQk!9D0 z5G)b63{+}rQ<&?U8|rs#Fzp>3iJzQk47(%9NlAq=D*YRc#&cx}cwH499n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ni_PhkP1qzzHx>Bhm{KPeF|QzFAr%hNnFs%*ZE8%+N`yH&^C-NmTcZTzgW zB8`q8oSTr~l+ftw6!dagK7PE`F}EP?eIT`_rbe-D*c0zDjn}P%dq7tg%SsQ4`=8GB zsEioS)-o`^BwcS!%`U`tB*XnINvTI+GzX_Y^3+ZXAQYd$}qY!sQXo7|A@6 z9x~)rQ;65wSXcpq|1sMcM0FwLWSo_4c?Qxa^gw{bJ=1pg5I6xi$~ z`v#Uy;J{9obEWAhSjpH!Y2ZN#=E!dkEH*mn)XHV+K=LsWb*78gFBTgQzCJqFt5uX( zL%5X^3GguLooH>ZkBWoW;8*JtCo8EH`{PD6aZj*Lm3GGCyPwis%2F4nP8yh)=@&2c-58aWKzdTrTi$# zBZ8#zY(vt!*%PmH+ey0sH8v21rf%_k`rp3?hg;TJ)dhMP^gVnAXJ=hkhqaDxaKK3X zx3Gudd5`)WQXl0vHbPHFc^ESIBP7=4e^N)mpDK|G?U+)UA%JO%2wHv$wMR5G>{{ZaaIlnnkSMSxH~fAs&S2bWKqpLc6)wpR1NH@#pa#pFawg!TRY4>U`Z As{jB1 diff --git a/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-js-slider-screenshot-have-to-match-the-focus-state-1-1e3c0.snap.png b/packages/dnb-eufemia/src/components/slider/__tests__/__snapshots__/slider-screenshot-test-js-slider-screenshot-have-to-match-the-focus-state-1-1e3c0.snap.png index 437c07d59921b28dbb3e61da178c2291a00bf0d0..5c08274757ca47c1ac699ab01587b82fbdea29de 100644 GIT binary patch literal 5605 zcmb7I^+QzO)4qfto#KM9lz`+eor|O(A%X#t>!N^k=Yo`gQqm1dN|y>shjhq?TDo)T zSQ_5z_dj@l**JIh%$aBAJkRWWeELLMD8wfQJM>JKiP&U)h?A%)vK2 z7d>k_HxeKWpy9DtT)f(ICM+&+6ndlhLI*Gza>Ad8Y3uI z`OL{oKv*%yDpT#^I;f>{Vtjh_TzB{oyJ2=?VZGYx;CG1K0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4zpuAjd$1(NhMTst}kT?y98NCNnY+O1n!nEY}?9%_1q=sH9ia!Z|!QStY zd2Pw)rz%i*D0HP`!3X!+Ku5hSk3cXlHd=f>QS(U)Z_{5Tx06%ap=w4bMNs%BruN9! z2l4shv?%Z<+nOV~^y=o81yue9g5!rIi=c_Lkj{~(Pc1+wc6@g!6Ar9_{$-+zm0tkc z5#?#-gV*#u;KXEo&*6G6I=aBFJ{bHG@a)H;5r%kSqUfGRclMPpKO0`upHc>g1*ZlV zjng<0!WUWrw!j-mk^lJZ_PA~N((Y}C=(@imcoj$@8E#i4aIvahEzW8DSnOOwzG2#! zb?3rr%B*JMKSZ{y56h;4-v_mi45VplaZvq! + attributes?: Record & { style: React.CSSProperties } } export default function TooltipContainer( @@ -33,18 +33,28 @@ export default function TooltipContainer( children, } = props + const [style, setStyle] = React.useState(null) const [hover, setHover] = React.useState(false) + const isActive = isTrue(active) || hover const [wasActive, makeActive] = React.useState(false) - const [renewStyles, forceRerender] = React.useState(0) + const [renewStyles, forceRerender] = React.useState(getBodySize) const elementRef = React.useRef(null) const offset = React.useRef(16) const debounceTimeout = React.useRef() const resizeObserver = React.useRef(null) - const isActive = isTrue(active) || hover + function getBodySize() { + if (!isActive || typeof document === 'undefined') { + return 0 // stop here + } + + const { width, height } = document.body.getBoundingClientRect() + + return width + height + } - React.useEffect(() => { + React.useLayoutEffect(() => { const addPositionObserver = () => { if (resizeObserver.current || typeof document === 'undefined') { return // stop here @@ -52,15 +62,11 @@ export default function TooltipContainer( try { resizeObserver.current = new ResizeObserver((entries) => { - const run = () => { - const { width, height } = entries[0].contentRect - forceRerender(width + height) - } - if (!renewStyles) { - run() - } clearTimeout(debounceTimeout.current) - debounceTimeout.current = setTimeout(run, 100) + debounceTimeout.current = setTimeout( + () => forceRerender(getBodySize()), + 100 + ) }) resizeObserver.current.observe(document.body) @@ -85,9 +91,15 @@ export default function TooltipContainer( // eslint-disable-next-line react-hooks/exhaustive-deps }, [isActive]) - const style = React.useMemo(() => { - if (typeof window === 'undefined' || !elementRef.current) { - return {} + React.useLayoutEffect(() => { + const { targetElement: target, align, fixedPosition } = props + + if ( + typeof window === 'undefined' || + !elementRef.current || + !target?.getBoundingClientRect + ) { + return // stop here } const elementWidth = elementRef.current.offsetWidth @@ -95,19 +107,17 @@ export default function TooltipContainer( let alignOffset = 0 - const { targetElement: target, align, fixedPosition } = props - const rect = target.getBoundingClientRect() - const targetSize = { + const targetBodySize = { width: target.offsetWidth, height: target.offsetHeight, } // fix for svg if (!target.offsetHeight) { - targetSize.width = rect.width - targetSize.height = rect.height + targetBodySize.width = rect.width + targetBodySize.height = rect.height } const scrollY = @@ -117,26 +127,29 @@ export default function TooltipContainer( const top = (isTrue(fixedPosition) ? 0 : scrollY) + rect.top // Use Mouse position when target is too wide - const useMouseWhen = targetSize.width > 400 + const useMouseWhen = targetBodySize.width > 400 const mousePos = getOffsetLeft(target) + rect.left / 2 + (elementRef.current ? elementRef.current.offsetWidth : 0) const widthBased = scrollX + rect.left const left = - useMouseWhen && mousePos < targetSize.width ? mousePos : widthBased + useMouseWhen && mousePos < targetBodySize.width + ? mousePos + : widthBased const style = { ...props.style } if (align === 'left') { - alignOffset = -targetSize.width / 2 + alignOffset = -targetBodySize.width / 2 } else if (align === 'right') { - alignOffset = targetSize.width / 2 + alignOffset = targetBodySize.width / 2 } - const topHorizontal = top + targetSize.height / 2 - elementHeight / 2 + const topHorizontal = + top + targetBodySize.height / 2 - elementHeight / 2 const leftVertical = - left - elementWidth / 2 + targetSize.width / 2 + alignOffset + left - elementWidth / 2 + targetBodySize.width / 2 + alignOffset const stylesFromPosition = { left: () => { @@ -145,7 +158,7 @@ export default function TooltipContainer( }, right: () => { style.top = topHorizontal - style.left = left + targetSize.width + offset.current + style.left = left + targetBodySize.width + offset.current }, top: () => { style.left = leftVertical @@ -153,29 +166,29 @@ export default function TooltipContainer( }, bottom: () => { style.left = leftVertical - style.top = top + targetSize.height + offset.current + style.top = top + targetBodySize.height + offset.current }, } const stylesFromArrow = { left: () => { style.left = - left + targetSize.width / 2 - offset.current + alignOffset + left + targetBodySize.width / 2 - offset.current + alignOffset }, right: () => { style.left = left - elementWidth + - targetSize.width / 2 + + targetBodySize.width / 2 + offset.current + alignOffset }, top: () => { - style.top = top + targetSize.height / 2 - offset.current + style.top = top + targetBodySize.height / 2 - offset.current }, bottom: () => { style.top = - top + targetSize.height / 2 - elementHeight + offset.current + top + targetBodySize.height / 2 - elementHeight + offset.current }, } @@ -199,10 +212,12 @@ export default function TooltipContainer( style.top = 0 } - return style + if (isActive) { + setStyle(style) + } // eslint-disable-next-line react-hooks/exhaustive-deps - }, [isActive, hover, children, elementRef, renewStyles]) + }, [isActive, hover, arrow, position, children, renewStyles]) const handleMouseEnter = () => { if (isTrue(active) && useHover !== false) { @@ -220,7 +235,6 @@ export default function TooltipContainer( {arrow && ( { }) describe('with targetSelector', () => { - const Tooltip = (props: TooltipProps = {}) => ( + const Tooltip = (props: TooltipProps) => ( <> { const Component = render() expect(await axeComponent(Component)).toHaveNoViolations() }) + + it('should merge style prop', () => { + render( + <> + + anchor + + + {/** + * The ignore is only temporary + * and will be removed when rebasing with this PR https://github.com/dnbexperience/eufemia/pull/1590 + * + * eslint-disable-line @typescript-eslint/ban-ts-comment + * @ts-ignore */} + + Tooltip + + + ) + + expect( + document.querySelector('.dnb-tooltip').getAttribute('style') + ).toBe('z-index: 10; left: 0px; top: 0px;') + }) + + it('should set size class', () => { + render( + + Tooltip + + ) + + expect( + Array.from(document.querySelector('.dnb-tooltip').classList) + ).toEqual(expect.arrayContaining(['dnb-tooltip--large'])) + }) + + it('should set fixed position class', () => { + render( + + Tooltip + + ) + + expect( + Array.from(document.querySelector('.dnb-tooltip').classList) + ).toEqual(expect.arrayContaining(['dnb-tooltip--fixed'])) + }) + + it('should set position class', () => { + render( + + Tooltip + + ) + + expect( + Array.from(document.querySelector('.dnb-tooltip__arrow').classList) + ).toEqual( + expect.arrayContaining([ + 'dnb-tooltip__arrow__arrow--center', + 'dnb-tooltip__arrow__position--right', + ]) + ) + }) + + it('should set arrow class', () => { + render( + + Tooltip + + ) + + expect( + Array.from(document.querySelector('.dnb-tooltip__arrow').classList) + ).toEqual( + expect.arrayContaining([ + 'dnb-tooltip__arrow__arrow--right', + 'dnb-tooltip__arrow__position--top', + ]) + ) + }) }) describe('with targetElement', () => {