-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Bugfixes and minor improvements #858
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one nit
src/js/techreport/timeseries.js
Outdated
label.innerHTML = latest.technology; | ||
if(latestValue) { | ||
value.innerHTML = `${latestValue}${config.series.suffix || ''}`; | ||
if(summary) { | ||
value.innerHTML = `${summaryValue}`; | ||
secondaryValue.innerHTML = `${latestValue}${config.series.suffix || ''}`; | ||
} else { | ||
value.innerHTML = `${latestValue}${config.series.suffix || ''}`; | ||
} | ||
} else { | ||
value.classList.add('undefined'); | ||
value.innerHTML = 'No data'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit but we've recently discovered innerHTML
(and innerText
) is actually a bit slower than textContent
.
It if really is just text (and I'm not sure if it always is), could we use textContent
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far it's only text, can update to textContent
src/js/techreport/utils/data.js
Outdated
client: 'desktop', | ||
date: date, | ||
}, | ||
mobile: { | ||
...submetric.mobile, | ||
median_bytes_formatted: submetric.mobile.median_bytes > 1024 ? `${Math.round(submetric.mobile.median_bytes / 1024)} KB` : submetric.mobile.median_bytes > 1048576 ? `${Math.round(submetric.mobile.median_bytes / 1048576)} MB` : `${submetric.mobile.median_bytes} bytes`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment. (should this conversion be moved to a reusable function?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, will move to a function in the utils 👍🏻
@@ -39,13 +39,15 @@ <h4> | |||
<div class="breakdown-item"> | |||
<p class="breakdown-label">{{ breakdown.name }}</p> | |||
<p class="breakdown-value">00{% if breakdown.suffix == "%" %}.00{% endif %}{{ breakdown.suffix }}</p> | |||
<p class="breakdown-value-secondary"></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it for now since the title
comes with accessibility challenges and is easily overlooked anyway. If people need to hover to see the value they can just as well hover over the graph (which works with keyboard etc) 😄
If we get feedback that it's confusing that one is in MB/KB and the other one in bytes, then maybe we can add a custom (accessible) tooltip on the formatted values.
Co-authored-by: Rick Viscomi <[email protected]>
…nto cwvtech-bugfixes
@rviscomi updated :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
Summary of the changes
Changed from reported bugfixes:
Solves issue: Beta Report - Confusion about where the data is #851
Solves issue: Improve tech report page weight formatting #853
Solives issue: Improve tech report page weight formatting #853
Solves issue: Tech report data tooltips show datetime in local timezone #849
Solves issue: Update beta header #854
Solves issue: Beta Report - Blank Dropdown List Items in Dark Theme #850
Solves issue: Upgrade to production tech report API #864
Additional changes:
Screenshots
Timezone San Francisco - main branch
![Hover on a chart showing data for Jan 31st](https://private-user-images.githubusercontent.com/10811350/331376369-cd99ea3d-5d3c-427d-aa51-462ba776ee62.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NDQ3MDAsIm5iZiI6MTczODk0NDQwMCwicGF0aCI6Ii8xMDgxMTM1MC8zMzEzNzYzNjktY2Q5OWVhM2QtNWQzYy00MjdkLWFhNTEtNDYyYmE3NzZlZTYyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE2MDY0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA2NTQ1YjYyYzQ2YTE2ZmU1M2U2Mjk2M2U0MzMwNmI5OTg1NDBiOTg1OTlkYzA3Y2JmMWNjMTFkMTUwNjU5MWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.2ZTrQafVs0TeTkFGPeP-815HRKKNjmDzz2Os3wjhrVM)
Timezone San Francisco - changes
![Hover on a chart showing data for Feb 1](https://private-user-images.githubusercontent.com/10811350/331376537-9ea6f736-406b-4f2b-b786-ee1f88d9fb56.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NDQ3MDAsIm5iZiI6MTczODk0NDQwMCwicGF0aCI6Ii8xMDgxMTM1MC8zMzEzNzY1MzctOWVhNmY3MzYtNDA2Yi00ZjJiLWI3ODYtZWUxZjg4ZDlmYjU2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE2MDY0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk0YzAxZDVlODNmYzJlNWJhOWRkZTU4ZjBkZGVjNzMzODQzY2U2NjA2YjgxYWY0ZDc0NmVhZjE0Nzk2Yjk2MDUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.LdZWw80mLKrVOz97HOefAHFUMYBICpO34UGSSXTbNLU)