Skip to content

Commit acb75a7

Browse files
authored
Merge pull request #1985 from integer32llc/tiered-browser-support
Tiered browser support policy for Rust's web content
2 parents e2f6b20 + 797e109 commit acb75a7

File tree

1 file changed

+277
-0
lines changed

1 file changed

+277
-0
lines changed

text/1985-tiered-browser-support.md

Lines changed: 277 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,277 @@
1+
- Feature Name: tiered_browser_support
2+
- Start Date: 2017-04-25
3+
- RFC PR: https://github.com/rust-lang/rfcs/pull/1985
4+
- Rust Issue: https://github.com/rust-lang/rust/issues/43035
5+
6+
# Summary
7+
[summary]: #summary
8+
9+
Official web content produced by the Rust teams for consumption by Rust users
10+
should work in the majority of browsers that Rust users are visiting these
11+
sites in. The Rust compiler only supports [a finite number of targets][forge],
12+
with varying degrees of support, due to the limits on time, expertise, and
13+
testing resources. Similarly, we don't have enough time, expertise and testing
14+
resources to be sure that our web content works in every version of every
15+
browser. We should have a list of browsers and versions in various tiers of
16+
support.
17+
18+
[forge]: https://forge.rust-lang.org/platform-support.html
19+
20+
# Motivation
21+
[motivation]: #motivation
22+
23+
[This pull request to remove JQuery from rustdoc's output][jquery-pr] had
24+
discussion about what we could and could not do because of browser support.
25+
This is a discussion we haven't yet had as a community.
26+
27+
[jquery-pr]: https://github.com/rust-lang/rust/pull/41307
28+
29+
Crates.io doesn't display correctly in browsers without support for flexbox,
30+
such as [Windows Phone 8.1][win-phone], a device that is no longer supported. I
31+
made the decision that it wasn't worth it for the community to spend time
32+
fixing this issue, did I make the correct tradeoff for the community?
33+
34+
[win-phone]: https://github.com/rust-lang/crates.io/issues/56
35+
36+
Supporting all versions of all browsers with the same behavior is impossible
37+
with the small number of people who work on Rust's web content. Crates.io is
38+
not currently doing any cross-browser testing; there are some JavaScript tests
39+
of the UI that run in [PhantomJS][], a headless WebKit. Since we're not
40+
testing, we don't actually know what our current web support even is, except
41+
for when we get bug reports from users.
42+
43+
[PhantomJS]: http://phantomjs.org/
44+
45+
In order to fully test on all browsers to be sure of our support, we would
46+
either need to have all the devices, operating systems, browsers, and versions
47+
available and people with the time and inclination to do manual testing on all
48+
of these, or we would need to be running automated tests on something like
49+
[BrowserStack][]. BrowserStack does appear to have a free plan for open source
50+
projects, but it's unclear how many parallel tests the open source plan would
51+
give us, and we'd at least be spending time waiting for test results on the
52+
various stacks. [BrowserStack also doesn't support every platform][bs-support],
53+
Linux on the desktop being a notable section of our userbase missing from their
54+
platforms.
55+
56+
[BrowserStack]: https://www.browserstack.com/pricing
57+
[bs-support]: https://www.browserstack.com/support
58+
59+
# Detailed design
60+
[design]: #detailed-design
61+
62+
## Rust web content
63+
64+
Officially produced web content includes:
65+
66+
- rust-lang.org
67+
- blog.rust-lang.org
68+
- play.rust-lang.org
69+
- crates.io
70+
- Rustdoc output
71+
- thanks.rust-lang.org
72+
73+
Explicitly not included:
74+
75+
- Content for people working on Rust itself, such as:
76+
- [The Rust Forge][]
77+
- [rusty-dash][]
78+
79+
[The Rust Forge]: https://forge.rust-lang.org/
80+
[rusty-dash]: https://rusty-dash.com/
81+
82+
Things that are not really under our control but are used for official or
83+
almost-official Rust web content:
84+
85+
- GitHub
86+
- docs.rs
87+
- Discourse (used for [urlo][] and [irlo][])
88+
- [mdBook][] output (used for the books and other documentation)
89+
90+
[urlo]: https://users.rust-lang.org/
91+
[irlo]: https://internals.rust-lang.org/
92+
[mdBook]: https://github.com/azerupi/mdBook/
93+
94+
## Proposed browser support tiers
95+
96+
Based on [actual usage metrics][] and with a goal of spending our time in an
97+
effective way, the browser support tiers would be defined as:
98+
99+
[actual usage metrics]: #google-analytics-browser-usage-stats
100+
101+
Browsers are listed in [browserslist][] format.
102+
103+
[browserslist]: https://github.com/ai/browserslist
104+
105+
### Supported browsers
106+
107+
Goal: Ensure functionality of our web content for 80% of users.
108+
109+
Browsers:
110+
111+
```
112+
last 2 Chrome versions
113+
last 1 Firefox version
114+
Firefox ESR
115+
last 1 Safari version
116+
last 1 iOS version
117+
last 1 Edge version
118+
last 1 UCAndroid version
119+
```
120+
121+
[On browserl.ist](http://browserl.ist/?q=last+2+Chrome+versions%2C+last+1+Firefox+version%2C+Firefox+ESR%2C+last+1+Safari+version%2C+last+1+iOS+version%2C+last+1+Edge+version%2C+last+1+UCAndroid+version)
122+
123+
Support:
124+
125+
- We add automated testing of functionality in a variety of browsers through a
126+
service such as [BrowserStack][] for each of these as much as possible (and
127+
work on adding this type of automated testing to those web contents that
128+
aren't currently tested, such as rustdoc output).
129+
- Bugs affecting the functionality of the sites in these browsers are
130+
prioritized highly.
131+
132+
### Unsupported browsers
133+
134+
Goal: Avoid spending large amounts of time and code complexity debugging and
135+
hacking around quirks in older or more obscure browsers.
136+
137+
Browsers:
138+
139+
- Any not mentioned above
140+
141+
Support:
142+
143+
- No automated testing for these.
144+
- Bug reports for these browsers are closed as WONTFIX.
145+
- Pull requests to fix functionality for these browsers are accepted only if
146+
they're deemed to not add an inordinate amount of complexity or maintenance
147+
burden (subjective, reviewers' judgment).
148+
149+
## Orthogonal but related non-proposals
150+
151+
The following principles are assumptions I'm making that we currently follow
152+
and that we should continue to strive for, no matter what browser support
153+
policy we end up with:
154+
155+
- Follow best practices for accessibilty, fix bug reports from blind users,
156+
reach out to blind users in the community about how the accessibility of the
157+
web content could be improved.
158+
- This would include supporting lynx/links as these are sometimes used with
159+
screen readers.
160+
- Follow best practices for colorblindness, such as have information conveyed
161+
through color also conveyed through an icon or text.
162+
- Follow best practices for making content usable from mobile devices with a
163+
variety of screen sizes.
164+
- Render content without requiring JavaScript (especially on
165+
[crates.io][noscript]). Additional functionality beyond reading (ex: search,
166+
follow/unfollow crate) may require JavaScript, but we will attempt to use
167+
links and forms for progressive enhancement as much as possible.
168+
169+
[noscript]: https://github.com/rust-lang/crates.io/issues/204
170+
171+
Please comment if you think any of these should **not** be assumed, but rest
172+
assured it is not the intent of this RFC to get rid of these kinds of support.
173+
174+
# Relevant data
175+
176+
[CanIUse.com][] has some statistics on global usage of browsers and versions,
177+
but our audience (developers) isn't the same as the general public.
178+
179+
[CanIUse.com]: http://caniuse.com/usage-table
180+
181+
## Google analytics browser usage stats
182+
183+
We have Google Analytics on crates.io and on rust-lang.org. The entire data set
184+
of the usage stats by browser, browser verison, and OS are available [in this
185+
Google sheet][all-data] for the visits to crates.io in the last month. I chose
186+
to use just crates.io because on initial analysis, the top 90% of visits to
187+
rust-lang.org were less varied than the top 90% of visits to crates.io.
188+
189+
[all-data]: https://docs.google.com/spreadsheets/d/1qgszm-_-Tn8FLi2v3vicuvyct3Grzz74JWcroILRq8s/edit?usp=sharing
190+
191+
This data does not include those users who block Google Analytics.
192+
193+
This is the top 80% aggregated by browser and major browser version:
194+
195+
| Browser | Browser Version | Sessions | % of sessions | Cumulative % |
196+
|-----------------|-----------------|----------|---------------|--------------|
197+
| Chrome | 57 | 18,040 | 34.85 | 34.85 |
198+
| Firefox | 52 | 8,136 | 15.72 | 50.56 |
199+
| Chrome | 56 | 7302 | 14.11 | 64.67 |
200+
| Safari | 10.1 (macos) | 1,592 | 3.08 | 67.74 |
201+
| Safari | 10 (ios) | 1,437 | 2.78 | 70.52 |
202+
| Safari | 10.0.3 (macos) | 851 | 1.64 | 72.16 |
203+
| Firefox | 53 | 767 | 1.48 | 73.65 |
204+
| Chrome | 55 | 717 | 1.39 | 75.03 |
205+
| Firefox | 45 | 693 | 1.34 | 76.37 |
206+
| UC Browser | 11 | 530 | 1.02 | 77.40 |
207+
| Chrome | 58 | 520 | 1.00 | 78.40 |
208+
| Safari (in-app) | (not set) (ios) | 500 | 0.97 | 79.37 |
209+
| Firefox | 54 | 472 | 0.91 | 80.28 |
210+
211+
Interesting to note: Firefox 45 is the latest
212+
[ESR](https://www.mozilla.org/en-US/firefox/organizations/all/) (Firefox 52
213+
will also be an ESR but it was just released). Firefox 52 was the current major
214+
version for most of this past month; I'm guessing the early adopters of 53 and
215+
54 are likely Mozilla employees.
216+
217+
## What do other sites in our niche support?
218+
219+
- [GitHub][] - Current versions of Chrome, Firefox, Safari, Edge and IE 11.
220+
Best effort for Firefox ESR.
221+
- [Discourse][] - Chrome 32+, Firefox 27+, Safari 6.1+, IE 11+, iPad 3+, iOS
222+
8+, Android 4.3+ (doesn't specify which browser on the devices, doesn't look
223+
like they've updated these numbers in a while)
224+
225+
[GitHub]: https://help.github.com/articles/supported-browsers/
226+
[Discourse]: https://github.com/discourse/discourse#requirements
227+
228+
# How We Teach This
229+
[how-we-teach-this]: #how-we-teach-this
230+
231+
We should call this "Rust Browser Support", and we should have the tiers listed
232+
on the Rust Forge in a similar way to the tiers of Rust platforms supported.
233+
234+
We should link to the tiered browser support page from places where Rust web
235+
content is developed and on the [Rust FAQ][].
236+
237+
[Rust FAQ]: https://www.rust-lang.org/en-US/faq.html
238+
239+
# Drawbacks
240+
[drawbacks]: #drawbacks
241+
242+
We exclude some people who are unwilling or unable to use a modern browser.
243+
244+
# Alternatives
245+
[alternatives]: #alternatives
246+
247+
We could adopt the tiers proposed above but with different browser versions.
248+
249+
We could adopt the browsers proposed above but with different levels of support.
250+
251+
Other alternatives:
252+
253+
## Not have official browser support tiers (status quo)
254+
255+
By not creating offical levels of browser support, we will continue to have the
256+
situation we have today: discussions and decisions are happening that affect
257+
the level of support that Rust web content has in various browsers, but we
258+
don't have any agreed-upon guidelines to guide these discussions and decisions.
259+
260+
We continue to not test in multiple browsers, instead relying on bug reports
261+
from users. The people doing the work continue to decide on an ad-hoc basis
262+
whether a fix is worth making or not.
263+
264+
## Support all browsers in all configurations
265+
266+
We could choose to attempt to support any version of any browser on any device,
267+
testing with as much as we can. We would still have to rely on bug reports and
268+
help from the community to test with some configurations, but we wouldn't close
269+
any bug report or pull request due to the browser or version required to
270+
reproduce it.
271+
272+
# Unresolved questions
273+
[unresolved]: #unresolved-questions
274+
275+
- Am I missing any official web content that this policy should apply to?
276+
- Is it possible to add browser tests to rustdoc or would that just make the
277+
current situation of long, flaky rustc builds worse?

0 commit comments

Comments
 (0)