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: lab value display #2931

Merged
merged 16 commits into from
Nov 22, 2024
Merged

fix: lab value display #2931

merged 16 commits into from
Nov 22, 2024

Conversation

mcmcgrath13
Copy link
Collaborator

@mcmcgrath13 mcmcgrath13 commented Nov 18, 2024

PULL REQUEST

Summary

Allow lab values to pass through as html more generally. This enables formatting to be preserved.

It turned into a bit of a bigger rabbit hole than I hoped to do this in a way that felt safe and not too hacky. I introduced a new RenderableNode type that is a subset of React.ReactNode that better reflects the data at hand. This cuts down the number of branches for typescript to complain about (and also for my head to hold).

I also moved parsing into sanitizeAndMap as they were always used in conjunction. This is now named safeParse and does some extra handling on the output to ensure we have a RenderableNode and not the broader ReactNode.

Related Issue

Fixes #2728
Fixes #2932

Additional Information

image image

@mcmcgrath13 mcmcgrath13 marked this pull request as ready for review November 19, 2024 22:55
Copy link
Collaborator

@BobanL BobanL left a comment

Choose a reason for hiding this comment

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

2 super tiny nits and an issue with empty tags not display no data.

@mcmcgrath13 mcmcgrath13 requested a review from BobanL November 21, 2024 23:08
Copy link
Collaborator

@BobanL BobanL left a comment

Choose a reason for hiding this comment

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

👍 Looks great

containers/ecr-viewer/seed-scripts/create-seed-data.py Outdated Show resolved Hide resolved
@mcmcgrath13 mcmcgrath13 added this pull request to the merge queue Nov 22, 2024
Merged via the queue into main with commit c4b741e Nov 22, 2024
15 checks passed
@mcmcgrath13 mcmcgrath13 deleted the mcm/lab-note-formatting branch November 22, 2024 16:26
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.

BUG: Narrative formatting is incorrect in Maine2 example BUG: Lab narrative needs line breaks
2 participants