-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add experimental interop mobile results view #3959
Conversation
It looks like the linter is failing due to an issue unrelated to this change.
|
I will get to it shortly |
Sent out #3968 |
c07b579
to
7523fdf
Compare
View the staging deployment here: https://2024-08-25-mobile-resu-dot-wptdashboard-staging.uk.r.appspot.com/interop-2024?mobileView It might be worth changing this view in some way to be even more explicit that these are mobile results and experimental results. |
I don't have detailed code-level feedback, but:
|
Some odd logic has been added in a commit that can be reverted later: Once we have Safari results to populate the page |
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 some minor comments
webapp/components/wpt-flags.js
Outdated
@@ -258,6 +259,11 @@ class WPTFlagsEditor extends FlagsEditorClass(/*environmentFlags*/ false) { | |||
Enable Browser Specific Failures graph | |||
</paper-checkbox> | |||
</paper-item> | |||
<paper-item> | |||
<paper-checkbox checked="{{showMobileScoresView}}"> | |||
Allow mobile results view on Interop dashboard |
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.
Enable or Show mobile results view on Interop dashboard
to make the wording consistent?
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 like it better. Changed!
webapp/interop_handler.go
Outdated
@@ -36,6 +37,18 @@ func interopHandler(w http.ResponseWriter, r *http.Request) { | |||
needsRedirect = true | |||
} | |||
|
|||
q := r.URL.Query() | |||
isMobileView, err := shared.ParseBooleanParam(q, "mobileView") |
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.
It is recommended to use hyphens to separate words [1]. It is also consistent with API params here [2]
[1] https://developers.google.com/search/docs/crawling-indexing/url-structure
[2] https://developers.google.com/search/docs/crawling-indexing/url-structure
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 call - I'll change to use that syntax
scores="[[scores]]" | ||
stable="[[stable]]" | ||
is-mobile-scores-view="[[isMobileScoresView]]"> | ||
</interop-summary> | ||
</div> | ||
<div class="grid-item grid-item-description"> | ||
<p>Interop [[year]] is a cross-browser effort to improve the interoperability of the web — |
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.
<p>Interop [[year]] is a cross-browser effort to improve the interoperability of the web — | |
<p>Interop [[year]] is a cross-browser effort to improve the interoperability of the web - |
Is this a hyphen? It looks really long
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.
This is an em dash and was chosen to use by the team that wrote up this dashboard description
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.
Aha thanks!
@@ -245,9 +290,12 @@ class InteropDataManager { | |||
browserVersions[browserIdx].push(version); | |||
|
|||
let testScore = 0.0; | |||
// Mobile csv does not have an Interop version column to account for. | |||
let versionOffset = (this.isMobileScoresView && browserName === 'Interop') ? 0 : 1; |
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.
let versionOffset = (this.isMobileScoresView && browserName === 'Interop') ? 0 : 1; | |
const versionOffset = (this.isMobileScoresView && browserName === 'Interop') ? 0 : 1; |
_, isValidMobileYear := validMobileYears[year]; | ||
if isMobileView != nil && !isValidMobileYear { | ||
year = defaultRedirectYear | ||
needsRedirect = true |
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.
minor detail: should it redirect to interop-2024? or interop-2024?mobile-view?
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.
Currently, it maintains all query parameters, so e.g. /interop-2023?mobile-view
will redirect to /interop-2024?mobile-view
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 don't think that is the case testing on the staging deployment - https://2024-08-25-mobile-resu-dot-wptdashboard-staging.uk.r.appspot.com/interop-2023?mobile-view
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.
nm it worked! The staging deployment was not up-to-date, https://2024-08-25-mobile-resu-dot-wptdashboard-staging.uk.r.appspot.com/interop-2023?mobile-view. Thanks!
This change pulls mobile results data from the interop-results repo and uses it to display a new mobile results view on the Interop dashboard. The mobile results view can only be seen by toggling a flag in
/flags
.Screen.Recording.2024-10-15.at.4.38.33.PM.mov