From 916c9d62d9fce27c3cd3feaf90c66df584d4f04a Mon Sep 17 00:00:00 2001 From: undergroundwires Date: Sun, 10 Dec 2023 19:53:19 +0100 Subject: [PATCH] Fix tooltip overflow on smaller screens This commit addresses three main issues related to tooltips on devices with smaller screens: 1. Fix tooltip overflow: On mobile devices, tooltips associated with script selection options (None, Standard, Strict, All) were overflowing due to inherited `white-space: nowrap` styling. This styling caused tooltips to render beyond screen limits. The fix involves applying `white-space: initial` to the tooltip overlay, preventing this style propagation and resolving the overflow issue. 2. Corrects tooltip arrow placement: Previously, when tooltips shifted from their default top position to the bottom on smaller screens, their arrows did not reposition accordingly. This issue was caused by using an incorrect reference for tooltip placement calculation. By updating the reference used to the one from `useFloating` function, the tooltip arrow now correctly aligns with the adjusted position. 3. Uniform margin handling: Enhances the margin settings around tooltips to maintain a consistent gap between the tooltip and the document edges, visible particularly on smaller screens. Additionaly, the `DevToolkit` component has been improved for easier testing. It is now non-interactable (except for its buttons) to prevent it from getting in the way when testing on smaller screens. A new close button has been added, allowing developers/testers to completely hide the DevToolkit if desired. --- .../components/DevToolkit/DevToolkit.vue | 93 ++++++++++++++++--- .../components/Shared/TooltipWrapper.vue | 38 ++++++-- 2 files changed, 106 insertions(+), 25 deletions(-) diff --git a/src/presentation/components/DevToolkit/DevToolkit.vue b/src/presentation/components/DevToolkit/DevToolkit.vue index cfc592c9..b6d7a9a7 100644 --- a/src/presentation/components/DevToolkit/DevToolkit.vue +++ b/src/presentation/components/DevToolkit/DevToolkit.vue @@ -1,28 +1,44 @@