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

fix(app, odd): run summery error list bug fixes #15953

Conversation

TamarZanzouri
Copy link
Contributor

@TamarZanzouri TamarZanzouri commented Aug 9, 2024

Overview

Closes RQA-2923.
show warnings/errors depending on the run status.
modal header.
show error details on ODD if run completed with errors.

Test Plan and Hands on Testing

  • run a protocol with ER errors on ODD and desktop app.
  • make sure that when the run is complete you are able to see the list of errors.
  • warnings shown when run is successfully completed, errors if canceled or failed.

Changelog

  • inject run status to RunFailedModal.
  • changed modal title
  • changed text to show warnings/errors depending on the run status.
  • ODD - show view error details if there is an error list.

Risk assessment

low. bug fixes.

@TamarZanzouri TamarZanzouri requested a review from a team as a code owner August 9, 2024 17:02
@TamarZanzouri TamarZanzouri requested review from smb2268, sfoster1 and mjhuff and removed request for a team and smb2268 August 9, 2024 17:02
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Missed this before, but these texts should be in an i18next lookup with its built-in pluralization logic

@@ -43,7 +43,6 @@ export function ModalHeader(props: ModalHeaderBaseProps): JSX.Element {
color={iconColor}
size="2rem"
alignSelf={ALIGN_CENTER}
marginRight={SPACING.spacing16}
Copy link
Member

Choose a reason for hiding this comment

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

really? this will affect all the rest of the modals on the ODD

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we have a gap in the div above it. I think we can remove this. can test more if needed!

app/src/organisms/Devices/ProtocolRun/RunFailedModal.tsx Outdated Show resolved Hide resolved
@TamarZanzouri TamarZanzouri requested a review from sfoster1 August 9, 2024 18:45
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Internationalization still not quite right I'm afraid

@@ -95,7 +107,9 @@ export function RunFailedModal({
errorType: errors[0].errorType,
errorCode: errors[0].errorCode,
})
: `${errors.length} errors`}
: `${errors.length} ${
runStatus === RUN_STATUS_SUCCEEDED ? t('warning') : t('error')
Copy link
Member

Choose a reason for hiding this comment

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

this won't translate properly, right? if you translated it into say chinese, if there was more than one error it would have an "s" at the end of the chinese characters, and because the translation isn't number-aware it wouldn't have the right counting word. we should be using the i18n pluralization tools here

title:
commandErrorList == null || commandErrorList?.data.length === 0
? t('run_failed_modal_title')
: runStatus === RUN_STATUS_SUCCEEDED
Copy link
Member

Choose a reason for hiding this comment

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

same thing re: plural details

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

approving to unblock, but we should do the pluralization thing

@TamarZanzouri
Copy link
Contributor Author

approving to unblock, but we should do the pluralization thing

we probably need to update the packages. will do this in another pr/release. for now reverted the plural changs.

Copy link
Contributor

@mjhuff mjhuff left a comment

Choose a reason for hiding this comment

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

Nice! I haven't had the time to test it myself yet, but the code looks good.

Feel free to merge after CI passes. Thank you for the changes!

@TamarZanzouri TamarZanzouri merged commit b99e7c2 into chore_release-8.0.0 Aug 12, 2024
25 checks passed
@TamarZanzouri TamarZanzouri deleted the RQA-2923-odd-not-showing-view-error-details-for-a-run-that-ended-with-errors branch August 20, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants