Skip to content

Commit

Permalink
Remove Opera from Dashboard (GoogleChrome#586)
Browse files Browse the repository at this point in the history
* Start removing Opera.

* Mark Opera removals in feature_form.js

* Remove most actual code.

* Remove last commented code.

* Remove toggleSpecLink() since it is never called.

* Feedback from Eric B.
  • Loading branch information
jpmedley authored and ebidel committed Feb 27, 2019
1 parent f971b62 commit c705e15
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 74 deletions.
12 changes: 0 additions & 12 deletions models.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,6 @@ def format_for_template(self, version=None):
'webview': d.pop('shipped_webview_milestone', None),
'ios': d.pop('shipped_ios_milestone', None),
},
'opera': {
'desktop': d.pop('shipped_opera_milestone', None),
'android': d.pop('shipped_opera_android_milestone', None),
},
'ff': {
'view': {
'text': VENDOR_VIEWS[self.ff_views],
Expand Down Expand Up @@ -846,8 +842,6 @@ def put(self, **kwargs):
shipped_android_milestone = db.IntegerProperty()
shipped_ios_milestone = db.IntegerProperty()
shipped_webview_milestone = db.IntegerProperty()
shipped_opera_milestone = db.IntegerProperty()
shipped_opera_android_milestone = db.IntegerProperty()

owner = db.ListProperty(db.Email)
footprint = db.IntegerProperty()
Expand Down Expand Up @@ -1123,12 +1117,6 @@ class FeatureForm(forms.Form):
shipped_webview_milestone = forms.IntegerField(required=False, label='',
help_text='Chrome for Android web view: ' + SHIPPED_HELP_TXT)

shipped_opera_milestone = forms.IntegerField(required=False, label='',
help_text='Opera for desktop: ' + SHIPPED_HELP_TXT)

shipped_opera_android_milestone = forms.IntegerField(required=False, label='',
help_text='Opera for Android: ' + SHIPPED_HELP_TXT)

prefixed = forms.BooleanField(required=False, initial=False, label='Prefixed?')

footprint = forms.ChoiceField(label='Technical footprint',
Expand Down
25 changes: 0 additions & 25 deletions static/elements/chromedash-feature.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,31 +165,6 @@ <h3>Chromium status</h3>
<span>[[feature.browsers.chrome.webview]]</span>
</span>
</template>
<template is="dom-if" if="[[!feature.browsers.chrome.origintrial]]">
<template is="dom-if" if="[[feature.browsers.opera.desktop]]">
<span>
<label class="impl_status_label">
<span class="impl_status_icons">
<span class="opera_icon"></span>
</span>
<span>Opera desktop</span>
</label>
<span>[[feature.browsers.opera.desktop]]</span>
</span>
</template>
<template is="dom-if" if="[[feature.browsers.opera.android]]">
<span>
<label class="impl_status_label">
<span class="impl_status_icons">
<span class="opera_icon"></span>
<iron-icon icon="chromestatus:android" class="android"></iron-icon>
</span>
<span>Opera for Android</span>
</label>
<span>[[feature.browsers.opera.android]]</span>
</span>
</template>
</template>
<template is="dom-if" if="[[feature.browsers.chrome.prefixed]]">
<span><label>Prefixed</label><span>Yes</span></span>
</template>
Expand Down
2 changes: 1 addition & 1 deletion static/elements/chromedash-legend.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h3>Search</h3>
<ul class="queries">
<li><span>"browsers.chrome.desktop&lt;30"</span>features that landed before 30</li>
<li><span>"browsers.chrome.desktop&lt;=50"</span>features in desktop chrome 50</li>
<li><span>"browsers.chrome.android&gt;40"</span>features that landed on Chrome Android after 40 (milestone types: browsers.chrome.android, browsers.chrome.ios, browsers.chrome.webview, browsers.opera.desktop, browsers.opera.android)</li>
<li><span>"browsers.chrome.android&gt;40"</span>features that landed on Chrome Android after 40 (milestone types: browsers.chrome.android, browsers.chrome.ios, browsers.chrome.webview)</li>
<li><span>"browsers.chrome.status.val=4"</span>features behind a flag</li>
<li><span>"category:CSS"</span>features in the CSS category</li>
<li><span>"component:Blink>CSS"</span>features under the Blink component "Blink>CSS"</li>
Expand Down
27 changes: 0 additions & 27 deletions static/js/admin/feature_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,11 @@ form.addEventListener('change', function(e) {
intentStageChanged(e.target);
}
break;
case 'input':
if (e.target.name === 'shipped_milestone') {
fillOperaFields(e.target);
}
break;
default:
break;
}
});

const operaDesktop = document.querySelector('#id_shipped_opera_milestone');
const operaAndroid = document.querySelector(
'#id_shipped_opera_android_milestone');

/**
* Populates Opera version inputs with Chrome 32 -> Opera 19 version mapping.
* @param {HTMLInputElement} chromeField Chrome version input.
*/
function fillOperaFields(chromeField) {
const chromeVersion = chromeField.valueAsNumber;
if (chromeVersion < 28) {
return;
}
const operaVersion = chromeVersion - 13; // e.g. Chrome 32 ~ Opera 19
if (!operaDesktop.classList.contains('interacted')) {
operaDesktop.value = operaVersion;
}
if (!operaAndroid.classList.contains('interacted')) {
operaAndroid.value = operaVersion;
}
}

/**
* Toggles the chrome milestone inputs.
* @param {HTMLInputElement} status Input element.
Expand Down
10 changes: 1 addition & 9 deletions templates/feature.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ <h3>Status in Chromium</h3>
{% endif %}
<br>
<p>
{% if feature.shipped_milestone or feature.shipped_android_milestone or feature.shipped_ios_milestone or feature.shipped_webview_milestone or feature.shipped_opera_milestone or shipped_opera_android_milestone %}
{% if feature.shipped_milestone or feature.shipped_android_milestone or feature.shipped_ios_milestone or feature.shipped_webview_milestone %}
<b>
{% if feature.meta.origintrial %}
Origin trial
Expand Down Expand Up @@ -160,14 +160,6 @@ <h3>Status in Chromium</h3>
{% if feature.shipped_webview_milestone %}
<li>Android WebView release {{ feature.shipped_webview_milestone }}</li>
{% endif %}
{% if not feature.meta.origintrial %}
{% if feature.shipped_opera_milestone %}
<li>Opera release {{ feature.shipped_opera_milestone }}</li>
{% endif %}
{% if feature.shipped_opera_android_milestone %}
<li>Opera for Android release {{ feature.shipped_opera_android_milestone }}</li>
{% endif %}
{% endif %}
</ul>
{% else %}
{{ feature.meta.milestone_str }}
Expand Down

0 comments on commit c705e15

Please sign in to comment.