Skip to content

Commit

Permalink
Address final feedback in RFC 190
Browse files Browse the repository at this point in the history
During the review of [RFC 190](web-platform-tests/rfcs#190),
we agreed that we should:
- Remove the button when in interop and allow this to be reachable by
  query parameter only.

This change does that by removing the button added in #3753

The idea is to allow users to accomplish their
workflows with view=test without confusing others. Another RFC would be
needed to add a button.

Additionally, since this RFC has been accepted, we can remove the
feature flag gating it.
  • Loading branch information
jcscottiii committed Jul 16, 2024
1 parent 6bfef54 commit 33caf19
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
6 changes: 0 additions & 6 deletions webapp/components/wpt-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Object.defineProperty(wpt, 'ClientSideFeatures', {
'queryBuilder',
'queryBuilderSHA',
'showBSF',
'showViewEqTest',
'structuredQueries',
'triageMetadataUI',
'webPlatformTestsLive',
Expand Down Expand Up @@ -259,11 +258,6 @@ class WPTFlagsEditor extends FlagsEditorClass(/*environmentFlags*/ false) {
Enable Browser Specific Failures graph
</paper-checkbox>
</paper-item>
<paper-item>
<paper-checkbox checked="{{showViewEqTest}}">
Enable view=test query parameter
</paper-checkbox>
</paper-item>
`;
}

Expand Down
22 changes: 1 addition & 21 deletions webapp/views/wpt-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,6 @@ class WPTResults extends AmendMetadataMixin(Pluralizer(WPTColors(WPTFlags(PathIn
<template is="dom-if" if="[[shouldDisplayToggle(canViewInteropScores, pathIsATestFile)]]">
<div class="channel-area">
<paper-button id="toggleInterop" class\$="[[ interopButtonClass(view) ]]" on-click="clickInterop">Interop View</paper-button>
<template is="dom-if" if="[[showViewEqTest]]">
<paper-button id="toggleTestView" class\$="[[ testViewButtonClass(view) ]]" on-click="clickTestView">Test View</paper-button>
</template>
<paper-button id="toggleDefault" class\$="[[ defaultButtonClass(view) ]]" on-click="clickDefault">Default View</paper-button>
</div>
</template>
Expand Down Expand Up @@ -1010,10 +1007,6 @@ class WPTResults extends AmendMetadataMixin(Pluralizer(WPTColors(WPTFlags(PathIn
return canViewInteropScores && !pathIsATestFile;
}

testViewButtonClass(view) {
return (view === VIEW_ENUM.Test) ? 'selected' : 'unselected';
}

interopButtonClass(view) {
return (view === VIEW_ENUM.Interop) ? 'selected' : 'unselected';
}
Expand All @@ -1029,18 +1022,6 @@ class WPTResults extends AmendMetadataMixin(Pluralizer(WPTColors(WPTFlags(PathIn
this.view = VIEW_ENUM.Interop;
}

clickTestView() {
if (!this.showViewEqTest) {
// Do nothing if the `showViewEqTest` feature flag is not enabled.
return;
}

if (this.isTestView()) {
return;
}
this.view = VIEW_ENUM.Test;
}

clickDefault() {
if (this.isDefaultView()) {
return;
Expand Down Expand Up @@ -1085,8 +1066,7 @@ class WPTResults extends AmendMetadataMixin(Pluralizer(WPTColors(WPTFlags(PathIn
}

isTestView() {
// If the `showViewEqTest` feature flag is not active, return false immediately.
return this.showViewEqTest && this.view === VIEW_ENUM.Test;
return this.view === VIEW_ENUM.Test;
}

getTotalsClass(totalInfo) {
Expand Down

0 comments on commit 33caf19

Please sign in to comment.