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

Optimization checklist as an HTML table #2487

Merged
merged 2 commits into from
Oct 21, 2022
Merged

Optimization checklist as an HTML table #2487

merged 2 commits into from
Oct 21, 2022

Conversation

stoyan
Copy link
Contributor

@stoyan stoyan commented Oct 18, 2022

  • kept the image as an option to download
  • reused styles from the history table
  • used as opportunity to show off some Blade templating

There's definitely room for improvement both in terms of UI (e.g. old pixel-y icons) and optimization advice, but it's a start a move away from image generation

@stoyan
Copy link
Contributor Author

stoyan commented Oct 18, 2022

Before: https://www.webpagetest.org/result/221007_AiDc8P_FYA/1/performance_optimization/
After:

Screen.Recording.2022-10-18.at.2.26.10.PM.mov

<tbody>
@foreach ($rows as $row)
<tr class="table-cell-{{ $row['color'] ?? ($loop->even ? 'even' : 'odd')}}">
Copy link
Contributor

Choose a reason for hiding this comment

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

Where does $loop come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

$loop is some Blade magic that helps working with loops
https://laravel.com/docs/9.x/blade#the-loop-variable

@tkadlec
Copy link
Contributor

tkadlec commented Oct 21, 2022

Yay for HTML! And templating!

@tkadlec tkadlec merged commit a0c981f into master Oct 21, 2022
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