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

Encapsulate the row rendering logic in a separate component #27

Merged
merged 10 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/completed-list/completed-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ const CustomTableRow: React.FC<TableRowProps> = ({ entry }) => {
return (
<TableRow key={uuid}>
<TableCell>
<span className="single-line-content">
{formatDate(parseDate(dateActivated))}
</span>
<span>{formatDate(parseDate(dateActivated))}</span>
</TableCell>
<TableCell>
<span>{orderNumber}</span>
Expand Down
6 changes: 0 additions & 6 deletions src/completed-list/completed-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,3 @@ title {
margin-bottom: 0.5rem;
}

.single-line-content {
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
4 changes: 3 additions & 1 deletion src/queue-list/laboratory-patient-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ const LaboratoryPatientList: React.FC<LaboratoryPatientListProps> = () => {
date: {
content: (
<>
<span>{formatDate(parseDate(entry.dateActivated))}</span>
<span className={styles.table}>
Copy link
Member

Choose a reason for hiding this comment

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

Same change will apply here

Copy link
Member Author

Choose a reason for hiding this comment

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

Resolved

{formatDate(parseDate(entry.dateActivated))}
</span>
</>
),
},
Expand Down
7 changes: 6 additions & 1 deletion src/queue-list/laboratory-queue.scss
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,9 @@ title {
@include type.type-style('heading-compact-02');
color: $text-02;
margin-bottom: 0.5rem;
}
}

Copy link
Member

Choose a reason for hiding this comment

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

Let's change this to something more intentional and also not to conflict with other usages. What do u think of changing it to .single-line-display

.table {
white-space: nowrap;
}

Loading