From 5ee4d907c1ecbb5eec722e3179278bcc7d603f2d Mon Sep 17 00:00:00 2001 From: Kyle Cardwell <79024398+KyleCardwell@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:28:52 -0700 Subject: [PATCH] added datadog action names and privacy masks to hide PHI (#32854) * added datadog action names and privacy masks to hide PHI * adjusted case of text to align with other datadog naming convention --- .../components/ComposeForm/ReplyDraftItem.jsx | 1 + .../components/ComposeForm/ReplyDrafts.jsx | 1 + .../components/ComposeForm/ReplyForm.jsx | 7 ++++- .../components/FacilityCheckboxGroup.jsx | 1 + .../components/FoldersList.jsx | 23 ++++++++++++-- .../components/MessageList/FolderHeader.jsx | 14 +++++++-- .../components/Search/SearchForm.jsx | 11 +++++++ .../components/ThreadList/ThreadListItem.jsx | 16 ++++++++-- .../shared/BlockedTriageGroupAlert.jsx | 16 ++++++++-- .../mhv-secure-messaging/sass/search.scss | 7 +++-- .../mhv-secure-messaging/util/helpers.js | 31 ++++++++++++++++--- 11 files changed, 112 insertions(+), 16 deletions(-) diff --git a/src/applications/mhv-secure-messaging/components/ComposeForm/ReplyDraftItem.jsx b/src/applications/mhv-secure-messaging/components/ComposeForm/ReplyDraftItem.jsx index 94532b650726..e9dbbaf63777 100644 --- a/src/applications/mhv-secure-messaging/components/ComposeForm/ReplyDraftItem.jsx +++ b/src/applications/mhv-secure-messaging/components/ComposeForm/ReplyDraftItem.jsx @@ -484,6 +484,7 @@ const ReplyDraftItem = props => { data-testid="draft-reply-to" style={{ whiteSpace: 'break-spaces', overflowWrap: 'anywhere' }} data-dd-privacy="mask" + data-dd-action-name="Reply Draft Accordion Header" >
{alertInfoText}
@@ -233,7 +235,12 @@ const BlockedTriageGroupAlert = props => { blockedTriageList?.length > 1 && ({alertInfoText}
Find your VA health facility diff --git a/src/applications/mhv-secure-messaging/sass/search.scss b/src/applications/mhv-secure-messaging/sass/search.scss index 1bd26be0b9c8..0331f0733fdc 100644 --- a/src/applications/mhv-secure-messaging/sass/search.scss +++ b/src/applications/mhv-secure-messaging/sass/search.scss @@ -24,7 +24,6 @@ } .filter-input-box-container { - margin-top: -30px; position: relative; display: flex; flex-wrap: nowrap; @@ -42,7 +41,7 @@ va-button::part(button) { width: 100%; - @media (min-width: $small-screen) { + @media (min-width: $small-screen) { width: auto; } } @@ -51,6 +50,10 @@ margin: 0px; } + #filter-input::part(label) { + margin-top: 0; + } + .filter-input-box { margin: 0px; } diff --git a/src/applications/mhv-secure-messaging/util/helpers.js b/src/applications/mhv-secure-messaging/util/helpers.js index e27180034b6f..fb54c1581605 100644 --- a/src/applications/mhv-secure-messaging/util/helpers.js +++ b/src/applications/mhv-secure-messaging/util/helpers.js @@ -184,18 +184,39 @@ export const getLastSentMessage = messages => { }; export const handleHeader = (folderId, folder) => { + let folderName; + switch (folderId) { case Folders.INBOX.id: // Inbox - return Folders.INBOX.header; + folderName = Folders.INBOX.header; + break; case Folders.SENT.id: // Sent - return Folders.SENT.header; + folderName = Folders.SENT.header; + break; case Folders.DRAFTS.id: // Drafts - return Folders.DRAFTS.header; + folderName = Folders.DRAFTS.header; + break; case Folders.DELETED.id: // Trash - return Folders.DELETED.header; + folderName = Folders.DELETED.header; + break; default: - return folder.name; + folderName = folder.name; } + + const isCustomFolder = + folderName !== Folders.INBOX.header && + folderName !== Folders.SENT.header && + folderName !== Folders.DRAFTS.header && + folderName !== Folders.DELETED.header; + + const ddTitle = `${isCustomFolder ? 'Custom Folder' : `${folderName}`} h1`; + const ddPrivacy = `${isCustomFolder ? 'mask' : 'allow'}`; + + return { + folderName, + ddTitle, + ddPrivacy, + }; }; export const updateMessageInThread = (thread, response) => {