fleet/frontend/hooks
jacobshandling 19fe0ff5ce
UI: Improve TooltipTruncatedText and now underlying useCheckTruncatedElement (#29232)
## For #27667 

- Have `TooltipTruncatedText` component use `useCheckTruncatedElement`
to track its current state of truncation.
- Update `useCheckTruncatedElement` to re-evaluate truncation state
based on changes to the width of
the element itself as opposed to changes to viewport width. This
facilitates truncation when the
width of the element is updated due to user interaction / change in UI
state other than window resize, e.g. checking a policy in the policy
software automations modal (see issue description for details
reproduction instructions there).

**Truncation with tooltip successful for UI state changes:**

![ezgif-27969fb4a17d3e](https://github.com/user-attachments/assets/66156bd5-7948-4e73-9c11-4a08fde44189)

Truncation with tooltip successful for viewport resizing:

![ezgif-2515f715b05436](https://github.com/user-attachments/assets/8ef70579-1e89-4a4b-9fd0-93a4776d3151)

![ezgif-24a953c65500d9](https://github.com/user-attachments/assets/fc2f302b-6f7e-463e-97d2-9978b97c5601)

- [x] Changes file added for user-visible changes in `changes/⁄
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-05-20 15:41:53 -07:00
..
useCheckboxListStateManagement.tsx 17445 calendar events modal (#17717) 2024-03-26 13:39:37 -05:00
useCheckTruncatedElement.ts UI: Improve TooltipTruncatedText and now underlying useCheckTruncatedElement (#29232) 2025-05-20 15:41:53 -07:00
useDeepEffect.ts Removed all traces of Redux from the app! (#5287) 2022-04-22 09:45:35 -07:00
usePlatformCompatibility.tsx 21855 – Paginate and filter Queries on the server, update platform filtering from compatible to targeted platforms (#24446) 2024-12-11 10:50:28 -08:00
usePlatformSelector.tsx Fleet UI: VPP auto install software on failed policies, filter software compatible to policy's target platform, etc (#25202) 2025-01-13 16:45:16 -08:00
useQueryTargets.ts Fleet UI: Fix new query bugs introduced (#14309) 2023-10-06 10:03:19 -07:00
useTeamIdParam.ts UI - Enable "No team" for Policies (#21885) 2024-09-16 12:40:52 -04:00
useToggleSidePanel.ts Fleet UI: Fix bug with label sidebar not collapsing (#7402) 2022-09-01 17:42:25 -04:00