fix(ui): ensure 100% solid white background and higher z-index for ingredient wiki tooltip
Deploy Canina / deploy (push) Successful in 2m13s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 6s

This commit is contained in:
parsa aghaei committed 2026-09-02 10:45:00 +03:30
1 parent 2a501637cb
commit 517d611b2a
3 files changed
+632 -628

No files matched your search

+7 -3
View File
@@ -69,7 +69,7 @@ export default function Tooltip({ termKey, children, onWikiNavigate }: TooltipPr
return (
<span
ref={containerRef}
className="relative inline-block group cursor-pointer border-b border-dotted border-canina-blue/60 select-none"
className={`relative inline-block group cursor-pointer border-b border-dotted border-canina-blue/60 select-none ${isVisible ? 'z-40' : 'z-10'}`}
onClick={handleToggle}
onMouseEnter={() => {
if (typeof window !== "undefined" && window.matchMedia?.("(hover: hover)")?.matches !== false) {
@@ -92,7 +92,8 @@ export default function Tooltip({ termKey, children, onWikiNavigate }: TooltipPr
animate={{ opacity: 1, y: 0, scale: 1 }}
exit={{ opacity: 0, y: 10, scale: 0.95 }}
onClick={(e) => e.stopPropagation()}
className={`absolute bottom-full mb-3 w-72 max-w-[calc(100vw-2rem)] p-4 sm:p-5 bg-white text-medical-gray-900 rounded-2xl shadow-2xl border-2 border-medical-gray-300/80 z-[100] text-sm ${positionClass}`}
style={{ backgroundColor: '#ffffff' }}
className={`absolute bottom-full mb-3 w-72 max-w-[calc(100vw-2rem)] p-4 sm:p-5 !bg-white text-medical-gray-900 rounded-2xl shadow-2xl border-2 border-medical-gray-200 z-[100] text-sm ${positionClass}`}
dir="rtl"
>
<div className="flex items-center gap-2 mb-2 text-canina-blue">
@@ -116,7 +117,10 @@ export default function Tooltip({ termKey, children, onWikiNavigate }: TooltipPr
</button>
)}
{/* Arrow */}
<div className={`absolute top-full border-8 border-transparent border-t-white ${arrowClass}`} />
<div
style={{ borderTopColor: '#ffffff' }}
className={`absolute top-full border-8 border-transparent border-t-white ${arrowClass}`}
/>
</motion.div>
)}
</AnimatePresence>