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

Google Lighthouse Fixes #92

Merged
merged 4 commits into from
Jul 19, 2024
Merged

Conversation

Charlesthebird
Copy link
Collaborator

@Charlesthebird Charlesthebird commented Jul 18, 2024

Description

This PR includes fixes related to Google Lighthouse testing on the home and APIs pages. We have less control over the API details page since we use the Redoc and Swagger libraries for viewing the API schema, but these improvements carried over to that page as well.

  • The default images we include were converted from PNG to webp. This ended up being a big improvement.
  • Image aspect ratios are now maintained using the object-fit CSS property.
  • Invalid role attributes were removed.

Results

Some of the suggestions are related to what the VITE_PORTAL_SERVER_URL and image environment variables are set to, so those scores will depend on user configurations.

The home page and APIs page had very similar scores, and improvements, so I will just include the home page scores here.

Before lighthouse fixes (on the home page):
lighthouse-before-improvements.pdf

  • Performance: 83
  • Accessibility: 88
  • Best Practices: 70
  • The build size is 5MB

After lighthouse fixes (on the home page):
lighthouse-after-improvements.pdf

  • Performance: 91
  • Accessibility: 95
  • Best Practices: 78
  • The build size is 4.2MB

BOT NOTES:
resolves https://github.com/solo-io/gloo-mesh-enterprise/issues/15009

Signed-off-by: Nicholas Bucher <[email protected]>
Signed-off-by: Nicholas Bucher <[email protected]>
@Charlesthebird Charlesthebird changed the title initial fixes Google Lighthouse Fixes Jul 19, 2024
Signed-off-by: Nicholas Bucher <[email protected]>
@solo-changelog-bot
Copy link

Issues linked to changelog:
https://github.com/solo-io/gloo-mesh-enterprise/issues/15009

@Charlesthebird Charlesthebird marked this pull request as ready for review July 19, 2024 18:02
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
Copy link
Contributor

Choose a reason for hiding this comment

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

huh; I never knew this should be lowercase

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this was actually a prettier fix, and not in the lighthouse score.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Apparently it's not case sensitive, so it should be okay either way.

width: 100%;
}
background-size: cover;
object-fit: cover;
Copy link
Contributor

Choose a reason for hiding this comment

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

Very nice! I actually used this once on a personal project once ages ago, but I 1000% forgot this existed; thanks for the reminder ;)

@Charlesthebird Charlesthebird merged commit b6c8a8c into main Jul 19, 2024
3 checks passed
@Charlesthebird Charlesthebird deleted the charlesthebird/lighthouseFixes branch September 12, 2024 17:07
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