From bb27b12ea86d62eb5011c12b353d78a1eab38ed7 Mon Sep 17 00:00:00 2001 From: Fuhu Xia Date: Thu, 20 Jun 2024 12:23:16 -0400 Subject: [PATCH 1/2] update datagovtheme to use js_recent_view --- .env | 3 +++ .profile | 6 ++++++ ckan/requirements.txt | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 3dc100ba..ed272696 100644 --- a/.env +++ b/.env @@ -167,6 +167,9 @@ CKANEXT__SAML2AUTH__REQUESTED_AUTHN_CONTEXT_COMPARISON=exact # Avoid double package_show call to add tracking info CKANEXT__DATAGOVCATALOG__ADD_PACKAGES_TRACKING_INFO=false +# Render recent view using AJAX call to boost page loading speed +CKANEXT__DATAGOVTHEME__JS_RECENT_VIEW=true + # Remove all translated pages, for less crawling CKAN__LOCALES_FILTERED_OUT=am ar bg bs ca cs_CZ da_DK de el en_AU en_GB es es_AR eu fa_IR fi fr gl he hr hu id is it ja km ko_KR lt lv mk mn_MN my_MM nb_NO ne nl no pl pt_BR pt_PT ro ru sk sl sq sr sr_Latn sv th tl tr uk uk_UA vi zh_Hans_CN zh_Hant_TW diff --git a/.profile b/.profile index 232044ac..f982528b 100755 --- a/.profile +++ b/.profile @@ -135,6 +135,12 @@ export CKANEXT__S3SITEMAP__AWS_BUCKET_NAME=$(vcap_get_service s3 .credentials.bu export CKANEXT__S3SITEMAP__AWS_STORAGE_PATH=catalog/sitemap export CKANEXT__S3SITEMAP__ENDPOINT_URL=https://$(vcap_get_service s3 .credentials.endpoint) +# Disable this in favor of CKANEXT__DATAGOVTHEME__JS_RECENT_VIEW +export CKANEXT__DATAGOVCATALOG__ADD_PACKAGES_TRACKING_INFO=false + +# Render recent view using AJAX call to boost page loading speed +export CKANEXT__DATAGOVTHEME__JS_RECENT_VIEW=true + # Set up the collection in Solr echo Setting up Solr collection export SOLR_COLLECTION=ckan diff --git a/ckan/requirements.txt b/ckan/requirements.txt index 184c3df2..83157a90 100644 --- a/ckan/requirements.txt +++ b/ckan/requirements.txt @@ -13,7 +13,7 @@ charset-normalizer==3.3.2 ckan @ git+https://github.com/GSA/ckan.git@7159a872ba740069b768fcd2a43cde81a57ee492 -e git+https://github.com/ckan/ckanext-archiver.git@cbfadf9fbf10405958fdef9f77a7faedc05aa20b#egg=ckanext_archiver ckanext-datagovcatalog==0.1.0 -ckanext-datagovtheme==0.2.24 +ckanext-datagovtheme==0.2.25 ckanext-datajson==0.1.25 ckanext-dcat @ git+https://github.com/ckan/ckanext-dcat@83495ba99cba17398ba8feb1bc0da486f3798584 ckanext-envvars==0.0.3 From 90041a793e3e6857ea91cb37462dfba9aea8738f Mon Sep 17 00:00:00 2001 From: Fuhu Xia Date: Fri, 21 Jun 2024 08:48:11 -0400 Subject: [PATCH 2/2] fix test --- ckan/requirements.txt | 2 +- e2e/cypress/integration/main_page.cy.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ckan/requirements.txt b/ckan/requirements.txt index 83157a90..e19970d2 100644 --- a/ckan/requirements.txt +++ b/ckan/requirements.txt @@ -13,7 +13,7 @@ charset-normalizer==3.3.2 ckan @ git+https://github.com/GSA/ckan.git@7159a872ba740069b768fcd2a43cde81a57ee492 -e git+https://github.com/ckan/ckanext-archiver.git@cbfadf9fbf10405958fdef9f77a7faedc05aa20b#egg=ckanext_archiver ckanext-datagovcatalog==0.1.0 -ckanext-datagovtheme==0.2.25 +ckanext-datagovtheme==0.2.26 ckanext-datajson==0.1.25 ckanext-dcat @ git+https://github.com/ckan/ckanext-dcat@83495ba99cba17398ba8feb1bc0da486f3798584 ckanext-envvars==0.0.3 diff --git a/e2e/cypress/integration/main_page.cy.js b/e2e/cypress/integration/main_page.cy.js index 8568add3..9e2ffc46 100644 --- a/e2e/cypress/integration/main_page.cy.js +++ b/e2e/cypress/integration/main_page.cy.js @@ -1,7 +1,7 @@ describe('Main Page', () => { it('Redirects from / to /dataset', () => { cy.visit('/'); - cy.url().should('be.equal', `${Cypress.config('baseUrl')}/dataset`); + cy.url().should('be.equal', `${Cypress.config('baseUrl')}/dataset/`); }); it('Load main page with configuration', () => {