Skip to content

Commit c3c3c92

Browse files
committed
Remove unrecognized platform report button
There was a steady stream of issues generated by this report button. None of the people who opened issues would be responsive and eloborate on the kind of platform they're using. Most of them had "Android" in their user agent, even though the issue template specifically said not to open an issue if one is using Android. At this point, it seems safe to assume the platform detection code works pretty well and getting rid of the report button is not a big loss.
1 parent 6002b2a commit c3c3c92

File tree

2 files changed

+1
-64
lines changed

2 files changed

+1
-64
lines changed

static/scripts/tools-install.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,16 @@ function adjust_for_platform() {
6464

6565
var unix_div = document.getElementById("platform-instructions-unix");
6666
var win_div = document.getElementById("platform-instructions-win");
67-
var unknown_div = document.getElementById("platform-instructions-unknown");
6867
var default_div = document.getElementById("platform-instructions-default");
6968

7069
vis(unix_div, "dn");
7170
vis(win_div, "dn");
72-
vis(unknown_div, "dn");
7371
vis(default_div, "dn");
7472

7573
if (platform == "unix") {
7674
vis(unix_div, "db");
7775
} else if (platform == "win") {
7876
vis(win_div, "db");
79-
} else if (platform == "unknown") {
80-
vis(unknown_div, "db");
8177
} else {
8278
vis(default_div, "db");
8379
}
@@ -154,28 +150,6 @@ function set_up_cycle_button() {
154150
};
155151
}
156152

157-
function fill_in_bug_report_values() {
158-
var nav_plat = document.getElementById("nav-plat");
159-
var nav_app = document.getElementById("nav-app");
160-
var report_link = document.getElementById("report-unknown-platform-link");
161-
nav_plat.textContent = navigator.platform;
162-
nav_app.textContent = navigator.appVersion;
163-
var issue_template = `\
164-
<!--
165-
PLEASE do not open an issue if you are using Android!
166-
167-
The Rust toolchain does not run and can't be installed on Android.
168-
169-
If you are on desktop, go ahead and open this issue.
170-
-->
171-
172-
navigator.platform: \`${navigator.platform}\`
173-
navigator.appVersion: \`${navigator.appVersion}\`
174-
175-
The website did not recognize the platform I'm on, so I am unable to install rustup.`;
176-
report_link.href = "https://github.com/rust-lang/www.rust-lang.org/issues/new?title=Unrecognized%20platform&body=" + encodeURIComponent(issue_template);
177-
}
178-
179153
var override_map = new Map ([
180154
["unix", "unix"],
181155
["win", "win"],
@@ -207,5 +181,4 @@ function check_initial_override() {
207181
check_initial_override();
208182
adjust_for_platform();
209183
set_up_cycle_button();
210-
fill_in_bug_report_values();
211184
}());

templates/components/tools/rustup.html.hbs

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,46 +19,10 @@
1919
<p>{{fluent "tools-rustup-wsl"}}</p>
2020
<pre><code class="db w-100">curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code></pre>
2121
</div>
22-
<div id="platform-instructions-unknown" class="instructions dn">
23-
<!-- unrecognized platform: ask for help -->
24-
<p>
25-
{{fluent "tools-rustup-unknown"}}
26-
</p>
27-
<div class="install-details code">
28-
<div>navigator.platform:
29-
<span id="nav-plat">MacIntel</span>
30-
</div>
31-
<div>navigator.appVersion:
32-
<span id="nav-app">5.0 (Macintosh)</span>
33-
</div>
34-
</div>
35-
<br/>
36-
<!-- This href is overwritten with a better template in static/scripts/tools-install.js -->
37-
<a
38-
href="https://github.com/rust-lang/www.rust-lang.org/issues/new"
39-
id="report-unknown-platform-link"
40-
class="button button-secondary"
41-
>
42-
{{fluent "tools-rustup-report"}}
43-
</a>
44-
<hr class="white-hr" />
45-
<div>
46-
<p>
47-
{{fluent "tools-rustup-manual-unixy"}}
48-
</p>
49-
<code class="db w-100">curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code>
50-
</div>
51-
<hr class="white-hr" />
52-
<div>
53-
<p>
54-
{{fluent "tools-rustup-manual-windows"}}
55-
</p>
56-
</div>
57-
</div>
5822
<div id="platform-instructions-default" class="instructions dn">
5923
<div>
6024
<p>
61-
{{tools-rustup-manual-default}}
25+
{{fluent "tools-rustup-manual-default"}}
6226
</p>
6327
<pre><code class="db w-100">curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code></pre>
6428
</div>

0 commit comments

Comments
 (0)