Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

[terra-clinical-item-view] Fix for null item displays #924

Merged
merged 6 commits into from
Oct 9, 2023

Conversation

trandrew1023
Copy link
Contributor

@trandrew1023 trandrew1023 commented Oct 6, 2023

Summary

What was changed:

  • Error is thrown when null displays prop is passed in, added check (didn't use ? here for readability)
  • Error is also thrown when displays contains a null item display in the array and a check was added as well

Why it was changed:

  • Consumers sometimes pass in null to displays prop and get an error with the latest changes

Testing

This change was tested using:

  • WDIO
  • Jest
  • Visual testing (please attach a screenshot or recording)
  • Other (please describe below)
  • No tests are needed

Before:
image

After:
image

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

Additional Details

This PR resolves:

UXPLATFORM-9711


Thank you for contributing to Terra.
@cerner/terra

@trandrew1023 trandrew1023 changed the title Fix for null item displays [terra-clinical-item-view] Fix for null item displays Oct 6, 2023
@smason0
Copy link
Contributor

smason0 commented Oct 6, 2023

Based on the referenced defect, it sounds like the issue seen by the consumer is around displays containing null values, rather than the displays itself being null (although we should also guard against this). The consuming app breaks when trying to reference the props from the displays array value.

@trandrew1023
Copy link
Contributor Author

Based on the referenced defect, it sounds like the issue seen by the consumer is around displays containing null values, rather than the displays itself being null (although we should also guard against this). The consuming app breaks when trying to reference the props from the displays array value.

@smason0 omg really good catch, for some reason I assumed based on the description in the Jira but didn't realize the code snippet was pointing to that. I added the check in this commit c861937#diff-a09eb4a886b729c86a83daac740d9a14a92e66fe733a7a907899150b7fdae956

Copy link
Contributor

@smason0 smason0 left a comment

Choose a reason for hiding this comment

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

+1 with passing build

@github-actions github-actions bot temporarily deployed to preview-pr-924 October 9, 2023 16:05 Destroyed
@adoroshk adoroshk merged commit 212b64d into main Oct 9, 2023
22 checks passed
@adoroshk adoroshk deleted the item-view-error branch October 9, 2023 18:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants