Skip to content

Commit

Permalink
rushing to fix a heisen-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfischetti committed Jan 21, 2025
1 parent f32073d commit 85063af
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 94 deletions.
12 changes: 7 additions & 5 deletions app/components/Viewers/ObjectView/ObjectView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,17 @@ export const ObjectView = ({ mainAPIPayload, exhibitionsPayload, constituentsPay
<Content className={ styles['content'] ?? "" }>
<div className={ styles['left'] }>
<Tombstone
Title={ Title }
Display_Name={ Display_Name }
Display_Date={ Display_Date }
Medium={ Medium } />
Title={ Title ?? "(no title)" }
Display_Name={ Display_Name ?? "(no display name)" }
Display_Date={ Display_Date ?? "(no display date)" }
Medium={ Medium ?? "(no medium)" } />
{ cons }
{ exhs }
</div>
<div className={ styles['right'] }>
<ThumbnailHolder imageLink={ Link } />
{ Link ?
<ThumbnailHolder imageLink={ Link } /> :
<></> }
<KeyValueTable payload={ mainAPIPayload } />
</div>
</Content>
Expand Down
24 changes: 22 additions & 2 deletions lib/column-definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,27 @@ const fieldClip = (s: string) => clipStringAtLengthN(s, FIELD_CHARACTER_LIMIT);
columnDefs = addNewKeyValToColumnDefs(columnDefs, 'main', 'Title', 'render', titleClip);

/* other fields that have to be tamed */
const mainFieldsToClip = ["Home_Location", "Dimensions"]
const mainFieldsToClip = [
"Bibliography",
"Provenance",
"Notes",
"Description",
"Provenance",
"Description",
"CreditLine",
"Inscribed",
"Markings",
"Portfolio",
"Collection",
"Home_Location",
"Series",
"Descriptive_Title",
"Folder",
"Non_Display_Title",
"Depicted_Location",
"Institution",
"CuratorialRemarks"
];
mainFieldsToClip.forEach(field => {
columnDefs = addNewKeyValToColumnDefs(columnDefs, 'main', field, 'render', fieldClip);
});
Expand All @@ -50,7 +70,7 @@ columnDefs = addNewKeyValToColumnDefs(columnDefs, 'main', 'Object_Number', 'rend

/* I have just discovered: some fields are more searchable than others */
const mainNonSearchableFields = [
"Object_ID", "Home_Location", "Dimensions"
"Object_ID", "Home_Location"
];
mainNonSearchableFields.forEach(field => {
columnDefs = addNewKeyValToColumnDefs(columnDefs, 'main', field, 'searchable', 'false');
Expand Down
86 changes: 1 addition & 85 deletions lib/proto-column-definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,6 @@ export const protoColumnDefs = {
"data": "Object_Count",
"title": "Object Count"
},
{
"data": "Dimensions",
"title": "Dimensions"
},
{
"data": "BeginDate",
"title": "BeginDate"
Expand All @@ -218,10 +214,6 @@ export const protoColumnDefs = {
"data": "EndDate",
"title": "EndDate"
},
{
"data": "GeoSearchValue",
"title": "GeoSearchValue"
},
{
"data": "Collection",
"title": "Collection"
Expand Down Expand Up @@ -250,10 +242,6 @@ export const protoColumnDefs = {
"data": "Non_Display_Title",
"title": "Non Display Title"
},
{
"data": "Link",
"title": "Link"
},
{
"data": "Display_Name",
"title": "Display Name"
Expand All @@ -262,18 +250,6 @@ export const protoColumnDefs = {
"data": "Institution",
"title": "Institution"
},
{
"data": "After",
"title": "After"
},
{
"data": "Explicit_Artist",
"title": "Explicit Artist"
},
{
"data": "Compiler",
"title": "Compiler"
},
{
"data": "Editor",
"title": "Editor"
Expand Down Expand Up @@ -302,26 +278,6 @@ export const protoColumnDefs = {
"data": "Subject",
"title": "Subject"
},
{
"data": "Country",
"title": "Country"
},
{
"data": "State",
"title": "State"
},
{
"data": "County",
"title": "County"
},
{
"data": "City",
"title": "City"
},
{
"data": "Locus",
"title": "Locus"
},
{
"data": "Signed",
"title": "Signed"
Expand All @@ -338,10 +294,6 @@ export const protoColumnDefs = {
"data": "CreditLine",
"title": "CreditLine"
},
{
"data": "Chat",
"title": "Chat"
},
{
"data": "Description",
"title": "Description"
Expand All @@ -354,10 +306,6 @@ export const protoColumnDefs = {
"data": "Provenance",
"title": "Provenance"
},
{
"data": "PubReferences",
"title": "PubReferences"
},
{
"data": "CuratorialRemarks",
"title": "CuratorialRemarks"
Expand All @@ -366,45 +314,13 @@ export const protoColumnDefs = {
"data": "RelatedWorks",
"title": "RelatedWorks"
},
{
"data": "PublicAccess",
"title": "PublicAccess"
},
{
"data": "PaperFileRef",
"title": "PaperFileRef"
},
{
"data": "UserNumber1",
"title": "UserNumber1"
},
{
"data": "ObjectState",
"title": "ObjectState"
},
{
"data": "HistAttributions",
"title": "HistAttributions"
},
{
"data": "Bibliography",
"title": "Bibliography"
},
{
"data": "Edition",
"title": "Edition"
},
{
"data": "PaperSupport",
"title": "PaperSupport"
},
{
"data": "IsTemplate",
"title": "IsTemplate"
},
{
"data": "DateRemarks",
"title": "DateRemarks"
}
]
};
};
3 changes: 2 additions & 1 deletion mk-ppd-db/make-schema-p.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bun
// @ts-nocheck
// #!/usr/bin/env bun

/**
* only "supports" SQLite for now
Expand Down
3 changes: 2 additions & 1 deletion mk-ppd-db/scripts/validate-in.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bun
// @ts-nocheck
// #!/usr/bin/env bun

import { readFileSync } from 'node:fs';
import Ajv2020 from 'ajv/dist/2020.js';
Expand Down

0 comments on commit 85063af

Please sign in to comment.