Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MHV-55186] Update all V1 components to V3 web components on SM MHV #28504

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
0b7b250
[MHV-55186] Update Message landing components to V3
vsaleem Mar 4, 2024
8af53af
Merge branch 'main' into 55186-Update-all-V1-components-to-V6-on-sm-mhv
vsaleem Mar 5, 2024
97c5991
[MHV-55186] Updated modals, buttons, and dropdowns with uswds
vsaleem Mar 5, 2024
91fcdd4
Merge branch 'main' into 55186-Update-all-V1-components-to-V6-on-sm-mhv
vsaleem Mar 11, 2024
f3e129c
[MHV-55186] Update SM va-components to uswds
vsaleem Mar 12, 2024
f8c6800
Merge branch 'main' into 55186-Update-all-V1-components-to-V6-on-sm-mhv
vsaleem Mar 12, 2024
e5f1783
upd: locators and fix failed tests
fazilqa Mar 12, 2024
2d42ef9
upd: locators and fix failed tests
fazilqa Mar 12, 2024
e3c4798
upd: locators and fix failed tests
fazilqa Mar 12, 2024
1870986
upd: locators and fix failed tests
fazilqa Mar 13, 2024
b4f6b5c
upd: locators and fix failed tests
fazilqa Mar 13, 2024
7843bf9
upd: locators and fix failed tests
fazilqa Mar 13, 2024
20d9637
[MHV-55186] cleanup; added charcount to sm subject input
vsaleem Mar 13, 2024
d12f76e
Merge branch '55186-Update-all-V1-components-to-V6-on-sm-mhv' of http…
vsaleem Mar 13, 2024
ce2fb22
Merge branch 'main' into 55186-Update-all-V1-components-to-V6-on-sm-mhv
vsaleem Mar 15, 2024
5dcbea7
upd: locators and fix failed tests
fazilqa Mar 14, 2024
7340055
upd: temporary skip failed test
fazilqa Mar 14, 2024
2f846eb
upd: unskip the test
fazilqa Mar 15, 2024
d219eab
[MHV-55186] Hotfix to update sm V3 components for release
vsaleem Mar 15, 2024
dc4ddda
Merge branch 'main' into 55186-Update-all-V1-components-to-V6-on-sm-mhv
vsaleem Mar 15, 2024
44954e5
attempt to resolve linting errors
vsaleem Mar 15, 2024
d4fb5cc
Merge branch 'main' into 55186-Update-all-V1-components-to-V6-on-sm-mhv
vsaleem Mar 15, 2024
bc3180e
2nd attempt to fix linting errs
vsaleem Mar 15, 2024
c558765
Merge branch 'main' into 55186-Update-all-V1-components-to-V6-on-sm-mhv
vsaleem Mar 18, 2024
6b4764e
cleanup, added null safety
vsaleem Mar 18, 2024
797fd7d
fix eslint
vsaleem Mar 18, 2024
23d22da
Merge branch 'main' into 55186-Update-all-V1-components-to-V6-on-sm-mhv
vsaleem Mar 18, 2024
fe2c719
[MHV-55186] Added margins between mobile view buttons
vsaleem Mar 18, 2024
6f154d1
cleanup eslint, set dropdown uswds to false
vsaleem Mar 18, 2024
4f4f320
upd: update selectors & refactor
fazilqa Mar 15, 2024
d87023b
upd: update assertions
fazilqa Mar 18, 2024
52e45a4
upd: fix failed test
fazilqa Mar 18, 2024
1ef0dd4
upd: remove skip
fazilqa Mar 18, 2024
9fddf13
[MHV-55186] Removing uswds true tags, no longer needed
vsaleem Mar 18, 2024
0efeccb
Merge branch '55186-Update-all-V1-components-to-V6-on-sm-mhv' of http…
vsaleem Mar 18, 2024
07fc403
Merge branch 'main' into 55186-Update-all-V1-components-to-V6-on-sm-mhv
vsaleem Mar 18, 2024
82d7c10
cleanup
vsaleem Mar 18, 2024
9a08371
cleanup, format components with eslint
vsaleem Mar 18, 2024
b886ef5
cleanup with eslint format
vsaleem Mar 18, 2024
e573e35
cleanup using eslint
vsaleem Mar 18, 2024
fdbb3a6
cleanup files not apart of sm
vsaleem Mar 18, 2024
7320089
cleanup non-sm file
vsaleem Mar 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -16,8 +16,8 @@
import FEATURE_FLAG_NAMES from '@department-of-veterans-affairs/platform-utilities/featureFlagNames';
import { useSelector } from 'react-redux';
import { selectUser } from '@department-of-veterans-affairs/platform-user/selectors';
import { selectEhrDataByVhaId } from 'platform/site-wide/drupal-static-data/source-files/vamc-ehr/selectors';

Check warning on line 19 in src/applications/mhv/secure-messaging/components/Alerts/CernerTransitioningFacilityAlert.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/components/Alerts/CernerTransitioningFacilityAlert.jsx:19:1:Importing from platform via platform/site-wide is deprecated. Import from @department-of-veterans-affairs/platform-site-wide instead or check babel.config.json for an alias to the import.
import { getVamcSystemNameFromVhaId } from 'platform/site-wide/drupal-static-data/source-files/vamc-ehr/utils';

Check warning on line 20 in src/applications/mhv/secure-messaging/components/Alerts/CernerTransitioningFacilityAlert.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/components/Alerts/CernerTransitioningFacilityAlert.jsx:20:1:Importing from platform via platform/site-wide is deprecated. Import from @department-of-veterans-affairs/platform-site-wide instead or check babel.config.json for an alias to the import.
import { CernerTransitioningFacilities } from '../../util/constants';

const CernerTransitioningFacilityAlert = () => {
Expand Down Expand Up @@ -66,14 +66,14 @@
}
return null;
},
[userFacilities, ehrFacilities],

Check warning on line 69 in src/applications/mhv/secure-messaging/components/Alerts/CernerTransitioningFacilityAlert.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/components/Alerts/CernerTransitioningFacilityAlert.jsx:69:5:React Hook useMemo has a missing dependency: 'transitioningFacilityId'. Either include it or remove the dependency array.
);

const contentT30 = useMemo(
() => {
return (
isTranstioningFacility && (
<va-alert status="warning" class="vads-u-margin-y--2">
<va-alert status="warning" class="vads-u-margin-y--2" uswds>
<h1 slot="headline">
Your health facility is moving to My VA Health
</h1>
Expand Down Expand Up @@ -105,7 +105,7 @@
() => {
return (
isTranstioningFacility && (
<va-alert status="warning" class="vads-u-margin-y--2">
<va-alert status="warning" class="vads-u-margin-y--2" uswds>
<h1 slot="headline">
You can’t send messages to some of your care teams right now
</h1>
Expand Down
@@ -1,6 +1,6 @@
import React, { useEffect, useRef, useState } from 'react';
import PropTypes from 'prop-types';
import recordEvent from 'platform/monitoring/record-event';

Check warning on line 3 in src/applications/mhv/secure-messaging/components/AttachmentsList.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/components/AttachmentsList.jsx:3:1:Importing from platform via platform/monitoring is deprecated. Import from @department-of-veterans-affairs/platform-monitoring instead or check babel.config.json for an alias to the import.
import { focusElement } from '@department-of-veterans-affairs/platform-utilities/ui';
import { VaAlert } from '@department-of-veterans-affairs/component-library/dist/react-bindings';
import RemoveAttachmentModal from './Modals/RemoveAttachmentModal';
Expand Down Expand Up @@ -66,7 +66,7 @@
setAttachFileSuccess(false);
}
},
[attachments],

Check warning on line 69 in src/applications/mhv/secure-messaging/components/AttachmentsList.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/components/AttachmentsList.jsx:69:5:React Hook useEffect has a missing dependency: 'setAttachFileSuccess'. Either include it or remove the dependency array.
);

const removeAttachment = file => {
Expand Down Expand Up @@ -123,6 +123,7 @@
{attachFileSuccess &&
attachments.length > 0 && (
<VaAlert
uswds
aria-live="polite"
aria-label="file successfully attached"
ref={attachFileAlertRef}
Expand All @@ -135,8 +136,13 @@
status="success"
onCloseEvent={handleSuccessAlertClose}
>
<p className="vads-u-margin-bottom--0">File attached</p>
<h3
slot="headline"
className="vads-u-margin-bottom--0 vads-u-font-size--base vads-font-family-sans-serif"
>
File attached
</h3>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this h3 suggested by a11y? trying to see the rationale behind replacing p with heading tag

<button

Check warning on line 145 in src/applications/mhv/secure-messaging/components/AttachmentsList.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/components/AttachmentsList.jsx:145:13:The <va-button> Web Component should be used instead of the button HTML element.
className="close-success-alert-button vads-u-padding--0p5"
id="close-success-alert-button"
data-testid="close-success-alert-button"
Expand Down Expand Up @@ -186,7 +192,7 @@
<span>{file.name} </span>(
{getSize(file.size || file.attachmentSize)})
</span>
<button

Check warning on line 195 in src/applications/mhv/secure-messaging/components/AttachmentsList.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/components/AttachmentsList.jsx:195:19:The <va-button> Web Component should be used instead of the button HTML element.
type="button"
onClick={() => {
setIsModalVisible(true);
Expand Down
Expand Up @@ -3,6 +3,7 @@ import { VaAdditionalInfo } from '@department-of-veterans-affairs/component-libr

const BeforeMessageAddlInfo = () => (
<VaAdditionalInfo
uswds
trigger="Before you send a message"
disable-analytics={false}
disable-border={false}
Expand Down
Expand Up @@ -28,6 +28,7 @@ const CategoryInput = props => {

{categories?.length > 0 && (
<VaRadio
uswds
required
enable-analytics
data-testid="compose-message-categories"
Expand All @@ -38,6 +39,7 @@ const CategoryInput = props => {
>
{categories?.map((item, i) => (
<VaRadioOption
uswds
data-dd-privacy="mask"
data-testid="compose-category-radio-button"
data-dd-action-name="Compose Category Radio Button"
Expand Down
Expand Up @@ -162,7 +162,7 @@
setMessageBody('');
}
},
[recipients, draft],

Check warning on line 165 in src/applications/mhv/secure-messaging/components/ComposeForm/ComposeForm.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/components/ComposeForm/ComposeForm.jsx:165:5:React Hook useEffect has a missing dependency: 'defaultRecipientsList'. Either include it or remove the dependency array.
);

useEffect(() => {
Expand Down Expand Up @@ -197,7 +197,7 @@
}

// The Blocked Triage Group alert should stay visible until the draft is sent or user navigates away
}, []);

Check warning on line 200 in src/applications/mhv/secure-messaging/components/ComposeForm/ComposeForm.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/components/ComposeForm/ComposeForm.jsx:200:6:React Hook useEffect has missing dependencies: 'draft' and 'recipients'. Either include them or remove the dependency array.

useEffect(
() => {
Expand Down Expand Up @@ -228,7 +228,7 @@
.catch(setSendMessageFlag(false));
}
},
[sendMessageFlag, isSaving],

Check warning on line 231 in src/applications/mhv/secure-messaging/components/ComposeForm/ComposeForm.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/mhv/secure-messaging/components/ComposeForm/ComposeForm.jsx:231:5:React Hook useEffect has missing dependencies: 'attachments', 'category', 'currentFolder?.folderId', 'dispatch', 'draft?.messageId', 'history', 'messageBody', 'selectedRecipient', and 'subject'. Either include them or remove the dependency array.
);

useEffect(
Expand Down Expand Up @@ -560,6 +560,7 @@
<form className="compose-form" id="sm-compose-form">
{saveError && (
<VaModal
uswds
modalTitle={saveError.title}
onCloseEvent={() => {
setSaveError(null);
Expand All @@ -573,6 +574,7 @@
<p>{saveError.p1}</p>
{saveError.p2 && <p>{saveError.p2}</p>}
<va-button
uswds
text="Continue editing"
onClick={() => setSaveError(null)}
/>
Expand Down Expand Up @@ -620,6 +622,7 @@
!allTriageGroupsBlocked && (
<>
<VaSelect
uswds
enable-analytics
id="recipient-dropdown"
label="To"
Expand Down Expand Up @@ -665,6 +668,7 @@
<ViewOnlyDraftSection title={FormLabels.SUBJECT} body={subject} />
) : (
<va-text-input
uswds
label={FormLabels.SUBJECT}
required
type="text"
Expand All @@ -678,8 +682,6 @@
data-dd-privacy="mask"
data-dd-action-name="Compose Message Subject Input Field"
maxlength="50"
uswds
charcount
/>
)}
</div>
Expand All @@ -691,6 +693,7 @@
/>
) : (
<va-textarea
uswds
label={FormLabels.MESSAGE}
required
id="compose-message-body"
Expand Down
Expand Up @@ -21,6 +21,7 @@ const ComposeFormActionButtons = ({
<div className="compose-form-actions vads-u-display--flex vads-u-flex--1">
{!cannotReply && (
<va-button
uswds
text="Send"
label="Send"
id="send-button"
Expand Down
Expand Up @@ -23,6 +23,7 @@ const DraftSavedInfo = () => {
if (saveError) {
return (
<va-alert
uswds
background-only
class="last-save-time"
full-width="false"
Expand All @@ -40,6 +41,7 @@ const DraftSavedInfo = () => {
return (
<>
<va-alert
uswds
aria-live="polite"
background-only
class="last-save-time"
Expand Down
Expand Up @@ -139,6 +139,7 @@ const FileInput = props => {
/>

<va-button
uswds
onClick={useFileInput}
secondary
text={
Expand Down
Expand Up @@ -399,6 +399,7 @@ const ReplyDraftItem = props => {
<>
{saveError && (
<VaModal
uswds
modalTitle={saveError.title}
onPrimaryButtonClick={() => setSaveError(null)}
onCloseEvent={() => setSaveError(null)}
Expand Down Expand Up @@ -467,6 +468,7 @@ const ReplyDraftItem = props => {
</section>
) : (
<va-textarea
uswds
ref={textareaRef}
data-dd-privacy="mask"
label="Message"
Expand Down Expand Up @@ -526,6 +528,7 @@ const ReplyDraftItem = props => {
{draft.body}
</p>
<va-button
uswds
secondary
text={`Edit draft ${draftsequence}`}
id="edit-draft-button"
Expand Down
Expand Up @@ -36,6 +36,8 @@ const CrisisLineConnectButton = () => {

return (
<va-button
class="vads-u-margin-y--1"
uswds
secondary="true"
text="Connect with the Veterans Crisis Line"
onClick={e => {
Expand Down
Expand Up @@ -35,7 +35,7 @@ const DashboardUnreadMessages = props => {
);

return (
<va-alert status="info" visible>
<va-alert status="info" visible uswds>
{unreadCountHeader}
<div className="vads-u-margin-top--1p5">
<Link
Expand Down
Expand Up @@ -46,6 +46,7 @@ const EmergencyNote = props => {
</va-alert-expandable>
) : (
<va-alert
uswds
background-only
class="vads-u-margin-bottom--1"
close-btn-aria-label="Close notification"
Expand Down
Expand Up @@ -17,8 +17,8 @@ const FrequentlyAskedQuestions = ({ prefLink }) => {
<h2 className="vads-u-margin-top--1">
Questions about this messaging tool
</h2>
<va-accordion open-single bordered>
<va-accordion-item data-testid="faq-accordion-item">
<va-accordion uswds open-single bordered>
<va-accordion-item uswds data-testid="faq-accordion-item">
<h3 slot="headline">Who can I send messages to?</h3>
<p>
You can send messages to VA providers and staff on your care team.
Expand Down Expand Up @@ -59,7 +59,7 @@ const FrequentlyAskedQuestions = ({ prefLink }) => {
</p>
</va-accordion-item>

<va-accordion-item data-testid="faq-accordion-item">
<va-accordion-item uswds data-testid="faq-accordion-item">
<h3 slot="headline">
What if I have an emergency or an urgent question?
</h3>
Expand Down Expand Up @@ -92,7 +92,7 @@ const FrequentlyAskedQuestions = ({ prefLink }) => {
</ul>
</va-accordion-item>

<va-accordion-item data-testid="faq-accordion-item">
<va-accordion-item uswds data-testid="faq-accordion-item">
<h3 slot="headline">
Will VA protect my personal health information?
</h3>
Expand All @@ -107,7 +107,7 @@ const FrequentlyAskedQuestions = ({ prefLink }) => {
</p>
</va-accordion-item>

<va-accordion-item data-testid="faq-accordion-item">
<va-accordion-item uswds data-testid="faq-accordion-item">
<h3 slot="headline">
What happened to my settings from My HealtheVet secure messaging?
</h3>
Expand Down Expand Up @@ -136,7 +136,7 @@ const FrequentlyAskedQuestions = ({ prefLink }) => {
</p>
</va-accordion-item>

<va-accordion-item data-testid="faq-accordion-item">
<va-accordion-item uswds data-testid="faq-accordion-item">
<h3 slot="headline">
Will I need to pay a copay for using this messaging tool?
</h3>
Expand Down Expand Up @@ -174,8 +174,8 @@ const FrequentlyAskedQuestions = ({ prefLink }) => {
<div className="secure-messaging-faq">
<h2 className="vads-u-margin-top--1">Questions about using messages</h2>

<va-accordion open-single>
<va-accordion-item data-testid="faq-accordion-item">
<va-accordion uswds open-single>
<va-accordion-item uswds data-testid="faq-accordion-item">
<h3 slot="headline">Who can I communicate with in messages?</h3>
<p>
You can communicate with VA providers on your care team. Most VA
Expand Down Expand Up @@ -213,7 +213,7 @@ const FrequentlyAskedQuestions = ({ prefLink }) => {
</p>
</va-accordion-item>

<va-accordion-item data-testid="faq-accordion-item">
<va-accordion-item uswds data-testid="faq-accordion-item">
<h3 slot="headline">
What if I have an emergency or an urgent question?
</h3>
Expand All @@ -231,6 +231,8 @@ const FrequentlyAskedQuestions = ({ prefLink }) => {
or night.
<br />
<va-button
uswds
class="vads-u-margin-y--1"
secondary="true"
text="Connect with the Veterans Crisis Line"
onClick={openCrisisModal}
Expand All @@ -244,7 +246,7 @@ const FrequentlyAskedQuestions = ({ prefLink }) => {
</ul>
</va-accordion-item>

<va-accordion-item data-testid="faq-accordion-item">
<va-accordion-item uswds data-testid="faq-accordion-item">
<h3 slot="headline">
Will VA protect my personal health information?
</h3>
Expand All @@ -259,7 +261,7 @@ const FrequentlyAskedQuestions = ({ prefLink }) => {
</p>
</va-accordion-item>

<va-accordion-item data-testid="faq-accordion-item">
<va-accordion-item uswds data-testid="faq-accordion-item">
<h3 slot="headline">
What happened to my settings from My HealtheVet secure messaging?
</h3>
Expand Down
Expand Up @@ -4,6 +4,7 @@ import { VaAdditionalInfo } from '@department-of-veterans-affairs/component-libr
const HowToAttachFiles = () => {
return (
<VaAdditionalInfo
uswds
trigger="What to know about attaching files"
disable-analytics={false}
disable-border={false}
Expand Down
Expand Up @@ -144,6 +144,7 @@ const ManageFolderButtons = props => {
)}
{isEmptyWarning && (
<VaModal
uswds
className="modal"
data-testid="error-folder-not-empty"
visible={isEmptyWarning}
Expand All @@ -156,6 +157,7 @@ const ManageFolderButtons = props => {
>
<p>{Alerts.Folder.DELETE_FOLDER_ERROR_NOT_EMPTY_BODY}</p>
<va-button
uswds
ref={emptyFolderConfirmBtn}
text="Ok"
onClick={() => {
Expand All @@ -166,6 +168,7 @@ const ManageFolderButtons = props => {
)}
{!isEmptyWarning && (
<VaModal
uswds
className="modal"
data-testid="remove-this-folder"
visible={deleteModal}
Expand All @@ -176,12 +179,14 @@ const ManageFolderButtons = props => {
>
<p>{Alerts.Folder.DELETE_FOLDER_CONFIRM_BODY}</p>
<va-button
uswds
ref={removeButton}
text="Yes, remove this folder"
onClick={confirmDelFolder}
data-dd-action-name="Confirm Remove Folder Button"
/>
<va-button
uswds
secondary
text="No, keep this folder"
onClick={closeDelModal}
Expand All @@ -190,6 +195,7 @@ const ManageFolderButtons = props => {
</VaModal>
)}
<VaModal
uswds
className="modal"
data-testid="rename-folder-modal"
visible={renameModal}
Expand All @@ -199,6 +205,7 @@ const ManageFolderButtons = props => {
data-dd-action-name="Rename Folder Modal Closed"
>
<VaTextInput
uswds
data-dd-privacy="mask"
ref={folderNameInput}
label={Alerts.Folder.CREATE_FOLDER_MODAL_LABEL}
Expand All @@ -215,11 +222,13 @@ const ManageFolderButtons = props => {
charcount
/>
<va-button
uswds
text="Save"
onClick={confirmRenameFolder}
data-dd-action-name="Save Rename Folder Button"
/>
<va-button
uswds
secondary="true"
text="Cancel"
onClick={closeRenameModal}
Expand Down