Skip to content

Commit

Permalink
Merge branch 'main' into ans_headings
Browse files Browse the repository at this point in the history
  • Loading branch information
anselmbradford committed Sep 26, 2024
2 parents 61094ae + d257d0c commit 5d16d90
Show file tree
Hide file tree
Showing 22 changed files with 55 additions and 203 deletions.
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,14 @@ RUN cp -Rfp /build/* /usr/local && rm -Rf /build
# See .dockerignore for details on which files are included
COPY --from=cfgov-node-builder ${APP_HOME} ${APP_HOME}

# Run Django's collectstatic to collect assets from the frontend build
RUN cfgov/manage.py collectstatic
# Run Django's collectstatic to collect assets from the frontend build.
#
# Our Django settings file requires a SECRET_KEY, but we don't want to
# bake our key into the Docker image. We need to provide one in order to
# be able to run collectstatic, even though the key value isn't actually
# used in any way during staticfiles collection. We provide a random
# secret key here for this step only.
RUN SECRET_KEY=only-for-collectstatic cfgov/manage.py collectstatic

#######################################################################
# Build mod_wsgi against target Python version
Expand Down
36 changes: 35 additions & 1 deletion cfgov/unprocessed/apps/tccp/js/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import tippy from 'tippy.js';
import { analyticsSendEvent } from '@cfpb/cfpb-analytics';
import { attach } from '@cfpb/cfpb-design-system/src/index.js';

import orderingDropdown from './ordering';
Expand Down Expand Up @@ -27,7 +28,40 @@ function init() {
// Initialize any tooltips on the page
initializeTooltips();
// Reinitialize tooltips after an htmx request replaces DOM nodes
attach(document, 'htmx:afterSwap', initializeTooltips);
attach(document, 'htmx:afterSwap', initializeAndReport);
}

/**
*
* @param {Event} event - htmx event
*/
function initializeAndReport(event) {
initializeTooltips();
reportFilter(event);
}

/**
*
* @param {Event} event - htmx event
*/
function reportFilter(event) {
let category, value;
const { target } = event.detail.requestConfig.triggeringEvent;
if (target.tagName === 'SELECT') {
category = target.name;
value = target.value;
} else {
category = target
.closest('fieldset')
.firstElementChild.textContent.toLowerCase();
value = target.labels[0].textContent.trim();
}

analyticsSendEvent({
event: 'tccp:card-list-refinement',
category,
value,
});
}

/**
Expand Down
37 changes: 0 additions & 37 deletions docker/deployable-zipfile/Dockerfile

This file was deleted.

45 changes: 0 additions & 45 deletions docker/deployable-zipfile/_build.sh

This file was deleted.

11 changes: 0 additions & 11 deletions docker/deployable-zipfile/build.sh

This file was deleted.

7 changes: 0 additions & 7 deletions docker/deployable-zipfile/docker-entrypoint.sh

This file was deleted.

6 changes: 3 additions & 3 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ archives to deploy the site to a Linux server.

# Generating a deployment artifact

Running the script at `./docker/deployable-zipfile/build.sh` will start a CentOS 6
Running the script at `./docker/builder/build.sh` will start a CentOS 7
container, generate the artifact (via
[this script](https://github.com/cfpb/consumerfinance.gov/blob/main/docker/deployable-zipfile/_build.sh)),
[this script](https://github.com/cfpb/consumerfinance.gov/blob/main/docker/builder/_build.sh)),
and save it to `./cfgov_current_build.zip`.

We use CentOS 6 here, so that the Python modules that include compiled code, will
We use CentOS 7 here so that the Python modules that include compiled code, will
be compiled for the same environment they will be run in.

# What's in an artifact?
Expand Down
Binary file removed npm-packages-offline-cache/copy-anything-2.0.6.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/errno-0.1.8.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/image-size-0.5.5.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/is-what-3.14.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/less-4.2.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/make-dir-2.1.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/mime-1.6.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/needle-3.3.1.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/pify-4.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/prr-1.0.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/sax-1.4.1.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/semver-5.7.2.tgz
Binary file not shown.
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@
"@cfpb/browserslist-config": "0.0.3",
"@cfpb/cfpb-analytics": "0.3.2",
"@cfpb/cfpb-design-system": "3.2.0",
"@cypress/skip-test": "2.6.1",
"@csstools/postcss-sass": "5.1.1",
"@csstools/sass-import-resolve": "1.0.0",
"autoprefixer": "10.4.20",
"axe-core": "4.10.0",
"cypress-axe": "1.5.0",
"esbuild": "0.24.0",
"fancy-log": "2.0.0",
"highcharts": "7.2.2",
"less": "4.2.0",
"lodash.clonedeep": "4.5.0",
"lodash.throttle": "4.1.1",
"number-to-words": "1.2.4",
Expand All @@ -36,9 +34,10 @@
"svg-inline-loader": "0.8.2"
},
"devDependencies": {
"@csstools/postcss-sass": "5.1.1",
"@csstools/sass-import-resolve": "1.0.0",
"@cypress/skip-test": "2.6.1",
"axe-core": "4.10.0",
"cypress": "13.14.2",
"cypress-axe": "1.5.0",
"cypress-fail-fast": "7.1.1",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
Expand Down
Loading

0 comments on commit 5d16d90

Please sign in to comment.