From b9880a1ac3a24a030bd58d883f3df3467dd7f275 Mon Sep 17 00:00:00 2001 From: steveoni Date: Wed, 23 Oct 2024 12:46:19 +0100 Subject: [PATCH 1/5] [sitemap]: remove diallow all from sitemap --- deployment/frontend/next-sitemap.config.js | 28 ++++++++-------------- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/deployment/frontend/next-sitemap.config.js b/deployment/frontend/next-sitemap.config.js index d3c57e87d..1d61ef5e6 100644 --- a/deployment/frontend/next-sitemap.config.js +++ b/deployment/frontend/next-sitemap.config.js @@ -8,23 +8,15 @@ module.exports = { additionalSitemaps: [ `${process.env.NEXT_PUBLIC_NEXTAUTH_URL}/server-sitemap.xml`, ], - policies: - process.env.NEXT_PUBLIC_DEPLOYMENT_TYPE === 'production' - ? [ - { - userAgent: '*', - disallow: ['/dashboard/*'], - }, - { - userAgent: '*', - allow: '/', - }, - ] - : [ - { - userAgent: '*', - disallow: ['/*'], - }, - ], + policies: [ + { + userAgent: '*', + disallow: ['/dashboard/*'], + }, + { + userAgent: '*', + allow: '/', + }, + ] }, } \ No newline at end of file From f7327288fef523c5b0ebd0756a8c1cadeb77c799 Mon Sep 17 00:00:00 2001 From: steveoni Date: Fri, 13 Dec 2024 13:37:08 +0100 Subject: [PATCH 2/5] update searchcard style --- .../search/DatasetHorizontalCard.tsx | 229 +++++++++--------- 1 file changed, 119 insertions(+), 110 deletions(-) diff --git a/deployment/frontend/src/components/search/DatasetHorizontalCard.tsx b/deployment/frontend/src/components/search/DatasetHorizontalCard.tsx index 965ed740c..9b293b417 100644 --- a/deployment/frontend/src/components/search/DatasetHorizontalCard.tsx +++ b/deployment/frontend/src/components/search/DatasetHorizontalCard.tsx @@ -46,136 +46,145 @@ export default function DatasetHorizontalCard({ dataset?.rw_id || dataset?.resources?.some((r) => r.datastore_active) return ( -
-
-
-

- {dataset.title} -

- {dataset.visibility_type && - session.status == 'authenticated' && - dataset.visibility_type != 'public' && ( - - )} -
- -
- {formats.slice(0, 4).map((format) => ( - +
+
+
+

- {format} - - ))} + {dataset.title} +

+ {dataset.visibility_type && + session.status == 'authenticated' && + dataset.visibility_type != 'public' && ( + + )} +
+ +
+ {formats.slice(0, 4).map((format) => ( + + {format} + + ))} +
-
-

- {dataset.short_description ?? ''} -

+

+ {dataset.short_description ?? ''} +

-
-
- {dataset.organization?.title && ( +
+
+ {dataset.organization?.title && ( + + + +
+ +

+ {dataset.organization?.title} +

+
+
+ + +

Team

+
+
+
+
+ )}
- +

- {dataset.organization?.title} -

-
-
- - -

Team

-
-
-
-
- )} - - - -
- -

- {dataset.metadata_modified - ? 'Last Updated ' + - new Date( - dataset.metadata_modified - ) - .toLocaleDateString('en-US', { - day: 'numeric', - month: 'short', - year: 'numeric', - }) - .replace( - /^([a-zA-Z]+) (\d+), (\d+)$/, - '$2 $1 $3' + {dataset.metadata_modified + ? 'Last Updated ' + + new Date( + dataset.metadata_modified ) - : ''} -

-
-
- - -

Last modified

-
-
-
-
- {(dataset.temporal_coverage_start || - dataset.temporal_coverage_end) && ( - - - -
- -

- {dataset.temporal_coverage_start || - '?'} - {' - '} - {dataset.temporal_coverage_end || - '?'} + .toLocaleDateString( + 'en-US', + { + day: 'numeric', + month: 'short', + year: 'numeric', + } + ) + .replace( + /^([a-zA-Z]+) (\d+), (\d+)$/, + '$2 $1 $3' + ) + : ''}

- Temporal Coverage +

Last modified

- )} -
- -
-
- View dataset -
-
- -
+ {(dataset.temporal_coverage_start || + dataset.temporal_coverage_end) && ( + + + +
+ +

+ {dataset.temporal_coverage_start || + '?'} + {' - '} + {dataset.temporal_coverage_end || + '?'} +

+
+
+ + + Temporal Coverage + + +
+
+ )}
- + + +
+
+ View dataset +
+
+ +
+
+ +
-
+ ) } From 2fc092ed3dfe3f47fe06326f8a8ecbfb62f03c6e Mon Sep 17 00:00:00 2001 From: steveoni Date: Fri, 13 Dec 2024 14:34:13 +0100 Subject: [PATCH 3/5] add aria-label to the footer --- deployment/frontend/src/components/_shared/Footer.tsx | 2 ++ deployment/frontend/src/components/home/HomeFooter.tsx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/deployment/frontend/src/components/_shared/Footer.tsx b/deployment/frontend/src/components/_shared/Footer.tsx index dd885cf1f..cf97a620d 100644 --- a/deployment/frontend/src/components/_shared/Footer.tsx +++ b/deployment/frontend/src/components/_shared/Footer.tsx @@ -159,6 +159,7 @@ export default function Footer({ href="https://www.portaljs.com/" target="_blank" className=" text-wri-green" + aria-label="Portal.js website" > Portal.js {' '} @@ -168,6 +169,7 @@ export default function Footer({ Portal.js {' '} @@ -158,6 +159,7 @@ export function HomeFooter() { Date: Fri, 13 Dec 2024 16:54:00 +0100 Subject: [PATCH 4/5] update test --- e2e-tests/cypress/e2e/accesibility_test.cy.js | 1 + 1 file changed, 1 insertion(+) diff --git a/e2e-tests/cypress/e2e/accesibility_test.cy.js b/e2e-tests/cypress/e2e/accesibility_test.cy.js index 0c883bb3e..1abb93505 100644 --- a/e2e-tests/cypress/e2e/accesibility_test.cy.js +++ b/e2e-tests/cypress/e2e/accesibility_test.cy.js @@ -78,6 +78,7 @@ describe("Pages meet the accessibility requirements onload ", () => { pages.forEach((page) => { it(`${replaceParams(page)}`, () => { + cy.once('uncaught:exception', () => false); cy.visit(replaceParams(page), { timeout: 30000 }); if (page.includes("edit")) { cy.wait(5000); From 16a9c14c7f40c075bbe4cd52800b212f5f73e89a Mon Sep 17 00:00:00 2001 From: steveoni Date: Sat, 14 Dec 2024 12:02:36 +0100 Subject: [PATCH 5/5] update --- .../frontend/src/components/search/DatasetHorizontalCard.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/deployment/frontend/src/components/search/DatasetHorizontalCard.tsx b/deployment/frontend/src/components/search/DatasetHorizontalCard.tsx index 9b293b417..f1c976dc4 100644 --- a/deployment/frontend/src/components/search/DatasetHorizontalCard.tsx +++ b/deployment/frontend/src/components/search/DatasetHorizontalCard.tsx @@ -52,7 +52,6 @@ export default function DatasetHorizontalCard({

{dataset.title}