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

feat(website-frontend): load mutation-test-report-app component directly instead of via cdn #524

Merged
merged 4 commits into from
Mar 7, 2024

Conversation

hugo-vrijswijk
Copy link
Member

@hugo-vrijswijk hugo-vrijswijk commented Mar 6, 2024

This allows for better bundling, and should lazy-loading/module-splitting be enabled, this won't load the mutation-test-report-app on pages other than the reports page.
The event handling is a bit weird, but this is just how Angular is with custom element events, I suppose.

Also some minor changes:

  • Uses nest.js static file serving instead of express middleware.
  • Adds more strict cache-control headers for static files, this results in much faster loading on subsequent visits.
  • Adds setup-node workflow steps with caching to not be dependent on GH Actions node versions and faster npm ci
  • Adds a robots.txt
  • Replace lerna packages with npm workspace

@hugo-vrijswijk hugo-vrijswijk force-pushed the import-component branch 2 times, most recently from ce30641 to 47e76ac Compare March 6, 2024 14:06
…tly instead of via cdn

This allows for better bundling, and should lazy-loading/module-splitting be enabled, this won't load the mutation-test-report-app on pages other than the reports page.
The event handling is a bit weird, but this is just how Angular is with custom element events, I suppose.

Also some minor changes:
- Uses nest.js static file serving instead of express middleware.
- Adds more strict cache-control headers for static files, this results in __much__ faster loading on subsequent visits.
- Adds a robots.txt
@hugo-vrijswijk hugo-vrijswijk force-pushed the import-component branch 3 times, most recently from 10ff52b to 93fe7f5 Compare March 6, 2024 14:53
@xandervedder
Copy link
Collaborator

The event handling is a bit weird, but this is just how Angular is with custom element events, I suppose.

It is. I was actually planning on removing angular from the dashboard after #519 is done, should also reduce the amount of data transferred :).

I will look at this in more detail but it seems like a big improvement!

xandervedder
xandervedder previously approved these changes Mar 6, 2024
Copy link
Collaborator

@xandervedder xandervedder left a comment

Choose a reason for hiding this comment

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

Looks good to me, though I prefer pinning the versions. Up to you if you'd like to fix it 👍

packages/website-backend/src/app.module.ts Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
packages/badge-api/package.json Outdated Show resolved Hide resolved
@hugo-vrijswijk hugo-vrijswijk merged commit 5a133a9 into master Mar 7, 2024
3 checks passed
@hugo-vrijswijk hugo-vrijswijk deleted the import-component branch March 7, 2024 12:20
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.

2 participants