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

Use Blade for test history and a Console.log tab #2228

Merged
merged 3 commits into from
Aug 22, 2022
Merged

Use Blade for test history and a Console.log tab #2228

merged 3 commits into from
Aug 22, 2022

Conversation

stoyan
Copy link
Contributor

@stoyan stoyan commented Aug 2, 2022

Currently commented out behind // uncomment for Blade because I need a better setup to test more thoroughly the logged in case.

But yes, it's working! Thanks to @jefflembeck's templates and because Blade lets you drop to just PHP I was able to reuse headers/footers/common as-is. And so no need for more competing code (see issue #2193)

@stoyan stoyan changed the title Use Blade for test history Use Blade for test history and a Console.log tab Aug 3, 2022
@stoyan
Copy link
Contributor Author

stoyan commented Aug 3, 2022

The second diff resurrects the console.log part of this older page: https://www.webpagetest.org/screen_shot.php?test=220728_AiDc4D_D1J

It's a new tab in the results with a URL like ...org/result/220728_AiDc4D_D1J/1/consolelog/:
Screen Shot 2022-08-03 at 7 30 35 PM

This page is a bit of a Frankenstein of all templates:

  1. The new Blade stuff for the actual content
  2. The oldest www/header.inc for the results header (dropdown, screenshot, test details)
  3. Everything else from the newer www/templates (to be deprecated in favor of Blade)

}

tr.even {
background: whitesmoke;
Copy link
Contributor

Choose a reason for hiding this comment

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

how do you know all these color names??

Copy link
Contributor Author

Choose a reason for hiding this comment

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

haha, I don't, unfortunately. They do seem handy :)
The css+html is a copy of the old code, that's currently not reachable: https://github.com/WPO-Foundation/webpagetest/blob/master/www/screen_shot.php#L88
So the purpose of the diff is two-fold: to bring back the feature and while Blade-ing

<input id="filter" name="filter" type="text" onkeyup="filterHistory()" placeholder="Search">
@if ($is_logged_in)
<label for="days" class="a11y-hidden">Select how far back you want to see</label>
<select name="days">
Copy link
Contributor

Choose a reason for hiding this comment

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

needs id="days" to link to for


<div class="overflow-container">
<table id="console-log" class="translucent">
<tr>
Copy link
Contributor

Choose a reason for hiding this comment

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

thead, tbody

<tbody id="historyBody">
@foreach ($test_history as $record)
<tr>
<th><input type="checkbox" name="t[]" value="{{ $record->getTestId() }}" /></th>
Copy link
Contributor

Choose a reason for hiding this comment

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

a11y hidden label needed

<?php $even = false; ?>
<div id="test_results-container">
<div id="test-1" class="test_results">
<div class="test_results-content">
Copy link
Contributor

Choose a reason for hiding this comment

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

this is legit just a comment, but dang that's a lot of wrapper divs

@stoyan stoyan merged commit 264fe56 into master Aug 22, 2022
@stoyan stoyan deleted the temple branch August 22, 2022 18:18
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.

None yet

2 participants