Skip to content

Conversation

@johanib
Copy link
Contributor

@johanib johanib commented Nov 19, 2025

This PR updates the npm packages to the latest majors.
It removes jest, as it was unused.
It upgrades bootstrap from 3 > 5.
ESlint is upgraded to version 9.
And others..

Some deliberation took place on legacy browser support.
Currently, gateway uses almost no javascript, except for jquery. Before this change, jquery 3 was already used. Jquery 3 is not supported by old browsers at all. So I do not think, js compatibility should be affected. No new javascript code was added.
As for css, autoprefix was added to ensure old browser fallbacks as needed, in response to the bootstrap 5 upgrade.

@johanib johanib changed the base branch from main to feature/package_updates_nov_25 November 19, 2025 06:59
@johanib johanib force-pushed the feature/frontend_nov_25 branch 7 times, most recently from fcef9c0 to 4bf3b06 Compare November 19, 2025 08:57
@johanib johanib marked this pull request as ready for review November 19, 2025 09:04
@johanib johanib changed the title Feature/frontend nov 25 Update npm packages & tooling Nov 19, 2025
@johanib johanib force-pushed the feature/frontend_nov_25 branch from 4bf3b06 to 7eaa2eb Compare November 19, 2025 09:31
Copy link
Member

@MKodde MKodde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have little comments about the code changes. Awesome to see you upgrade these packages and seeing them actually work well! Chapeau!

Questions after clicking through the /preview pages;

  1. I could not view the previews in env = test. So either fix that, or only allow in smoketest. Either one is fine with me. My personal preference would be for them to also be available in dev.
  2. Could you drop the popper js dependency? Or is it actually used by Gateway? I could not find it, Nor remember where/when we used it 🤔
  3. Suggestion: add all available SF types to the WAYG screen and maybe fix missing icons?

@johanib johanib force-pushed the feature/package_updates_nov_25 branch 2 times, most recently from c603724 to de1f119 Compare November 19, 2025 14:51
Prior to this change, on dev, test and smoketest environments, the permissions of var/log and var/cache would reset after every cache:clear command. Without these permissions, the site does not work, resulting in a 500.

This change ensures correct ownership on local development.
@johanib johanib force-pushed the feature/frontend_nov_25 branch 2 times, most recently from 652973c to 96d8f24 Compare November 19, 2025 15:08
Prior to this change, eslint used the `airbnb` config. This is a config for react projects. Stepup-Gateway does not use react, resulting in errors, because eslint required things like jsx packages.

This change uses `airbnb-base` and adds the required ts support.

---

Resolve Sass compilation warnings by running the migrate tool

--

Replaced `eslint-loader` with `eslint-webpack-plugin` as eslint-loader is deprecated, and suggests eslint-webpack-plugin as a replacement.
@johanib johanib force-pushed the feature/frontend_nov_25 branch from 96d8f24 to f63858c Compare November 19, 2025 15:10
Silence the rest, as it originates from bootstrap 5, which we do not have control over.

Keep an @import for bootstrap in the application.scss as bootstrap is
not compatible with newer sass.

Also switch sass-loader to use the modern Dart Sass JavaScript API instead of the legacy one.

This resolves Module Warning (from ./node_modules/sass-loader/dist/cjs.js):
              Deprecation The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

              More info: https://sass-lang.com/d/legacy-js-api
ESlint 9 uses a new flat config. The airbnb config is no longer used. Switched to modern `typescript-eslint`

* Remove jest
Prior to this change, the js + css would target modern browsers.

This change adds autoprefixer to output css for older browsers and babel
for the js.

Realistically, ie6 support is not possible. This change ensures the
modern features of css and js are kept back as much as possible.
As the templates function without javascript, really old browsers should
click perform the redirect automatically. Apart from autosubmit, no js
is used.
@johanib johanib force-pushed the feature/frontend_nov_25 branch from f63858c to dbff33a Compare November 19, 2025 15:23
@johanib
Copy link
Contributor Author

johanib commented Nov 19, 2025

I have little comments about the code changes. Awesome to see you upgrade these packages and seeing them actually work well! Chapeau!

Questions after clicking through the /preview pages;

  1. I could not view the previews in env = test. So either fix that, or only allow in smoketest. Either one is fine with me. My personal preference would be for them to also be available in dev.

I decided to only add it to smoketest because:

  • Adding it to dev would complicate the service/route yaml, which are already messy imo.
  • It fits in with the current behat-only routes, which also only work in smoketest.
  • In practice, when developing, I want to run the behat tests, which require the smoketest env. So I develop in smoketest env.
    So for now, I don't want to complicate it, updated the readme to reflect this.
  1. Could you drop the popper js dependency? Or is it actually used by Gateway? I could not find it, Nor remember where/when we used it 🤔

I'm pretty sure we don't use it. It's a requirement by bootstrap. I dropped it.

Base automatically changed from feature/package_updates_nov_25 to main November 24, 2025 09:57
@johanib johanib merged commit 400a38b into main Nov 24, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants