Skip to content

feat: update frontend libraries

Alasdair Colley requested to merge KMDS-2379/update-javascript-libraries into main

Summary

Functional

  • Bootstrap v3 updated to v5
  • Form validation
    • Uses HTML "required" attribute on form controls, making use of browser client-side validation
    • Uses django-bootstrap5 form fields to display errors instead of custom alert elements

Development

  • Single, unified docker container with multiple stages for development and deployment
    • Frontend generated static resources are bundled into the image at build time
  • Repository visual UI regression tests
    • Uses playwright: powerful and standardised
      • Uses typescript due to visual testing only being supported for JS/TS
  • Repository functional UI tests
    • Uses playwright
      • Already used for visual regression tests
    • Shift-left on verification
    • Cover functionality not previously covered
  • Frontend package manager "yarn" added
  • Frontend bundler "webpack" added
  • CI/CD changes to run UI tests
    • Requires image to be published to Gitlab container registry under name "ui-test"
      • Container registry cleanup configured to remove images older than 7 days 

Deployment

  • CI/CD changes to build updated application image

Size

This set of changes is large due to the fundamental changes required due to the libraries being upgraded, mostly due to bootstrap.

The rest of the size is attributed to the fact that lots of large files have been removed either because they are now redundant, e.g. sourced third-party frontend dependencies and docker dev/cloud separation.

Edited by Alasdair Colley

Merge request reports