Improve user feedback and modal behavior in ErrorReportModal and PolicyUpdateModal

This commit is contained in:
Mo Tarbin
2026-08-16 01:26:28 -04:00
parent 5c71e4ce58
commit 2480049fd1
2 changed files with 11 additions and 5 deletions

View File

@@ -329,7 +329,7 @@ const ErrorReportModal = ({ error, errorInfo, onClose, open }) => {
level='body-sm'
sx={{ color: 'text.secondary', mt: 0.5 }}
>
Thanks this goes straight to the people who can fix it.
Thanks! this goes straight to the people who can fix it.
</Typography>
</Box>

View File

@@ -27,13 +27,16 @@ const PolicyUpdateModal = ({ onAcknowledge, onClose, open }) => {
const { t } = useTranslation()
const { ResponsiveModal } = useResponsiveModal()
const handleClose = () => {
// Acknowledgement is the only way out: the backdrop, escape key, and close
// button are all disabled so the user must press "Got it".
const handleAcknowledge = () => {
onAcknowledge?.()
onClose()
}
// Reading a document must not dismiss the notice; the modal is still waiting
// on an acknowledgement when the user returns from the browser.
const openDocument = path => {
handleClose()
openUrl(`${POLICY_BASE_URL}${path}`)
}
@@ -47,7 +50,10 @@ const PolicyUpdateModal = ({ onAcknowledge, onClose, open }) => {
return (
<ResponsiveModal
open={open}
onClose={handleClose}
onClose={handleAcknowledge}
closeOnBackdrop={false}
closeOnEscape={false}
showCloseButton={false}
size='sm'
title={t('policyUpdate.title')}
description={t('policyUpdate.subtitle')}
@@ -55,7 +61,7 @@ const PolicyUpdateModal = ({ onAcknowledge, onClose, open }) => {
<ModalActions
primary={{
label: t('policyUpdate.acknowledge'),
onClick: handleClose,
onClick: handleAcknowledge,
sx: { width: { xs: '100%', sm: 'auto' } },
}}
/>