From 2ce2c026100cee6aae441decfcd48d2b82ee9e59 Mon Sep 17 00:00:00 2001 From: Matt Bevilacqua Date: Mon, 4 Nov 2024 10:15:16 -0500 Subject: [PATCH 1/2] Fix assorted markup issues (nesting, empty tags) --- frontend/src/components/AvatarGroup.js | 23 +++++++++++++++++++ .../FileUploader/DeleteFileModal.js | 2 +- .../src/components/FileUploader/FileTable.js | 5 ++-- frontend/src/components/HeaderUserMenu.js | 21 +++++++++-------- frontend/src/pages/AccountManagement/index.js | 7 ++---- .../pages/__tests__/sessionSummary.js | 4 ++-- 6 files changed, 42 insertions(+), 20 deletions(-) create mode 100644 frontend/src/components/AvatarGroup.js diff --git a/frontend/src/components/AvatarGroup.js b/frontend/src/components/AvatarGroup.js new file mode 100644 index 0000000000..b5bea934c5 --- /dev/null +++ b/frontend/src/components/AvatarGroup.js @@ -0,0 +1,23 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import Avatar from './Avatar'; + +const AvatarGroup = ({ userName, className }) => ( +

+ + + {userName} + +

+); + +AvatarGroup.propTypes = { + userName: PropTypes.string.isRequired, + className: PropTypes.string, +}; + +AvatarGroup.defaultProps = { + className: 'padding-2', +}; + +export default AvatarGroup; diff --git a/frontend/src/components/FileUploader/DeleteFileModal.js b/frontend/src/components/FileUploader/DeleteFileModal.js index b48427ba5b..961dfe501a 100644 --- a/frontend/src/components/FileUploader/DeleteFileModal.js +++ b/frontend/src/components/FileUploader/DeleteFileModal.js @@ -18,7 +18,7 @@ const DeleteFileModal = ({ modalId="DeleteFileModal" title="Delete File" okButtonText="Delete" - okButtonAriaLabel="This button will permanently delete the file." + okButtonAriaLabel="Confirm delete" >

Are you sure you want to delete diff --git a/frontend/src/components/FileUploader/FileTable.js b/frontend/src/components/FileUploader/FileTable.js index 6b7ceae980..99fcf24af8 100644 --- a/frontend/src/components/FileUploader/FileTable.js +++ b/frontend/src/components/FileUploader/FileTable.js @@ -63,8 +63,9 @@ const FileTable = ({ onFileRemoved, files }) => { Status - - + + Remove file + diff --git a/frontend/src/components/HeaderUserMenu.js b/frontend/src/components/HeaderUserMenu.js index 4f34561255..6f8f4745cc 100644 --- a/frontend/src/components/HeaderUserMenu.js +++ b/frontend/src/components/HeaderUserMenu.js @@ -5,6 +5,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faUpRightFromSquare } from '@fortawesome/free-solid-svg-icons'; import { useLocation } from 'react-router-dom'; import Avatar from './Avatar'; +import AvatarGroup from './AvatarGroup'; import DropdownMenu from './DropdownMenu'; import './HeaderUserMenu.scss'; import NavLink from './NavLink'; @@ -19,8 +20,10 @@ function UserMenuNav({ items }) { return (