-
Notifications
You must be signed in to change notification settings - Fork 179
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
Merged
TamarZanzouri
merged 16 commits into
chore_release-8.0.0
from
RQA-2923-odd-not-showing-view-error-details-for-a-run-that-ended-with-errors
Aug 12, 2024
Merged
Changes from 8 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9bc4866
small bug fixes
TamarZanzouri 5d20145
banner colors and warnings/errors
TamarZanzouri 91523b5
WIP odd warnings
TamarZanzouri 8d8113a
plurale warnings/errors
TamarZanzouri d850730
revert debug change
TamarZanzouri f7e5db1
text localization
TamarZanzouri b3993b4
run status injection
TamarZanzouri 713b9c4
pluralization
TamarZanzouri 8fb6aa0
plural try
TamarZanzouri 5da9748
fixed failing test and removed redundant
TamarZanzouri 1e02e9d
formatting
TamarZanzouri 12511b5
reverted plurar changes
TamarZanzouri e4ddf56
run completed with warnings odd
TamarZanzouri f4c54e2
linting fix
TamarZanzouri a1af052
Merge branch 'chore_release-8.0.0' into RQA-2923-odd-not-showing-view…
TamarZanzouri da53912
removed redundant test
TamarZanzouri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,12 @@ import { SmallButton } from '../../../atoms/buttons' | |
import { Modal } from '../../../molecules/Modal' | ||
|
||
import type { ModalHeaderBaseProps } from '../../../molecules/Modal/types' | ||
import type { RunCommandErrors, RunError } from '@opentrons/api-client' | ||
import type { | ||
RunCommandErrors, | ||
RunError, | ||
RunStatus, | ||
} from '@opentrons/api-client' | ||
import { RUN_STATUS_SUCCEEDED } from '@opentrons/api-client' | ||
|
||
import type { RunCommandError } from '@opentrons/shared-data' | ||
|
||
|
@@ -29,13 +34,15 @@ interface RunFailedModalProps { | |
setShowRunFailedModal: (showRunFailedModal: boolean) => void | ||
errors?: RunError[] | ||
commandErrorList?: RunCommandErrors | ||
runStatus: RunStatus | null | ||
} | ||
|
||
export function RunFailedModal({ | ||
runId, | ||
setShowRunFailedModal, | ||
errors, | ||
commandErrorList, | ||
runStatus, | ||
}: RunFailedModalProps): JSX.Element | null { | ||
const { t, i18n } = useTranslation(['run_details', 'shared', 'branded']) | ||
const navigate = useNavigate() | ||
|
@@ -48,7 +55,12 @@ export function RunFailedModal({ | |
) | ||
return null | ||
const modalHeader: ModalHeaderBaseProps = { | ||
title: t('run_failed_modal_title'), | ||
title: | ||
commandErrorList == null || commandErrorList?.data.length === 0 | ||
? t('run_failed_modal_title') | ||
: runStatus === RUN_STATUS_SUCCEEDED | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same thing re: plural details |
||
? t('warning_details') | ||
: t('error_details'), | ||
} | ||
|
||
const highestPriorityError = getHighestPriorityError(errors ?? []) | ||
|
@@ -85,7 +97,13 @@ export function RunFailedModal({ | |
errorType: errors[0].errorType, | ||
errorCode: errors[0].errorCode, | ||
}) | ||
: `${errors.length} errors`} | ||
: runStatus === RUN_STATUS_SUCCEEDED | ||
? t(errors.length > 1 ? 'no_of_warnings' : 'no_of_warning', { | ||
count: errors.length, | ||
}) | ||
: t(errors.length > 1 ? 'no_of_errors' : 'no_of_error', { | ||
count: errors.length, | ||
})} | ||
</LegacyStyledText> | ||
<Flex | ||
width="100%" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!