From 726bd76ff49ee410b938495a94c0e18437674503 Mon Sep 17 00:00:00 2001 From: Eddie Arevalo Date: Thu, 12 Dec 2024 08:07:34 -0800 Subject: [PATCH 01/10] Update Search Result Page Type #139 -Updated page type value that is shown in the search results details. --- apps/frontend/src/pages/search/index.tsx | 22 +++++++++---------- .../src/types/solrSearchResponse.d.ts | 1 + 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/frontend/src/pages/search/index.tsx b/apps/frontend/src/pages/search/index.tsx index 1e30180..778a1fd 100644 --- a/apps/frontend/src/pages/search/index.tsx +++ b/apps/frontend/src/pages/search/index.tsx @@ -1259,7 +1259,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: "Data Bundle", + data: doc.page_type, verticalAlign: "center", width: 1, }, @@ -1347,7 +1347,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: "Data Collection", + data: doc.page_type, verticalAlign: "center", width: 1, }, @@ -1433,7 +1433,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: "Data Set", + data: doc.page_type, verticalAlign: "center", width: 1, }, @@ -1507,7 +1507,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: "Facility", + data: doc.page_type, verticalAlign: "center", width: 1, }, @@ -1559,7 +1559,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: "Instrument", + data: doc.page_type, verticalAlign: "center", width: 1, }, @@ -1612,7 +1612,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: "Instrument Host", + data: doc.page_type, verticalAlign: "center", width: 1, }, @@ -1678,7 +1678,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: "Investigation", + data: doc.page_type, verticalAlign: "center", width: 1, }, @@ -1743,7 +1743,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: "Resource", + data: doc.page_type, verticalAlign: "center", width: 1, }, @@ -1780,7 +1780,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: "Target", + data: doc.page_type, verticalAlign: "center", width: 1, }, @@ -1820,7 +1820,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: "Telescope", + data: doc.page_type, verticalAlign: "center", width: 1, }, @@ -1861,7 +1861,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: "Tool", + data: doc.page_type, verticalAlign: "center", width: 1, }, diff --git a/apps/frontend/src/types/solrSearchResponse.d.ts b/apps/frontend/src/types/solrSearchResponse.d.ts index b12b2f3..929a303 100644 --- a/apps/frontend/src/types/solrSearchResponse.d.ts +++ b/apps/frontend/src/types/solrSearchResponse.d.ts @@ -50,6 +50,7 @@ type IdentifierNameResponse = { } type SearchResultDoc = { + page_type: string; file_ref_location: string[]; data_class: string[]; description: string[]; From a26eefd86e7d1dc6f61fe45815094d81fae53bc2 Mon Sep 17 00:00:00 2001 From: Eddie Arevalo Date: Tue, 17 Dec 2024 13:26:16 -0800 Subject: [PATCH 02/10] Add Solr String To String Array Flexibility #137 -Added an expected type that the client will expect from solr. It will then convert all values to arrays and use that type instead. -This is so that as solr is being updated between strings or string arrays it won't break the client due to unexpected type. --- .../src/components/HomeSearch/HomeSearch.tsx | 9 +- apps/frontend/src/pages/search/index.tsx | 24 +- apps/frontend/src/pages/search/searchUtils.ts | 218 +++++++++++++++++- .../src/types/solrSearchResponse.d.ts | 21 +- .../src/types/solrSearchResponseExpected.d.ts | 132 +++++++++++ 5 files changed, 367 insertions(+), 37 deletions(-) create mode 100644 apps/frontend/src/types/solrSearchResponseExpected.d.ts diff --git a/apps/frontend/src/components/HomeSearch/HomeSearch.tsx b/apps/frontend/src/components/HomeSearch/HomeSearch.tsx index 0b2dc1c..7e87b8d 100644 --- a/apps/frontend/src/components/HomeSearch/HomeSearch.tsx +++ b/apps/frontend/src/components/HomeSearch/HomeSearch.tsx @@ -27,6 +27,7 @@ import { import { mapFilterIdsToName, mapPageType, + formatIdentifierNameResults, } from "../../pages/search/searchUtils"; import MenuItem from "@mui/material/MenuItem"; import FormControl from "@mui/material/FormControl"; @@ -588,11 +589,13 @@ export const HomeSearch = () => { } const investigationNames: IdentifierNameDoc[] = - investigationsData.response.docs; + formatIdentifierNameResults(investigationsData).response + .docs; const instrumentNames: IdentifierNameDoc[] = - instrumentsData.response.docs; + formatIdentifierNameResults(instrumentsData).response + .docs; const targetNames: IdentifierNameDoc[] = - targetsData.response.docs; + formatIdentifierNameResults(targetsData).response.docs; const investigationFilterOptions = mapFilterIdsToName( investigationFilterIds, diff --git a/apps/frontend/src/pages/search/index.tsx b/apps/frontend/src/pages/search/index.tsx index 1e30180..390bcf8 100644 --- a/apps/frontend/src/pages/search/index.tsx +++ b/apps/frontend/src/pages/search/index.tsx @@ -1246,7 +1246,7 @@ const SearchPage = () => { {getDocType(doc) === "databundle" ? ( { {getDocType(doc) === "datacollection" ? ( { {getDocType(doc) === "dataset" ? ( { {getDocType(doc) === "facility" ? ( { {getDocType(doc) === "instrument" ? ( { {getDocType(doc) === "instrument_host" ? ( { {getDocType(doc) === "investigation" ? ( { {getDocType(doc) === "resource" ? ( { {getDocType(doc) === "target" ? ( { {getDocType(doc) === "telescope" ? ( { {getDocType(doc) === "tool" ? ( { { const rows = Number(data.responseHeader.params.rows); const hits = data.response.numFound; @@ -82,14 +93,6 @@ export const formatFilterQueries = (filters: string) => { return formattedFilterQueryString; }; -export const formatIdentifierNameResults = (data: SolrIdentifierNameResponse) => { - return data; -}; - -export const formatSearchResults = (data: SolrSearchResponse) => { - return data; -}; - export const getDocType = (doc: SearchResultDoc) => { let docType = ""; if (doc.product_class) { @@ -227,7 +230,7 @@ const getUnmatchedFilterName = ( } for(let i = 0; i < originals.length; i++){ - if(originals[i].identifier === identifier){ + if(originals[i].identifier[0] === identifier){ if(parentName === "target_ref"){ return originals[i].target_name[0]; } @@ -306,7 +309,7 @@ export const mapFilterIdsToName = (ids: string[], names: IdentifierNameDoc[], se let name: string = ""; if (nameDoc.title) { - name = nameDoc.title; + name = nameDoc.title[0]; } filtersMap.push({ @@ -352,4 +355,197 @@ export const mapPageType = (ids: string[], searchResultFacets?: (number | string }); return filtersMap; -}; \ No newline at end of file +}; + +export const formatSearchResults = (data: SolrSearchResponseExpected) => { + const formattedData: SolrSearchResponse = transformSolrSearchResponseExpected(data); + + return formattedData; +}; + + +const transformSolrSearchResponseExpected = (data: SolrSearchResponseExpected) => { + const formattedData: SolrSearchResponse = { + response: transformResponse(data.response), + responseHeader: data.responseHeader, + facet_counts: data.facet_counts + } + + return formattedData; +}; + + +const transformResponse = (data: ResponseExpected) => { + const formattedData: Response = { + numFound: data.numFound, + start: data.start, + maxScore: data.maxScore, + docs: transformDocs(data.docs) + } + + return formattedData; +} + +const transformDocs = (data: SearchResultDocExpected[]) => { + const formattedData: SearchResultDoc[] = []; + + data.forEach((docExpected) => { + const doc: SearchResultDoc = { + file_ref_location: convertToStringArray(docExpected.file_ref_location), + data_class:convertToStringArray(docExpected.data_class), + description: convertToStringArray(docExpected.description), + file_ref_url: convertToStringArray(docExpected.file_ref_url), + title: convertToStringArray(docExpected.title), + resLocation: convertToStringArray(docExpected.resLocation), + objectType: convertToStringArray(docExpected.objectType), + product_class: convertToStringArray(docExpected.product_class), + data_product_type: convertToStringArray(docExpected.data_product_type), + file_ref_size: convertToStringArray(docExpected.file_ref_size), + modification_date: convertToStringArray(docExpected.modification_date), + file_ref_name: convertToStringArray(docExpected.file_ref_name), + identifier: convertToStringArray(docExpected.identifier), + resource_url: convertToStringArray(docExpected.resource_url), + agency_name: convertToStringArray(docExpected.agency_name), + 'form-agency': convertToStringArray(docExpected['form-agency']), + modification_description: convertToStringArray(docExpected.modification_description), + resource_type: convertToStringArray(docExpected.resource_type), + search_id: convertToStringArray(docExpected.search_id), + pds_model_version: convertToStringArray(docExpected.pds_model_version), + resource_description: convertToStringArray(docExpected.resource_description), + resource_name: convertToStringArray(docExpected.resource_name), + timestamp: convertToStringArray(docExpected.timestamp), + score: docExpected.score, + investigation_type: convertToStringArray(docExpected.investigation_type), + primary_result_purpose: convertToStringArray(docExpected.primary_result_purpose), + node_id: convertToStringArray(docExpected.node_id), + instrument_type: convertToStringArray(docExpected.instrument_type), + facility_country: convertToStringArray(docExpected.facility_country), + facility_type: convertToStringArray(docExpected.facility_type), + facility_description: convertToStringArray(docExpected.facility_description), + telescope_description: convertToStringArray(docExpected.telescope_description), + telescope_aperture: convertToStringArray(docExpected.telescope_aperture), + instrument_name: convertToStringArray(docExpected.instrument_name), + investigation_ref: convertToStringArray(docExpected.investigation_ref), + citation_publication_year: convertToStringArray(docExpected.citation_publication_year) + } + + if(docExpected.collection_type){ + doc.collection_type = convertToStringArray(docExpected.collection_type); + } + if(docExpected.investigation_description){ + doc.investigation_description = convertToStringArray(docExpected.investigation_description); + } + if(docExpected.instrument_host_name){ + doc.instrument_host_name = convertToStringArray(docExpected.instrument_host_name); + } + if(docExpected.investigation_start_date){ + doc.investigation_start_date = convertToStringArray(docExpected.investigation_start_date); + } + if(docExpected.investigation_stop_date){ + doc.investigation_stop_date = convertToStringArray(docExpected.investigation_stop_date); + } + if(docExpected.instrument_description){ + doc.instrument_description = convertToStringArray(docExpected.instrument_description); + } + if(docExpected['form-instrument-type']){ + doc['form-instrument-type'] = convertToStringArray(docExpected['form-instrument-type']); + } + if(docExpected['form-instrument-host']){ + doc['form-instrument-host'] = convertToStringArray(docExpected['form-instrument-host']); + } + if(docExpected['form-investigation']){ + doc['form-investigation'] = convertToStringArray(docExpected['form-investigation']); + } + if(docExpected.citation_doi){ + doc.citation_doi = convertToStringArray(docExpected.citation_doi); + } + if(docExpected.primary_result_processing_level){ + doc.primary_result_processing_level = convertToStringArray(docExpected.primary_result_processing_level); + } + if(docExpected.observation_start_date_time){ + doc.observation_start_date_time = convertToStringArray(docExpected.observation_start_date_time); + } + if(docExpected.observation_stop_date_time){ + doc.observation_stop_date_time = convertToStringArray(docExpected.observation_stop_date_time); + } + if(docExpected.investigation_name){ + doc.investigation_name = convertToStringArray(docExpected.investigation_name); + } + if(docExpected.primary_result_discipline_name){ + doc.primary_result_discipline_name = convertToStringArray(docExpected.primary_result_discipline_name); + } + if(docExpected.target_type){ + doc.target_type = convertToStringArray(docExpected.target_type); + } + if(docExpected.service_url){ + doc.service_url = convertToStringArray(docExpected.service_url); + } + if(docExpected.version_id){ + doc.version_id = convertToStringArray(docExpected.version_id); + } + if(docExpected.service_category){ + doc.service_category = convertToStringArray(docExpected.service_category); + } + if(docExpected['form-target']){ + doc['form-target'] = convertToStringArray(docExpected['form-target']); + } + if(docExpected.target_description){ + doc.target_description = convertToStringArray(docExpected.target_description); + } + if(docExpected.instrument_host_description){ + doc.instrument_host_description = convertToStringArray(docExpected.instrument_host_description); + } + + formattedData.push(doc); + }); + + return formattedData; +} + +export const formatIdentifierNameResults = (data: SolrIdentifierNameResponseExpected) => { + const formattedData: SolrIdentifierNameResponse = transformSolrIdentifierNameResponse(data); + + return formattedData; +}; + + +const transformSolrIdentifierNameResponse = (data: SolrIdentifierNameResponseExpected) => { + const formattedData: SolrIdentifierNameResponse = { + response: transformIdentifierNameResponse(data.response), + responseHeader: data.responseHeader, + facet_counts: data.facet_counts + } + + return formattedData; +} + +const transformIdentifierNameResponse = (data: IdentifierNameResponseExpected) => { + const formattedData: IdentifierNameResponse = { + numFound: data.numFound, + start: data.start, + maxScore: data.maxScore, + docs: transformIdentifierNameDocs(data.docs) + } + + return formattedData; +} + +const transformIdentifierNameDocs = (data: IdentifierNameDocExpected[]) => { + const formattedData: IdentifierNameDoc[] = []; + + data.forEach((docExpected) => { + const doc = { + identifier: convertToStringArray(docExpected.identifier), + investigation_name: convertToStringArray(docExpected.investigation_name), + instrument_name: convertToStringArray(docExpected.instrument_name), + target_name: convertToStringArray(docExpected.target_name), + title: convertToStringArray(docExpected.title), + } + + formattedData.push(doc); + }); + + return formattedData; +} + +const convertToStringArray = (param: string | string[]): string[] => Array.isArray(param) ? param : [param]; \ No newline at end of file diff --git a/apps/frontend/src/types/solrSearchResponse.d.ts b/apps/frontend/src/types/solrSearchResponse.d.ts index b12b2f3..6a9f256 100644 --- a/apps/frontend/src/types/solrSearchResponse.d.ts +++ b/apps/frontend/src/types/solrSearchResponse.d.ts @@ -26,7 +26,6 @@ export type Facetfields = { facet_instrument: (number | string)[]; facet_primary_result_purpose: (number | string)[]; facet_primary_result_processing_level: string[]; - page_type: string[]; investigation_ref: string[]; target_ref: string[]; @@ -35,7 +34,7 @@ export type Facetfields = { type Facetqueries = object; -type Response = { +export type Response = { numFound: number; start: number; maxScore: number; @@ -54,26 +53,26 @@ type SearchResultDoc = { data_class: string[]; description: string[]; file_ref_url: string[]; - title: string; - resLocation: string; - objectType: string; + title: string[]; + resLocation: string[]; + objectType: string[]; product_class: string[]; data_product_type: string[]; file_ref_size: string[]; modification_date: string[]; file_ref_name: string[]; - identifier: string; + identifier: string[]; resource_url: string[]; agency_name: string[]; 'form-agency': string[]; modification_description: string[]; resource_type: string[]; version_id: string[]; - search_id: string; - pds_model_version: string; + search_id: string[]; + pds_model_version: string[]; resource_description: string[]; resource_name: string[]; - timestamp: string; + timestamp: string[]; score: number; collection_type?: string[]; investigation_description?: string[]; @@ -114,11 +113,11 @@ type SearchResultDoc = { } type IdentifierNameDoc = { - identifier: string; + identifier: string[]; investigation_name: string[]; instrument_name: string[]; target_name: string[]; - title: string; + title: string[]; } type ResponseHeader = { diff --git a/apps/frontend/src/types/solrSearchResponseExpected.d.ts b/apps/frontend/src/types/solrSearchResponseExpected.d.ts new file mode 100644 index 0000000..c9162b5 --- /dev/null +++ b/apps/frontend/src/types/solrSearchResponseExpected.d.ts @@ -0,0 +1,132 @@ +export type SolrSearchResponse = { + responseHeader: ResponseHeader; + response: Response; + facet_counts: Facetcounts; +} + +export type SolrIdentifierNameResponse = { + responseHeader: ResponseHeader; + response: IdentifierNameResponse; + facet_counts: Facetcounts; +} + +export type Facetcounts = { + facet_queries: Facetqueries; + facet_fields: Facetfields; + facet_dates: Facetqueries; + facet_ranges: Facetqueries; +} + +export type Facetfields = { + facet_pds_model_version: (number | string)[]; + facet_agency: (number | string)[]; + facet_type: (number | string)[]; + facet_target: (number | string)[]; + facet_investigation: (number | string)[]; + facet_instrument: (number | string)[]; + facet_primary_result_purpose: (number | string)[]; + facet_primary_result_processing_level: string[]; + page_type: string[]; + investigation_ref: string[]; + target_ref: string[]; + instrument_ref: string[]; +} + +type Facetqueries = object; + +export type Response = { + numFound: number; + start: number; + maxScore: number; + docs: SearchResultDoc[]; +} + +type IdentifierNameResponse = { + numFound: number; + start: number; + maxScore: number; + docs: IdentifierNameDoc[]; +} + +export type SearchResultDoc = { + file_ref_location: string | string[]; + data_class: string | string[]; + description: string | string[]; + file_ref_url: string | string[]; + title: string | string[]; + resLocation: string | string[]; + objectType: string | string[]; + product_class: string | string[]; + data_product_type: string | string[]; + file_ref_size: string | string[]; + modification_date: string | string[]; + file_ref_name: string | string[]; + identifier: string | string[]; + resource_url: string | string[]; + agency_name: string | string[]; + 'form-agency': string | string[]; + modification_description: string | string[]; + resource_type: string | string[]; + search_id: string | string[]; + pds_model_version: string | string[]; + resource_description: string | string[]; + resource_name: string | string[]; + timestamp: string | string[]; + score: number; + collection_type?: string | string[]; + investigation_description?: string | string[]; + instrument_host_name?: string | string[]; + investigation_start_date?: string | string[]; + investigation_stop_date?: string | string[]; + instrument_description?: string | string[]; + 'form-instrument-type'?: string | string[]; + 'form-instrument-host'?: string | string[]; + 'form-investigation'?: string | string[]; + citation_doi?: string | string[]; + primary_result_processing_level?: string | string[]; + observation_start_date_time?: string | string[]; + observation_stop_date_time?: string | string[]; + investigation_name?: string | string[]; + primary_result_discipline_name?: string | string[]; + target_type?: string | string[]; + service_url?: string | string[]; + version_id?: string | string[]; + service_category?: string | string[]; + 'form-target'?: string | string[]; + target_description?: string | string[]; + instrument_host_description?: string | string[]; + investigation_type: string | string[]; + primary_result_purpose: string | string[]; + node_id: string | string[]; + instrument_type: string | string[]; + facility_country: string | string[]; + facility_type: string | string[]; + facility_description: string | string[]; + telescope_description: string | string[]; + telescope_aperture: string | string[]; + instrument_name: string | string[]; + investigation_ref: string | string[]; + citation_publication_year: string | string[]; +} + +type IdentifierNameDoc = { + identifier: string | string[]; + investigation_name: string | string[]; + instrument_name: string | string[]; + target_name: string | string[]; + title: string | string[]; +} + +type ResponseHeader = { + status: number; + QTime: number; + params: Params; +} + +type Params = { + q: string; + start: string; + fq: string[] | string; + rows: string; + wt: string; +} \ No newline at end of file From 172f12bdb86149204f4575f0399b763565fef4d6 Mon Sep 17 00:00:00 2001 From: Eddie Arevalo Date: Fri, 3 Jan 2025 14:51:38 -0800 Subject: [PATCH 03/10] Change form-instrument-host reference To instrument_host_name -Changed form-instrument-host reference to instrument_host_name in instrument data types display. --- apps/frontend/src/pages/search/index.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/frontend/src/pages/search/index.tsx b/apps/frontend/src/pages/search/index.tsx index 390bcf8..dc8f1ff 100644 --- a/apps/frontend/src/pages/search/index.tsx +++ b/apps/frontend/src/pages/search/index.tsx @@ -1576,10 +1576,9 @@ const SearchPage = () => { : "/", }} investigation={ - doc["form-instrument-host"] + doc.instrument_host_name ? { - value: - doc["form-instrument-host"][0], + value: doc.instrument_host_name[0], } : { value: "-" } } From 5bccf0901fe6154f574b85c50f461c4b6c1d2aca Mon Sep 17 00:00:00 2001 From: Anil Natha Date: Mon, 6 Jan 2025 14:12:15 -0800 Subject: [PATCH 04/10] Added utility functions that produce descriptions using predefined templates for some of our context products (investigations, instruments, instrument hosts, targets, telescopes, and facilities). Updated instances where we display these descriptions to use the new utility functions like search results and directory pages. --- .../InstrumentsIndexedListComponent.tsx | 5 ++-- .../InvestigationsIndexedListComponent.tsx | 5 ++-- apps/frontend/src/pages/search/index.tsx | 30 +++++++++---------- .../src/types/solrSearchResponse.d.ts | 2 ++ apps/frontend/src/utils/strings.ts | 24 +++++++++++++++ 5 files changed, 47 insertions(+), 19 deletions(-) diff --git a/apps/frontend/src/components/IndexedListComponent/InstrumentsIndexedListComponent.tsx b/apps/frontend/src/components/IndexedListComponent/InstrumentsIndexedListComponent.tsx index a3de5ee..0260668 100644 --- a/apps/frontend/src/components/IndexedListComponent/InstrumentsIndexedListComponent.tsx +++ b/apps/frontend/src/components/IndexedListComponent/InstrumentsIndexedListComponent.tsx @@ -10,6 +10,7 @@ import { InstrumentHost } from "src/types/instrumentHost"; import { ExpandMore } from "@mui/icons-material"; import { FeaturedLink, FeaturedLinkDetails, FeaturedLinkDetailsVariant, Typography } from "@nasapds/wds-react"; import { getLinkToInstrumentDetailPage } from "src/utils/links"; +import { getInstrumentDescription } from "src/utils/strings"; type InstrumentsIndexedListComponentProps = { instruments: Instrument[]; @@ -213,7 +214,7 @@ function InstrumentsIndexedListComponent(props:InstrumentsIndexedListComponentPr (instrument: Instrument, instrumentIndex) => { return ( { return ( { return ( { return ( { title={doc.title ? doc.title : "-"} description={ doc.facility_description - ? doc.facility_description[0] - : "-" + ? getFacilityDescription(doc.title, doc.facility_description[0]) + : getFacilityDescription(doc.title, "") } primaryLink={ doc.identifier @@ -1545,10 +1545,10 @@ const SearchPage = () => { title={doc.title ? doc.title : "-"} description={ doc.instrument_description - ? doc.instrument_description[0] + ? getInstrumentDescription(doc.title, doc.instrument_description[0]) : doc.description - ? doc.description[0] - : "-" + ? getInstrumentDescription(doc.title, doc.description[0]) + : getInstrumentDescription(doc.title, "") } primaryLink={ doc.identifier @@ -1594,10 +1594,10 @@ const SearchPage = () => { title={doc.title ? doc.title : "-"} description={ doc.instrument_host_description - ? doc.instrument_host_description[0] + ? getInstrumentHostDescription(doc.title, doc.instrument_host_description[0]) : doc.description - ? doc.description[0] - : "-" + ? getInstrumentHostDescription(doc.title, doc.description[0]) + : getInstrumentHostDescription(doc.title, "") } primaryLink={ doc.identifier && doc.investigation_ref @@ -1662,12 +1662,12 @@ const SearchPage = () => { title={doc.title ? doc.title : "-"} description={ doc.investigation_description - ? doc.investigation_description[0] + ? getInvestigationDescription(doc.title, doc.investigation_description[0]) : doc.instrument_host_description ? doc.instrument_host_description[0] : doc.description - ? doc.description[0] - : "-" + ? getInvestigationDescription(doc.title, doc.description[0]) + : getInvestigationDescription(doc.title, "") } primaryLink={ doc.identifier @@ -1769,7 +1769,7 @@ const SearchPage = () => { { title={doc.title ? doc.title : "-"} description={ doc.telescope_description - ? doc.telescope_description[0] - : "-" + ? getTelescopeDescription(doc.title, doc.telescope_description[0]) + : getTelescopeDescription(doc.title, "") } primaryLink={ doc.identifier diff --git a/apps/frontend/src/types/solrSearchResponse.d.ts b/apps/frontend/src/types/solrSearchResponse.d.ts index b12b2f3..3987b32 100644 --- a/apps/frontend/src/types/solrSearchResponse.d.ts +++ b/apps/frontend/src/types/solrSearchResponse.d.ts @@ -78,6 +78,7 @@ type SearchResultDoc = { collection_type?: string[]; investigation_description?: string[]; instrument_host_name?: string[]; + instrument_host_type?: string[]; investigation_start_date?: string[]; investigation_stop_date?: string[]; instrument_description?: string[]; @@ -89,6 +90,7 @@ type SearchResultDoc = { observation_start_date_time?: string[]; observation_stop_date_time?: string[]; investigation_name?: string[]; + investigation_type?: string[]; primary_result_discipline_name?: string[]; target_type?: string[]; service_url?: string[]; diff --git a/apps/frontend/src/utils/strings.ts b/apps/frontend/src/utils/strings.ts index 1f9a6e9..968ff73 100644 --- a/apps/frontend/src/utils/strings.ts +++ b/apps/frontend/src/utils/strings.ts @@ -37,4 +37,28 @@ export const copyToClipboard = async (element:string) => { } catch (err) { console.error('Failed to copy: ', err); } +} + +export const getFacilityDescription = (title:string, description:string) => { + return `Portal for ${title}, providing data, telescopes, and other resources. ${description}`; +} + +export const getInstrumentDescription = (title:string, description:string) => { + return `Portal for the ${title} instrument, providing data, tools, and other resources. ${description}`; +} + +export const getInstrumentHostDescription = (title:string, description:string) => { + return `Portal for the ${title} instrument host, providing data, instruments, and other resources. ${description}`; +} + +export const getInvestigationDescription = (title:string, description:string) => { + return `Portal for the ${title} investigation, providing data, instrument hosts, instruments, and other resources. ${description}`; +} + +export const getTargetDescription = (title:string, description:string) => { + return `Portal for the target ${title}, providing data, investigations, and other resources. ${description}`; +} + +export const getTelescopeDescription = (title:string, description:string) => { + return `Portal for ${title}, providing data, instruments, and other resources. ${description}`; } \ No newline at end of file From 83e9861b3cce46956038b1cee549322d32d4750d Mon Sep 17 00:00:00 2001 From: Eddie Arevalo Date: Thu, 9 Jan 2025 16:15:52 -0800 Subject: [PATCH 05/10] Remove Unused Solr Values -Removed form-instrument-type and form-investigation. --- apps/frontend/src/pages/search/searchUtils.ts | 6 ------ apps/frontend/src/types/solrSearchResponse.d.ts | 2 -- apps/frontend/src/types/solrSearchResponseExpected.d.ts | 2 -- 3 files changed, 10 deletions(-) diff --git a/apps/frontend/src/pages/search/searchUtils.ts b/apps/frontend/src/pages/search/searchUtils.ts index ed449d5..ec84c37 100644 --- a/apps/frontend/src/pages/search/searchUtils.ts +++ b/apps/frontend/src/pages/search/searchUtils.ts @@ -447,15 +447,9 @@ const transformDocs = (data: SearchResultDocExpected[]) => { if(docExpected.instrument_description){ doc.instrument_description = convertToStringArray(docExpected.instrument_description); } - if(docExpected['form-instrument-type']){ - doc['form-instrument-type'] = convertToStringArray(docExpected['form-instrument-type']); - } if(docExpected['form-instrument-host']){ doc['form-instrument-host'] = convertToStringArray(docExpected['form-instrument-host']); } - if(docExpected['form-investigation']){ - doc['form-investigation'] = convertToStringArray(docExpected['form-investigation']); - } if(docExpected.citation_doi){ doc.citation_doi = convertToStringArray(docExpected.citation_doi); } diff --git a/apps/frontend/src/types/solrSearchResponse.d.ts b/apps/frontend/src/types/solrSearchResponse.d.ts index 6a9f256..e78751d 100644 --- a/apps/frontend/src/types/solrSearchResponse.d.ts +++ b/apps/frontend/src/types/solrSearchResponse.d.ts @@ -80,9 +80,7 @@ type SearchResultDoc = { investigation_start_date?: string[]; investigation_stop_date?: string[]; instrument_description?: string[]; - 'form-instrument-type'?: string[]; 'form-instrument-host'?: string[]; - 'form-investigation'?: string[]; citation_doi?: string[]; primary_result_processing_level?: string[]; observation_start_date_time?: string[]; diff --git a/apps/frontend/src/types/solrSearchResponseExpected.d.ts b/apps/frontend/src/types/solrSearchResponseExpected.d.ts index c9162b5..40103da 100644 --- a/apps/frontend/src/types/solrSearchResponseExpected.d.ts +++ b/apps/frontend/src/types/solrSearchResponseExpected.d.ts @@ -79,9 +79,7 @@ export type SearchResultDoc = { investigation_start_date?: string | string[]; investigation_stop_date?: string | string[]; instrument_description?: string | string[]; - 'form-instrument-type'?: string | string[]; 'form-instrument-host'?: string | string[]; - 'form-investigation'?: string | string[]; citation_doi?: string | string[]; primary_result_processing_level?: string | string[]; observation_start_date_time?: string | string[]; From 3550c80fe6c6cff3b07c1c61c80ec509c9b10eb4 Mon Sep 17 00:00:00 2001 From: Eddie Arevalo Date: Mon, 13 Jan 2025 12:51:47 -0800 Subject: [PATCH 06/10] Remove Checkbox From Single Filters #141 -Removed checkboxes from single filters. The text is now clickable. -When a single filter is selected the options list becomes hidden. -Filter title has been added to the selected filter chip. --- .../src/components/Filters/Filter.tsx | 230 +++++++++++------- .../src/components/Filters/Filters.tsx | 4 +- apps/frontend/src/pages/search/index.tsx | 74 ++++-- 3 files changed, 205 insertions(+), 103 deletions(-) diff --git a/apps/frontend/src/components/Filters/Filter.tsx b/apps/frontend/src/components/Filters/Filter.tsx index 4939daf..1fe342d 100644 --- a/apps/frontend/src/components/Filters/Filter.tsx +++ b/apps/frontend/src/components/Filters/Filter.tsx @@ -30,7 +30,7 @@ export type FilterProps = { title: string; options: FilterOptionProps[]; onChecked: (event: ChangeEvent) => void; - onCheckedRadio: (event: ChangeEvent) => void; + onCheckedRadio: (name: string, checked: boolean, value: string) => void; collapseAll?: boolean; variant: FilterVariant; }; @@ -72,102 +72,158 @@ const Filter = ({ return isIncluded; }; + const isASingleSelected = ( + possibleOptions: FilterOptionProps[], + filterVariant: FilterVariant + ) => { + let isSingleAndSelected = false; + if (filterVariant === "single") { + possibleOptions.forEach((option) => { + if (option.value !== "all" && option.isChecked === true) { + isSingleAndSelected = true; + } + }); + } + + return isSingleAndSelected; + }; + useEffect(() => { setIsCollapsed(collapseAll); }, [collapseAll]); return ( -
- - - - - {displayTitle.toUpperCase()} - - - - - {isCollapsed ? : } - - - - - - {!isCollapsed ? ( - - - - - - ), - }} - /> - - - ) : ( - <> - )} - - {!isCollapsed ? ( - - {options.map((option) => - titleIncludesSubFilter(option.title, subFilter) ? ( - + {!isASingleSelected(options, variant) ? ( +
+ + + + + {displayTitle.toUpperCase()} + + + - + {isCollapsed ? ( + + ) : ( + + )} + + + + + {!isCollapsed ? ( + + + + + + ), + }} /> - - {option.title.toUpperCase()} - - - {option.title === "all" - ? "" - : " (" + option.resultsFound + ")"} - - - - ) : ( - <> - ) + + + ) : ( + <> )} - + {!isCollapsed ? ( + + {options.map((option) => + titleIncludesSubFilter(option.title, subFilter) ? ( + + {variant !== "single" ? ( + <> + + + {option.title.toUpperCase()} + + + {option.title === "all" + ? "" + : " (" + option.resultsFound + ")"} + + + + ) : ( +
+ + onCheckedRadio( + option.value, + !option.isChecked, + value + ) + } + > + {option.title.toUpperCase()} + + + {option.title === "all" + ? "" + : " (" + option.resultsFound + ")"} + + +
+ )} +
+ ) : ( + <> + ) + )} +
+ ) : ( + "" + )} + +
) : ( - "" + <> )} - -
+ ); }; diff --git a/apps/frontend/src/components/Filters/Filters.tsx b/apps/frontend/src/components/Filters/Filters.tsx index 89c3731..a72b728 100644 --- a/apps/frontend/src/components/Filters/Filters.tsx +++ b/apps/frontend/src/components/Filters/Filters.tsx @@ -7,7 +7,7 @@ import { Chip, Typography } from "@nasapds/wds-react"; export type FiltersProps = { filters: FilterProps[]; onChecked: (event: ChangeEvent) => void; - onCheckedRadio: (event: ChangeEvent) => void; + onCheckedRadio: (name: string, checked: boolean, value: string) => void; onFilterChipDelete: (value: string, parentValue: string) => void; onFilterClear: () => void; collapseAll?: boolean; @@ -41,7 +41,7 @@ const Filters = ({ filter.options.forEach((option) => { if (option.value !== "all" && option.isChecked) { const optionProps = { - title: option.title, + title: filter.displayTitle + " : " + option.title, value: option.value, resultsFound: option.resultsFound, isChecked: option.isChecked, diff --git a/apps/frontend/src/pages/search/index.tsx b/apps/frontend/src/pages/search/index.tsx index 7c45f19..e345e9e 100644 --- a/apps/frontend/src/pages/search/index.tsx +++ b/apps/frontend/src/pages/search/index.tsx @@ -14,7 +14,15 @@ import { FilterProps, FilterVariant, } from "../../components/Filters/Filter"; -import { ellipsisText, getFacilityDescription, getInstrumentDescription, getInstrumentHostDescription, getInvestigationDescription, getTargetDescription, getTelescopeDescription } from "../../utils/strings"; +import { + ellipsisText, + getFacilityDescription, + getInstrumentDescription, + getInstrumentHostDescription, + getInvestigationDescription, + getTargetDescription, + getTelescopeDescription, +} from "../../utils/strings"; import { getLinkToInstrumentDetailPage, getLinkToInvestigationDetailPage, @@ -660,8 +668,11 @@ const SearchPage = () => { ); }; - const handleFilterCheckedRadio = (e: ChangeEvent) => { - const { name, checked, value } = e.target; + const handleFilterCheckedRadio = ( + name: string, + checked: boolean, + value: string + ) => { let filters = ""; if (name === "all") { @@ -1495,7 +1506,10 @@ const SearchPage = () => { title={doc.title ? doc.title : "-"} description={ doc.facility_description - ? getFacilityDescription(doc.title, doc.facility_description[0]) + ? getFacilityDescription( + doc.title, + doc.facility_description[0] + ) : getFacilityDescription(doc.title, "") } primaryLink={ @@ -1545,9 +1559,15 @@ const SearchPage = () => { title={doc.title ? doc.title : "-"} description={ doc.instrument_description - ? getInstrumentDescription(doc.title, doc.instrument_description[0]) + ? getInstrumentDescription( + doc.title, + doc.instrument_description[0] + ) : doc.description - ? getInstrumentDescription(doc.title, doc.description[0]) + ? getInstrumentDescription( + doc.title, + doc.description[0] + ) : getInstrumentDescription(doc.title, "") } primaryLink={ @@ -1594,10 +1614,19 @@ const SearchPage = () => { title={doc.title ? doc.title : "-"} description={ doc.instrument_host_description - ? getInstrumentHostDescription(doc.title, doc.instrument_host_description[0]) + ? getInstrumentHostDescription( + doc.title, + doc.instrument_host_description[0] + ) : doc.description - ? getInstrumentHostDescription(doc.title, doc.description[0]) - : getInstrumentHostDescription(doc.title, "") + ? getInstrumentHostDescription( + doc.title, + doc.description[0] + ) + : getInstrumentHostDescription( + doc.title, + "" + ) } primaryLink={ doc.identifier && doc.investigation_ref @@ -1662,12 +1691,21 @@ const SearchPage = () => { title={doc.title ? doc.title : "-"} description={ doc.investigation_description - ? getInvestigationDescription(doc.title, doc.investigation_description[0]) + ? getInvestigationDescription( + doc.title, + doc.investigation_description[0] + ) : doc.instrument_host_description ? doc.instrument_host_description[0] : doc.description - ? getInvestigationDescription(doc.title, doc.description[0]) - : getInvestigationDescription(doc.title, "") + ? getInvestigationDescription( + doc.title, + doc.description[0] + ) + : getInvestigationDescription( + doc.title, + "" + ) } primaryLink={ doc.identifier @@ -1769,7 +1807,12 @@ const SearchPage = () => { { title={doc.title ? doc.title : "-"} description={ doc.telescope_description - ? getTelescopeDescription(doc.title, doc.telescope_description[0]) + ? getTelescopeDescription( + doc.title, + doc.telescope_description[0] + ) : getTelescopeDescription(doc.title, "") } primaryLink={ From 3543aedbf7b4e4042973d21838d9352a9da2ce4e Mon Sep 17 00:00:00 2001 From: Eddie Arevalo Date: Tue, 14 Jan 2025 13:28:16 -0800 Subject: [PATCH 07/10] Simplify Unnecessary Use Of Boolean Literals Sonarqube -Simplified unnecessary use of boolean literals in conditional expression as suggested by Sonarqube. --- apps/frontend/src/components/Filters/Filter.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/frontend/src/components/Filters/Filter.tsx b/apps/frontend/src/components/Filters/Filter.tsx index 1fe342d..c55a002 100644 --- a/apps/frontend/src/components/Filters/Filter.tsx +++ b/apps/frontend/src/components/Filters/Filter.tsx @@ -170,11 +170,7 @@ const Filter = ({ name={option.value} value={value} checked={option.isChecked} - disabled={ - option.isChecked && option.title === "all" - ? true - : false - } + disabled={option.isChecked && option.title === "all"} /> {option.title.toUpperCase()} From c19e1929e116838b18466c75f0c0725413d3a9f4 Mon Sep 17 00:00:00 2001 From: Eddie Arevalo Date: Thu, 16 Jan 2025 10:29:40 -0800 Subject: [PATCH 08/10] Fix Build Due To Dev Unit Type Updates -Fixed page type to always be treated as an array. -Fixed title to be treated as an array. --- apps/frontend/src/pages/search/index.tsx | 56 ++++++++++--------- apps/frontend/src/pages/search/searchUtils.ts | 3 +- .../src/types/solrSearchResponse.d.ts | 4 +- .../src/types/solrSearchResponseExpected.d.ts | 1 + 4 files changed, 35 insertions(+), 29 deletions(-) diff --git a/apps/frontend/src/pages/search/index.tsx b/apps/frontend/src/pages/search/index.tsx index e950872..c116186 100644 --- a/apps/frontend/src/pages/search/index.tsx +++ b/apps/frontend/src/pages/search/index.tsx @@ -1270,7 +1270,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: doc.page_type, + data: doc.page_type[0], verticalAlign: "center", width: 1, }, @@ -1358,7 +1358,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: doc.page_type, + data: doc.page_type[0], verticalAlign: "center", width: 1, }, @@ -1444,7 +1444,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: doc.page_type, + data: doc.page_type[0], verticalAlign: "center", width: 1, }, @@ -1507,10 +1507,10 @@ const SearchPage = () => { description={ doc.facility_description ? getFacilityDescription( - doc.title, + doc.title[0], doc.facility_description[0] ) - : getFacilityDescription(doc.title, "") + : getFacilityDescription(doc.title[0], "") } primaryLink={ doc.identifier @@ -1521,7 +1521,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: doc.page_type, + data: doc.page_type[0], verticalAlign: "center", width: 1, }, @@ -1560,15 +1560,18 @@ const SearchPage = () => { description={ doc.instrument_description ? getInstrumentDescription( - doc.title, + doc.title[0], doc.instrument_description[0] ) : doc.description ? getInstrumentDescription( - doc.title, + doc.title[0], doc.description[0] ) - : getInstrumentDescription(doc.title, "") + : getInstrumentDescription( + doc.title[0], + "" + ) } primaryLink={ doc.identifier @@ -1579,7 +1582,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: doc.page_type, + data: doc.page_type[0], verticalAlign: "center", width: 1, }, @@ -1614,16 +1617,16 @@ const SearchPage = () => { description={ doc.instrument_host_description ? getInstrumentHostDescription( - doc.title, + doc.title[0], doc.instrument_host_description[0] ) : doc.description ? getInstrumentHostDescription( - doc.title, + doc.title[0], doc.description[0] ) : getInstrumentHostDescription( - doc.title, + doc.title[0], "" ) } @@ -1640,7 +1643,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: doc.page_type, + data: doc.page_type[0], verticalAlign: "center", width: 1, }, @@ -1691,18 +1694,18 @@ const SearchPage = () => { description={ doc.investigation_description ? getInvestigationDescription( - doc.title, + doc.title[0], doc.investigation_description[0] ) : doc.instrument_host_description ? doc.instrument_host_description[0] : doc.description ? getInvestigationDescription( - doc.title, + doc.title[0], doc.description[0] ) : getInvestigationDescription( - doc.title, + doc.title[0], "" ) } @@ -1715,7 +1718,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: doc.page_type, + data: doc.page_type[0], verticalAlign: "center", width: 1, }, @@ -1780,7 +1783,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: doc.page_type, + data: doc.page_type[0], verticalAlign: "center", width: 1, }, @@ -1808,7 +1811,7 @@ const SearchPage = () => { description={ doc.description ? getTargetDescription( - doc.title, + doc.title[0], doc.description[0] ) : "-" @@ -1822,7 +1825,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: doc.page_type, + data: doc.page_type[0], verticalAlign: "center", width: 1, }, @@ -1851,10 +1854,13 @@ const SearchPage = () => { description={ doc.telescope_description ? getTelescopeDescription( - doc.title, + doc.title[0], doc.telescope_description[0] ) - : getTelescopeDescription(doc.title, "") + : getTelescopeDescription( + doc.title[0], + "" + ) } primaryLink={ doc.identifier @@ -1865,7 +1871,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: doc.page_type, + data: doc.page_type[0], verticalAlign: "center", width: 1, }, @@ -1906,7 +1912,7 @@ const SearchPage = () => { columns={[ { horizontalAlign: "center", - data: doc.page_type, + data: doc.page_type[0], verticalAlign: "center", width: 1, }, diff --git a/apps/frontend/src/pages/search/searchUtils.ts b/apps/frontend/src/pages/search/searchUtils.ts index ec84c37..c55c1f0 100644 --- a/apps/frontend/src/pages/search/searchUtils.ts +++ b/apps/frontend/src/pages/search/searchUtils.ts @@ -391,6 +391,7 @@ const transformDocs = (data: SearchResultDocExpected[]) => { data.forEach((docExpected) => { const doc: SearchResultDoc = { + page_type: convertToStringArray(docExpected.page_type), file_ref_location: convertToStringArray(docExpected.file_ref_location), data_class:convertToStringArray(docExpected.data_class), description: convertToStringArray(docExpected.description), @@ -426,7 +427,7 @@ const transformDocs = (data: SearchResultDocExpected[]) => { telescope_aperture: convertToStringArray(docExpected.telescope_aperture), instrument_name: convertToStringArray(docExpected.instrument_name), investigation_ref: convertToStringArray(docExpected.investigation_ref), - citation_publication_year: convertToStringArray(docExpected.citation_publication_year) + citation_publication_year: convertToStringArray(docExpected.citation_publication_year), } if(docExpected.collection_type){ diff --git a/apps/frontend/src/types/solrSearchResponse.d.ts b/apps/frontend/src/types/solrSearchResponse.d.ts index b3d52b0..d779105 100644 --- a/apps/frontend/src/types/solrSearchResponse.d.ts +++ b/apps/frontend/src/types/solrSearchResponse.d.ts @@ -49,7 +49,7 @@ type IdentifierNameResponse = { } type SearchResultDoc = { - page_type: string; + page_type: string[]; file_ref_location: string[]; data_class: string[]; description: string[]; @@ -109,8 +109,6 @@ type SearchResultDoc = { instrument_name: string[]; investigation_ref: string[]; citation_publication_year: string[]; - - } type IdentifierNameDoc = { diff --git a/apps/frontend/src/types/solrSearchResponseExpected.d.ts b/apps/frontend/src/types/solrSearchResponseExpected.d.ts index 40103da..054f8f7 100644 --- a/apps/frontend/src/types/solrSearchResponseExpected.d.ts +++ b/apps/frontend/src/types/solrSearchResponseExpected.d.ts @@ -49,6 +49,7 @@ type IdentifierNameResponse = { } export type SearchResultDoc = { + page_type: string | string[]; file_ref_location: string | string[]; data_class: string | string[]; description: string | string[]; From cb2f2244b18f293f73247c2662729c779ebf55af Mon Sep 17 00:00:00 2001 From: Anil Natha Date: Thu, 23 Jan 2025 09:37:50 -0800 Subject: [PATCH 09/10] Updated @nasapds/wds-react package version to 0.0.4. Also updated version of portal-wp to 0.0.4 to align with next release version number (was not updated during last release, hence the skip over 0.0.3). --- apps/frontend/package-lock.json | 40 ++++++++++++++++----------------- apps/frontend/package.json | 4 ++-- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/apps/frontend/package-lock.json b/apps/frontend/package-lock.json index 8c79a12..ed01d54 100644 --- a/apps/frontend/package-lock.json +++ b/apps/frontend/package-lock.json @@ -15,7 +15,7 @@ "@fontsource/public-sans": "^5.0.18", "@mui/icons-material": "^5.15.11", "@mui/material": "^5.15.11", - "@nasapds/wds-react": "^0.0.3", + "@nasapds/wds-react": "^0.0.4", "@reduxjs/toolkit": "^2.2.1", "axios": "^1.6.7", "classnames": "^2.5.1", @@ -893,21 +893,21 @@ "integrity": "sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==" }, "node_modules/@fontsource-variable/inter": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@fontsource-variable/inter/-/inter-5.1.0.tgz", - "integrity": "sha512-Wj2dUGP0vUpxRGQTXQTCNJO+aLcFcQm+gUPXfj/aS877bQkEPBPv9JvZJpwdm2vzelt8NTZ+ausKlBCJjh2XIg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@fontsource-variable/inter/-/inter-5.1.1.tgz", + "integrity": "sha512-OpXFTmiH6tHkYijMvQTycFKBLK4X+SRV6tet1m4YOUH7SzIIlMqDja+ocDtiCA72UthBH/vF+3ZtlMr2rN/wIw==", "license": "OFL-1.1" }, "node_modules/@fontsource-variable/public-sans": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@fontsource-variable/public-sans/-/public-sans-5.1.1.tgz", - "integrity": "sha512-tqIED9ZiEyX8AQp/4AoVVWy7O05IxVqEWdk8Epw3Cp1np/mmwMGp1JWyzLeJq8ZE4HqdF9e5FSuB3rnyDLpTiA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@fontsource-variable/public-sans/-/public-sans-5.1.2.tgz", + "integrity": "sha512-D4BaUhRY52xoVJw24gOVJymDBHoezdv3X2Rot9iYsHieEuvu8mwBNTSqBJvS6wlMZo2i834azXKllxRYE0C6fg==", "license": "OFL-1.1" }, "node_modules/@fontsource/dm-mono": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@fontsource/dm-mono/-/dm-mono-5.1.0.tgz", - "integrity": "sha512-cfowZUJJDHjgVFOEQmIn2KHtQ8LDXnTGgTTunUImzzg3Xf6V92MlYR/pmkqIt7lXq7lfP/pQZ9ph/9JeLDRsCQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@fontsource/dm-mono/-/dm-mono-5.1.1.tgz", + "integrity": "sha512-blj8dgPQ63UqOdt0beSL1oV5r0/AASsQTGBOI5lTryb6XBzWUsOiIZCfHENtbCuGXjCblxVc+1/zkb13lwYF+g==", "license": "OFL-1.1" }, "node_modules/@fontsource/inter": { @@ -1221,23 +1221,23 @@ } }, "node_modules/@nasapds/wds": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@nasapds/wds/-/wds-0.0.2.tgz", - "integrity": "sha512-qBojc0gSbARfQh3+CJLcwnR1zzLW5muzZaWHbObpno04vP8NtrjZ5cbgPRu2dhZ8ymiYTHNVtkbO3HX4v3djJg==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@nasapds/wds/-/wds-0.0.3.tgz", + "integrity": "sha512-hjWtK6tgo+NrmNfslmoW52/xpb+gjzVZD0KEsrVkRKm/JW84BaK19Rqrf8oyzoe9EC9Xzab///Fuuwtv4xI7Mw==", "license": "Apache-2.0", "dependencies": { - "@fontsource-variable/inter": "^5.1.0", - "@fontsource-variable/public-sans": "^5.1.1", - "@fontsource/dm-mono": "^5.1.0" + "@fontsource-variable/inter": "^5.1.1", + "@fontsource-variable/public-sans": "^5.1.2", + "@fontsource/dm-mono": "^5.1.1" } }, "node_modules/@nasapds/wds-react": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@nasapds/wds-react/-/wds-react-0.0.3.tgz", - "integrity": "sha512-sEZxtgYJdKmJVrkH6hSl4x8PhcmYHbEHHHX60CJhLEr8ccNTVVtYbsNWhPu7mnmqzNXK3NQ8TWKjh2kg2s7l+g==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@nasapds/wds-react/-/wds-react-0.0.4.tgz", + "integrity": "sha512-fQkCzijivgrdvxTG82Ntgrp/u873MIa9uHhiySd2oW5Y/U7HD+lItMw+zFMrBVGHQY3CN7LSUWOh0HEm/Jdj/A==", "license": "Apache-2.0", "dependencies": { - "@nasapds/wds": "^0.0.2" + "@nasapds/wds": "^0.0.3" }, "peerDependencies": { "@emotion/react": "^11.11.1", diff --git a/apps/frontend/package.json b/apps/frontend/package.json index 6286615..88d0bf2 100644 --- a/apps/frontend/package.json +++ b/apps/frontend/package.json @@ -1,7 +1,7 @@ { "name": "pds-portal-frontend", "private": true, - "version": "0.0.2", + "version": "0.0.4", "type": "module", "scripts": { "dev": "vite", @@ -18,7 +18,7 @@ "@fontsource/public-sans": "^5.0.18", "@mui/icons-material": "^5.15.11", "@mui/material": "^5.15.11", - "@nasapds/wds-react": "^0.0.3", + "@nasapds/wds-react": "^0.0.4", "@reduxjs/toolkit": "^2.2.1", "axios": "^1.6.7", "classnames": "^2.5.1", From 9befc1f4fc590bdf7fd4e1e6c6ad5c092a15dd8b Mon Sep 17 00:00:00 2001 From: Anil Natha Date: Thu, 23 Jan 2025 09:39:00 -0800 Subject: [PATCH 10/10] Updated site last updated date value in footer. --- apps/frontend/src/components/Footer/Footer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/frontend/src/components/Footer/Footer.tsx b/apps/frontend/src/components/Footer/Footer.tsx index b9149b4..e0a254b 100644 --- a/apps/frontend/src/components/Footer/Footer.tsx +++ b/apps/frontend/src/components/Footer/Footer.tsx @@ -2,7 +2,7 @@ import { FooterLink, Footer } from "@nasapds/wds-react"; function PortalFooter() { - const pageLastUpdated="Nov. 14, 2024" + const pageLastUpdated="Jan. 23, 2025" const primaryLinks:FooterLink[] = [ {