Commit Graph

86 Commits

Author SHA1 Message Date
Alexander Brandon Coles f133e8fd80 Silence frontend spec warnings
Filter the jquery-migrate banner through Vitest `onConsoleLog` in a new
`vitest-base.config.ts` wired in via the builder `runnerConfig`, instead
of reassigning the global `console.log`. Console warnings and errors
that a spec asserts on are scoped per spec with `vi.spyOn`.

Drop the redundant manual `ngAfterViewInit` calls and select items
programmatically in the autocompleter spec, and wait on activation with
`vi.waitFor` in the edit-form spec instead of fixed microtask ticks.
2026-06-13 15:37:45 +01:00
Alexander Brandon Coles 401c39192f Merge pull request #23329 from opf/code-maintenance/75300-stimulus-test-helpers
[#75300] Stimulus: shared test helper infrastructure
2026-05-27 10:57:14 +02:00
Alexander Brandon Coles c150ef9d52 Remove unused jQuery plugins
Drop unused jquery.caret and jQuery mark.js imports and remove the
vendored jQuery UI JavaScript and stylesheet assets. The remaining
compatibility path only keeps globals for legacy plugins still loaded
at runtime.
2026-05-26 12:03:19 +02:00
Alexander Brandon Coles 855222a631 [#69633] Remove jQuery global
Remove jQuery from global window scope in main application to enable
incremental migration away from jQuery.

- Removed global jQuery init from `init-vendors.ts`
- Created local init-jquery modules for reporting that still require
  jQuery globals for legacy plugins
- Updated TypeScript shims to declare `window.jQuery` as optional

https://community.openproject.org/wp/69633
2026-05-26 12:03:19 +02:00
Alexander Brandon Coles 756b76a3b7 [#75300] Wire up jest-dom and browser polyfills
Adds `@testing-library/jest-dom/vitest` import to make semantic matchers
available globally in all specs. Creates `test-browser-polyfills.ts` to
shim `process.env` for Playwright browser runners where `picocolors` (a
jest-dom transitive dependency) reads it at import time. Registers both
files in `angular.json` setupFiles and `tsconfig.spec.json`.

https://community.openproject.org/work_packages/75300
2026-05-23 01:40:17 +02:00
Alexander Brandon Coles e3bb5d4949 [#66563] Config Vitest to use Playwright browsers
Defaults to dot reporter.

https://community.openproject.org/wp/66563
2026-05-12 20:22:42 +02:00
Alexander Brandon Coles e371e2ef29 [#66563] Use custom ESBuild test builder
Use the custom-esbuild unit-test builder so Vitest reuses the
application esbuild plugins during test execution.

Analogous to e6b2ccaaa9.
See: https://github.com/just-jeb/angular-builders

https://community.openproject.org/wp/66563
2026-05-08 09:53:24 +02:00
Alexander Brandon Coles 4b3a36a0f5 [#66563] Configure Vitest
Wire the frontend test target to Vitest and add shared setup for Angular
specs under esbuild.

https://community.openproject.org/wp/66563
2026-05-08 09:52:17 +02:00
Alexander Brandon Coles 385f461685 [#73890] Drop standalone Backlogs CSS bundle
Removes the dedicated `backlogs.scss` entrypoint, its `angular.json`
bundle entry, and the import in `global_styles/openproject`. Moves
the remaining page-level rules to live beside the other module
style sheets at `global_styles/content/modules/_backlogs.sass`.
With card styles now colocated alongside their components, no
Backlogs-specific CSS is left to warrant a separate bundle.

https://community.openproject.org/work_packages/73890
2026-04-30 18:36:07 +02:00
Oliver Günther c91486cbc1 Bump CKEditor to 48.0 2026-04-27 13:53:02 +02:00
Alexander Brandon Coles 7eb1b1dc12 Remove ignore for obsolete mixed-decls deprecation 2026-01-23 05:43:47 -03:00
Ivan Kuchin be633df940 update openapi-explorer to 2.4.784 including it through packages 2025-12-19 21:32:18 +01:00
Bruno Pagno ff1b957e31 use BlockNote as a custom element under a shadow dom root
- updated blocknote version
- updated op-blocknote-extensions version
- injecting CSS into the shadow dom
2025-12-12 09:32:54 +01:00
Bruno Pagno 06776cb7d2 update blocknote version, include new dependencies, adjust frontend accordingly 2025-10-16 09:27:32 +02:00
Oliver Günther 6d67ef6d01 Merge remote-tracking branch 'origin/release/16.3' into dev 2025-08-22 08:22:44 +02:00
Alexander Brandon Coles 842fa3b4e3 Tell ng build not to render an HTML index file 2025-08-20 19:50:28 +01:00
Alexander Brandon Coles 46af7847b1 Tell ng build to silence Sass deprecation warnings
Silences the following warnings for now:

- "darken() is deprecated."

  https://sass-lang.com/d/color-functions

- "Global built-in functions are deprecated and will be removed in Dart
  Sass 3.0.0"
- "Sass @import rules are deprecated and will be removed in Dart Sass
  3.0.0."

  https://sass-lang.com/d/import/

- "Sass's behavior for declarations that appear after nested rules will
  be changing to match the behavior specified by CSS in an upcoming
  version."

  https://sass-lang.com/d/mixed-decls/

See list of deprecation IDs: https://sass-lang.com/documentation/cli/dart-sass/#fatal-deprecation
2025-08-20 19:50:28 +01:00
Alexander Brandon Coles 91f1283667 Configure ng build to define NODE_ENV
This is necessary to ensure we get production builds of react-dom and
other packages.
2025-08-20 19:22:47 +01:00
Alexander Brandon Coles 6e0ea8d18c Bump ng2-charts to ^8.0.0 (#19680)
* Bump ng2-charts to ^8.0.0

* Bump chart.js to 4.5.0

* Update imports, providers using default config

* Remove chart.js dependencies from CJS allowlist

These dependencies are now provided as ESM.

* Revert A11y-related Chart colour changes

These improvements were intended to improve the contrast (and thus
accessibility) of bar charts rendered by the Work Packages Overview
widget. However, the solution as implemented, when combined with the
upgrade to ng-charts2 8.0.0, breaks styling of non-bar charts rendered
by the Work Packages Graph widget.

This partially reverts commit 89135ae36c.
2025-08-19 13:33:12 +02:00
Alexander Brandon Coles aec52d6c25 Make jQuery an external script, load immediately
Make jQuery available to inline scripts.
2025-07-23 13:46:20 +01:00
Alexander Brandon Coles f8369da8f2 Merge pull request #19658 from opf/code-maintenance/angular-20
[#65998] Upgrade Angular to v20
2025-07-23 09:19:19 +01:00
Alexander Brandon Coles 2869da6f90 Update Angular to v20
Force updates Angular dependencies:

    ng update @angular/core@20 @angular/cli@20 --force

And performs automated upgrade:

- Moves imports of `DOCUMENT` from `@angular/common` to `@angular/core`.
- Replaces usages of the deprecated InjectFlags enum.
2025-07-23 08:54:14 +01:00
Alexander Brandon Coles 3cf7a563cd Custom esbuild config: prepend dir to chunk names
Prevents potential naming collisions when  `--named-chunks` option is
passed to `ng build`.
2025-07-22 15:33:03 +01:00
Alexander Brandon Coles e6b2ccaaa9 Switch to custom ESBuild builder
See: https://github.com/just-jeb/angular-builders/tree/18.x.x/packages/custom-esbuild
2025-07-18 08:49:43 +01:00
Alexander Brandon Coles a7282bdad6 Switch to application bundler
See: https://angular.dev/tools/cli/build-system-migration#for-existing-applications
2025-07-18 08:49:42 +01:00
Alexander Brandon Coles aa9febc397 [#64605] First pass migrating to browser-esbuild
* Switches ng build to browser-esbuild builder.
* Fixes static and dynamic imports.
* Switches to relative asset paths.
* Modernizes tsconfig files.
* Vendors jquery-ui. / HT https://gorails.com/episodes/how-to-use-jquery-with-esbuild
* Fixes various out-of-date path references.

See https://angular.dev/tools/cli/build-system-migration\#manual-migration-to-the-compatibility-builder
2025-07-18 08:49:40 +01:00
Bruno Pagno ab2013677c Use BlockNote in open project 2025-06-30 08:54:35 +02:00
Oliver Günther b151e8017d Use explicit fast build without source maps and minify for testing and PullPreview (#16563)
Use explicit fast build without source maps and minify for testing and PP
2024-08-30 10:41:53 +02:00
Oliver Günther 5995f0a05d Remove backlogs pages in favor of custom css 2024-06-12 15:13:16 +02:00
Oliver Günther e95884a5ce Bump Angular to 17 2024-04-15 20:35:45 +02:00
Oliver Günther b82ddbc583 Remove storybook from actively building, keep last build 2023-11-08 14:05:33 +01:00
Cyril Rohr 8ff5d7117a Use fast build for CI assets 2023-11-06 17:38:33 +01:00
Jonas Jabari 16588d0cc1 [37297] automatic meeting agendas and minutes linked to work packages
Squashed from https://github.com/opf/openproject/pull/13527

https://community.openproject.org/work_packages/37297
2023-09-20 09:51:29 +02:00
Oliver Günther 4500118f13 Try faster pullpreview builds 2023-08-07 14:31:42 +02:00
Oliver Günther 8989f2d439 Add lookbook 2023-08-02 13:57:27 +02:00
Oliver Günther 3de2e70089 Use custom webpack config with terser to keep classnames 2023-07-25 16:25:46 +02:00
Henriette Darge d90573f8ac Introduce Primer CSS and Primer ViewComponents 2023-07-11 12:04:14 +02:00
Oliver Günther 2da517a5c4 Exclude stimulus controllers from compodoc build 2023-07-04 14:36:08 +02:00
Oliver Günther 3aa4e87614 angular.json expects an empty string, not boolean 2023-06-15 11:15:42 +02:00
Oliver Günther 88fbf0d946 Don't build angular index.html 2023-06-15 11:00:09 +02:00
Oliver Günther 05e5ebd5cf Enable cache in all environments 2023-05-25 21:17:33 +02:00
Yule cf02771a5d Update to storybook v7
This commit updates storybook to version 7, which comes with some nice updates to the way stories are written and presented.

Closes https://community.openproject.org/work_packages/47635/activity
2023-04-25 12:08:36 +00:00
Oliver Günther 39360ebde2 Update Angular to v15 (#11778)
* Update angular to v15

Also bumps fullcalendar to v6-beta to be compatible

Bump fullcalendar to v6 final

* Fix accessing readOnly property that no longer exists

* Replace content projection

* Fix confusing duplicate variables scss, sass file

One can be imported by helpers, the other not
2023-01-03 15:35:39 +00:00
Oliver Günther dddcc03c77 Work around fullcalendar css import
https://github.com/fullcalendar/fullcalendar-angular/issues/403
2022-12-06 13:37:42 +01:00
Oliver Günther facc347fc3 Bump angular to v14 2022-12-06 13:37:40 +01:00
Benjamin Bädorf 0c67a5b821 Fix PR comments 2022-03-07 17:12:57 +01:00
Oliver Günther 4ede61e42c Bump angular to 12.0 (#9334)
* Upgrade angular to 12.0

* Fix TS errors after upgrade

* Upgrade pako and fix usage of deflate

Pako 2 no longer outputs binary encoded strings, so we need to use a separate helper lib

* Better spec error reporting and fix beforeunload spec

* Bump node compiler size
2021-06-01 08:46:32 +02:00
Philipp Tessenow a46de71009 [#36204] Add new GitHub plugin tab enabling users to copy git actions (#9027)
* Let GitHub integration show changes in a separate tab

* added new github integration icons to icon font
* add tab content:  working tab-header and copy-menu

* modernise github_integrations ruby code

* refactored some code to be more modern ruby (if wrote most of it 7
  years ago and couldn't look at some parts without squinting too much)
* make some intended-to-be-private module methods actually private
* fixed all rubocop errors in the /modules/github_integration
* re-organized tests a little
* gave our rubocop.yml some RSpec-related defaults -- happy to discuss
  these, but I think we can live with these as a good starting point

👆 all without actually (intentionally) changing the behaviour

* removed dead angular template code

* codeclimate found more things than rubocop :)

* removed create-pr-button since we decided against implementing that feature

* added missing translations

* properly cache the github related part of the wp api

* lower case pull requests in translations

* fix specs
2021-04-07 09:34:56 +02:00
Oliver Günther 6944affca8 [35527] Add quick-menu to top menu (#9058)
* [35527] Add quick add button menu in top menu

* Add quick menu item to top menu

* Refactor top_menu.sass to follow BEM

* Only render project-based path if persisted

* Render project types when in project context

* Add headline and determine if any types are visible

* Hide quick add menu for unauthorized users

* Fix login menu dropdown by adding class

* Add schematic for correctly generating components

* Add augment service for triggering invite user modal

* Fix allowed_to? check in menu

* Add spec

* Highlight types and show all

* Fix help menu overridden

* Extend spec

* Add parent_id to project in dropdown and expand advanced settings

* Reload the page if the modal returned any data

* Fix invalid url allowed check if there is no URL to check

* Restrict top_menu sass

* Remove unused imports

* Reduce required permissions to show quick add

* Spec review feedback

* Rename project fieldset ID
2021-03-24 17:51:14 +01:00
Oliver Günther 3b78be087b Migrate tslint to eslint (#9064)
* tslint to eslint migration

* Autofix issues

* Fix codeclimate path to eslintrc

* Extend linter config for use with ng lint

* Change prefix to op in angular lints
2021-03-05 21:34:26 +01:00