Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tech-debt: Remove reporting-dates-tables.js by converting legacy tables to use new template and JS #6491

Open
50 of 56 tasks
johnnyporkchops opened this issue Sep 27, 2024 · 0 comments · May be fixed by #6512
Open
50 of 56 tasks

Comments

@johnnyporkchops
Copy link
Contributor

johnnyporkchops commented Sep 27, 2024

Summary

What we're after:
Convert legacy Reporting dates tables to new template so we can remove redundant JS

  • Legacy reporting dates tables use full_width_page.html template and reporting-dates-tables.js
  • New tables starting around 2024 use reporting_dates_table.html and election-reporting-dates-tables.js
  • Inventory pages that use legacy reporting-dates-tables.js (full_width_page.html) in consultation with @djgarr
  • Convert the legacy tables where necessary (if they have multiple footnotes) to use the new template/JS and delete legacy JS

inventory of all pages using FullWidth page template:

Wagtail explorer list: https://www.fec.gov/admin/pages/usage/home/fullwidthpage/

Pages using FullWidth Template checklist:

Related issues/PRs

Issues:
#5153

PRs:
New:
#5786
#5798
Legacy: #3227
Removal:
#6512

Completion criteria

  • Legacy reporting dates tables that use full_width_page.html template and reporting-dates-tables.js are converted to use reporting_dates_table.html and election-reporting-dates-tables.js (where necessary...when they have multiple footnotes and need JS)
  • Use the info tab of the page editor to see where that page is referenced (linked to) and make sure links work. Not sure, but may have to change links to external link with full url, or convert to html link with the same slug.
  • Add inline JS in html block to the three pages indicated in the. list above with "TODO" for zebra striping by state.
  • Remove reference to reporting-dates-tables.js in full_width_page.html and Delete reporting-dates-tables.js from filesystem (PR)
  • ? Do we still need to reference data-init.js in FullWidth template ? ( this was resolved by Add a11y modal dialog to global.js #6496)
  • Keep full_width_page.html as legacy reporting dates pages that do not need JS other non reporting dates pages will continue to use it.

Tech steps or considerations (optional)

  • make sure any pages using full_width_page.html template do not need the reporting-dates-tables.js that is hardcoded into it

Future work

Other future work that may be needed following this issue's completion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔜 Sprint backlog
Development

Successfully merging a pull request may close this issue.

1 participant