You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What we're after:
Remove the hardcoded reference to reporting-dates-tables.js in the full_width_page template. This is not necessary if an editor uses this template for something other than reporting dates table. We do not want to load unnecessary JS to optimize performance reduce potential attack surface.
We can include a reference to the JS file via a Wagtail choice field like we do on custom_page template by adding a conditiona_je field to settings tab.
conditional_js is now a field available in the Wagtail settings tab on FullWidthPage template
reporting-dates-tables.js is added to constants.py
full_width_page.html template as been altered like custom_page.html to reference conditional_js value if it exists instead of hardcoding a reference to reporting-dates-tables.js
Reporting dates pages that use FullWidthPage have the reporting-dates-tables.js chosen in conditional_js dropdown.
Tech steps or considerations (optional)
Work with @djgarr to determine best way to eliminate or reduce downtime of the Reporting dates tables' footnote, filtering and modal window functionality during this transition.
Ask @djgarr for inventory of pages using FullWidthPage template that require the script to work. How far back didi we start using the FullWidthPage template for these tables?
Future work
Coordinate the switchover with content team and @djgarr , to minimize downtime of reporting dates tables that rely on the script
The text was updated successfully, but these errors were encountered:
Summary
What we're after:
Remove the hardcoded reference to
reporting-dates-tables.js
in thefull_width_page template
. This is not necessary if an editor uses this template for something other than reporting dates table. We do not want to load unnecessary JS to optimize performance reduce potential attack surface.We can include a reference to the JS file via a Wagtail choice field like we do on
custom_page
template by adding a conditiona_je field to settings tab.Related issues/PRs
#5145
https://github.com/fecgov/fec-cms/pull/4330/files (See how current conditional_js was done on CustomPage)
Completion criteria
conditional_js
is now a field available in the Wagtail settings tab onFullWidthPage
templatereporting-dates-tables.js
is added toconstants.py
full_width_page.html
template as been altered likecustom_page.html
to referenceconditional_js
value if it exists instead of hardcoding a reference toreporting-dates-tables.js
FullWidthPage
have thereporting-dates-tables.js
chosen inconditional_js
dropdown.Tech steps or considerations (optional)
FullWidthPage
template that require the script to work. How far back didi we start using theFullWidthPage
template for these tables?Future work
The text was updated successfully, but these errors were encountered: