From 2cf3a13ee42bd3d9dcbeecf6aab47bba70d8b4cb Mon Sep 17 00:00:00 2001 From: undergroundwires Date: Fri, 24 Nov 2023 19:08:58 +0100 Subject: [PATCH] Fix tooltips go offscreen and arrowless on mobile - Fix tooltip overflowing when hovering on script selection options (None, Standard, Strict, All) on UI. This issue was caused because these options had `white-space: nowrap` so they're rendered together. However, as tooltips are rendered inside of the same DOM element with their triggering elements, this style was propagated and caused overflow content to overflow on smaller screens. This commit adds `white-space: initial` on tooltip overlay/container to stop the propogation and fix the issue. - Fix overflow issue revealed another issue with tooltip arrow rendering. When tooltip is shifted from its default position (top) to bottom on smaller screens when there are not enough space on top, the tooltip arrow did not change its position and still stayed on bottom. This was caused because of using wrong reference to get current placement of the tooltip. The issue is fixed by using the reference from `useFloating` function. - Improve `DevToolkit` component to be less intrusive during tests. The DevToolkit is now non-interactable except its buttons for easier testing of tooltips on smaller screens. A new close button is also added on the box, so it can be closed completely if desired. --- .../components/DevToolkit/DevToolkit.vue | 89 +++++++++++++++---- .../components/Shared/TooltipWrapper.vue | 21 +++-- 2 files changed, 89 insertions(+), 21 deletions(-) diff --git a/src/presentation/components/DevToolkit/DevToolkit.vue b/src/presentation/components/DevToolkit/DevToolkit.vue index cfc592c9c..ad863368a 100644 --- a/src/presentation/components/DevToolkit/DevToolkit.vue +++ b/src/presentation/components/DevToolkit/DevToolkit.vue @@ -1,28 +1,44 @@