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

Drop old URLs from dashboard report #46

Merged
merged 3 commits into from
Sep 3, 2024
Merged

Conversation

chosak
Copy link
Member

@chosak chosak commented Jul 16, 2024

This PR modifies how Webpack is used to generate the Lighthouse dashboard, so that it drops old URLs that were tested in previous nightly runs but weren't tested in the latest run.

This doesn't remove those old reports from the repository, or from the singular reports.json file that we generate that aggregates all of the reports -- it only modifies how the dashboard website is built to exclude those results from the dashboard.

See internal https://github.local/Design-Development/Design-and-Content-Team/issues/502 for context.

I've also updated the linter config for this repo by copying the settings from https://github.com/cfpb/design-system, and cleaned up some old font files that somehow got built up over time.

Testing

Pull down this repository then run yarn && yarn serve and you'll see that your local http://127.0.0.1:8080/ server excludes URLs that aren't in the most recent test set (compare against https://cfpb.github.io/cfgov-lighthouse/).

Todos

There may be a nicer way to write the JS to implement the desired logic; @anselmbradford @contolini please feel free to school me if so.

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows the standards laid out in the development playbook
  • Passes all existing automated tests

@chosak chosak force-pushed the fix/dashboard-hide-old-urls branch from 5f1d301 to 9b26230 Compare July 16, 2024 21:05
@chosak
Copy link
Member Author

chosak commented Jul 16, 2024

Hm, it actually seems like this script no longer works properly, because GH.com blocks the download of the raw file. If you look in the repo it actually commits a GH.com webpage instead of the font file. @anselmbradford @contolini what is the proper way to use the fonts? Do they need to be added to this repository as well?

@anselmbradford
Copy link
Member

@chosak in DS v3 there is a mixin, @include licensed-font('/path/to/fonts');, for including the fonts. This would be placed in your main entry-point scss file after importing the DS. Just don't include that mixin to omit the Avenir fonts. Do you want to do the DS v3 update here, or in another PR?

@chosak chosak mentioned this pull request Aug 26, 2024
4 tasks
@chosak
Copy link
Member Author

chosak commented Aug 26, 2024

Do you want to do the DS v3 update here, or in another PR?

@anselmbradford I've done the upgrade separately in #47, and will revisit this PR once that goes in.

This commit modifies how Webpack is used to generate the Lighthouse
dashboard, so that it drops old URLs that were tested in previous
nightly runs but weren't tested in the latest run.

This doesn't remove those old reports from the repository, or from the
singular reports.json file that we generate that aggregates all of the
reports -- it only modifies how the dashboard website is built to
exclude those results from the dashboard.

See internal https://github.local/Design-Development/Design-and-Content-Team/issues/502
for context.
@chosak chosak force-pushed the fix/dashboard-hide-old-urls branch from 9b26230 to deefd2a Compare September 3, 2024 16:20
@chosak chosak merged commit 10455bf into main Sep 3, 2024
1 check passed
@chosak chosak deleted the fix/dashboard-hide-old-urls branch September 3, 2024 16:23
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