Skip to content

Commit

Permalink
fix: support changed field name (#1218)
Browse files Browse the repository at this point in the history
tomogram.isStandardized -> tomogram.isPortalStandard

NOTE: we should decide how/when we want to deploy this fix.
  • Loading branch information
jgadling authored Oct 8, 2024
1 parent 5eb53f0 commit c0684b8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function TomogramSelectorInputLabel({
<span className="text-sds-color-primitive-gray-500 font-normal">
{t('unitAngstrom', { value: tomogram.voxelSpacing })}
</span>
{tomogram.isStandardized && <TomogramTypeBadge type="standard" />}
{tomogram.isPortalStandard && <TomogramTypeBadge type="standard" />}
</div>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function TomogramSelectorOption({
</div>
<div className="text-sds-body-xxs text-sds-color-primitive-gray-500 font-normal">
{t('tomogramId')}: {IdPrefix.Tomogram}-{tomogram.id}{' '}
{tomogram.isStandardized && (
{tomogram.isPortalStandard && (
<TomogramTypeBadge type="standard" size="small" />
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function TomogramsTable() {
</div>
<div className="flex items-center flex-wrap gap-sds-xs text-sds-body-xxs">
{`${t('tomogramId')}: ${IdPrefix.Tomogram}-${original.id}`}
{original.isStandardized && (
{original.isPortalStandard && (
<TomogramTypeBadge type="standard" showTooltip />
)}
</div>
Expand Down Expand Up @@ -159,7 +159,7 @@ export function TomogramsTable() {
cell: ({ row: { original } }) => (
<TableCell width={TomogramTableWidths.actions}>
<div className="flex flex-col gap-sds-xs items-start">
{original.neuroglancerConfig != null && ( // TODO(bchu): Check it's either isStandardized or isAuthorSubmitted
{original.neuroglancerConfig != null && ( // TODO(bchu): Check it's either isPortalStandard or isAuthorSubmitted
<ViewTomogramButton
tomogramId={original.id.toString()}
neuroglancerConfig={original.neuroglancerConfig}
Expand Down
4 changes: 2 additions & 2 deletions frontend/packages/data-portal/app/graphql/getRunByIdDiffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function logIfHasDiff(
// Tomogram deposition relations in V1 are incomplete.
delete tomogram.deposition
// Standard tomograms are V2 only.
tomogram.isStandardized = false
tomogram.isPortalStandard = false
}
// Frames are not populated in V2 yet.
for (const run of v2.runs) {
Expand Down Expand Up @@ -175,7 +175,7 @@ export function logIfHasDiff(
tomogram.fiducial_alignment_status as Fiducial_Alignment_Status_Enum,
httpsMrcFile: tomogram.https_mrc_scale0,
id: tomogram.id,
isStandardized: false,
isPortalStandard: false,
// isAuthorSubmitted: tomogram.is_canonical, TODO(bchu): Uncomment when populated in V2.
keyPhotoThumbnailUrl: tomogram.key_photo_thumbnail_url,
keyPhotoUrl: tomogram.key_photo_url,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const GET_RUN_BY_ID_QUERY_V2 = gql(`
fiducialAlignmentStatus
httpsMrcFile
id
isStandardized
isPortalStandard
keyPhotoThumbnailUrl
keyPhotoUrl
name
Expand Down

0 comments on commit c0684b8

Please sign in to comment.