All updates
ProductionQAFrontend

Hover tooltips for View and Delete buttons on mail documents

PR #462heytulsiprasadOct 5, 2025 · 03:16 UTC
QAOct 1, 2025
ProductionOct 5, 2025

Executive summary

The View and Delete action buttons on documents within a mail's detail view now show a descriptive label ('View Document' / 'Delete Document') when hovered. This is a small usability polish that makes the icon-only buttons clearer; it has reached the QA environment.

Why this was needed

The document action row used compact icon-only buttons (an eye icon for view, a trash icon for delete). Without labels, users had to infer each icon's purpose, which is error-prone for an action as consequential as deleting a document. Adding tooltips removes that ambiguity.

Client / user impact

When viewing a mail's attached documents, hovering over the eye or trash icon now displays a clear text label describing the action. This reduces the chance of accidental clicks (especially on Delete) and brings these buttons in line with the existing 'Sync to PTP' button, which already had a tooltip. No change to behavior, layout, or what the buttons do.

Technical scope

  • Single file changed: src/components/mails/MailDetails/MailDocuments.tsx (+39 / -25 lines).
  • Wrapped the existing View (Link + Eye icon button) and Delete (Trash icon button) controls in the document action row with the shared Radix/shadcn Tooltip / TooltipTrigger asChild / TooltipContent components.
  • Added tooltip copy: 'View Document' and 'Delete Document'.
  • No change to click handlers, e.stopPropagation() row-selection guard, the /documents/{id} view link, the delete handler, the isDeletingDocument disabled state, or button styling.

Risk & mitigation

Very low. This is a presentational-only change confined to one component, reusing tooltip primitives already used elsewhere on the same row. The only realistic regressions are cosmetic (tooltip overlap, z-index, or positioning on hover). Mitigation: the underlying button actions and event handling are untouched, so core view/delete functionality is unaffected.

QA validation focus

  • Open a mail's detail view that has one or more documents.
  • Hover the eye (View) icon and confirm the 'View Document' tooltip appears; hover the trash (Delete) icon and confirm 'Delete Document' appears.
  • Confirm clicking View still opens /documents/{id} in a new tab and does not select the row.
  • Confirm clicking Delete still deletes the document and that the button is disabled while a delete is in progress.
  • Check tooltip positioning does not overlap or clip adjacent buttons (including the existing 'Sync to PTP' tooltip).