From 7679a458e04edff56e1628ca35abe204fddff1e6 Mon Sep 17 00:00:00 2001 From: James Kolpack Date: Sat, 17 Jan 2026 11:42:28 -0500 Subject: [PATCH] Refactor InteractiveChip component for improved control visibility on touch devices This commit enhances the InteractiveChip component by adjusting the visibility logic for control content based on device type. Controls are now displayed on touch devices when the AlwaysShowControls parameter is true or when the chip is touched, while hover-based visibility is maintained for desktop devices. These changes improve user interaction and accessibility across different platforms, contributing to a more responsive UI. --- .../Shared/Components/InteractiveChip.razor | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/WebApp/Components/Shared/Components/InteractiveChip.razor b/WebApp/Components/Shared/Components/InteractiveChip.razor index 35a2523..05162b6 100644 --- a/WebApp/Components/Shared/Components/InteractiveChip.razor +++ b/WebApp/Components/Shared/Components/InteractiveChip.razor @@ -19,18 +19,21 @@ @ChildContent @if (ControlContent != null) { - @* Always show controls on mobile/touch devices *@ - - @ControlContent - - @* Show on hover for desktop devices *@ - - @if (_isHovered || AlwaysShowControls || _isTouched) - { - @ControlContent - } - - } + @* Show on touch for mobile/touch devices (below Md) *@ + + @if (_isTouched || AlwaysShowControls) + { + @ControlContent + } + + @* Show on hover for desktop devices (MdAndUp) *@ + + @if (_isHovered || AlwaysShowControls) + { + @ControlContent + } + + }