1
Fork 0
Commit graph

23 commits

Author SHA1 Message Date
bors
0414dfa0aa Auto merge of #62941 - GuillaumeGomez:save-crate-filter, r=Mark-Simulacrum
Save crate filtering on rustdoc

Fixes #62929.

I added a hashmap and a hash encoding for the current crate list in case you have multiple crates handling on a same website (who talked about docs.rs?!). Like that, for each context, you have the filter crate selected.

r? @QuietMisdreavus
2019-08-28 21:42:52 +00:00
Guillaume Gomez
06228d33ca Save crate filtering on rustdoc 2019-08-28 11:56:21 +02:00
Guillaume Gomez
1bd94241b7 Replaced skipStorage with saveTheme variable 2019-08-21 12:49:01 +02:00
Guillaume Gomez
c076d30ce4 take into account the system theme 2019-08-21 10:08:29 +02:00
Guillaume Gomez
4eb19d19a5 Fix storage usage when disabled 2019-06-11 20:59:59 +02:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Guillaume Gomez
fa9c8232d7 Fix invalid JS file generation 2018-12-16 15:16:06 +01:00
Guillaume Gomez
a68988719c cleanup 2018-12-06 23:34:36 +01:00
Guillaume Gomez
edfe2a893e Greatly improve rustdoc rendering speed issues 2018-12-06 23:34:35 +01:00
John Heitmann
56ace3e870 Added a bare-bones eslint config (removing jslint)
This change removes the small bit of jslint config, replacing it
with eslint. I've currently configured eslint to mostly only report
the more serious of lints, although there are still some style nits
turned on.

Upcoming changes will start fixing lints.
2018-12-04 15:46:15 -08:00
Guillaume Gomez
93520d2ad1 Add source file sidebar 2018-11-24 09:49:57 +01:00
Guillaume Gomez
edec5807ac Hide items if they use default docs 2018-10-21 18:28:27 +02:00
Roy Wellington Ⅳ
cbe98ec803 Move usableLocalStorage() above functions that make use of it 2018-10-16 22:15:27 -07:00
Roy Wellington Ⅳ
8362aa2178 Extract localStorage tests out into a helper method; use in getCurrentValue()
1. Extract the tests for whether or not we have workable localStorage out into
   a helper method, so it can be more easily reused
2. Use it in getCurrentValue() too, for the same reasons, as suggested in code
   review
2018-10-15 20:39:16 -07:00
Roy Wellington Ⅳ
d4e2dcaff1 Detect if access to localStorage is forbidden by the user's browser
If the user's cookie/persistent storage setting forbid access to localStorage,
catch the exception and abort the access.

Currently, attempting to use the expand/contract links at the top of the page
for structs/consts/etc. fails due to an unhandled error while accessing
localStorage, if such access is forbidden, as the exception from the failed
access propagates all the way out, interrupting the expand/contract. Instead, I
would like to degrade gracefully; the access won't happen (the collapse/expand
state won't get persisted) but the actual expanding/contracting of the item
will go on to succeed.

Fixes #55079
2018-10-14 23:47:38 -07:00
Guillaume Gomez
238583a50f Fix anchors issue when everything is collapsed 2018-04-04 16:16:53 +02:00
Guillaume Gomez
772a8028ff Rename main theme into light theme 2018-03-29 13:45:56 +02:00
Guillaume Gomez
366ee8518f Fix blink when main theme is selected 2018-03-12 20:51:23 +01:00
Guillaume Gomez
831009f035 Add resource-suffix option for rustdoc 2018-03-05 23:45:27 +01:00
Guillaume Gomez
5b61b615f5 Allow to not switch to a theme if it doesn't exist 2018-02-20 20:11:58 +01:00
Guillaume Gomez
2d3f31df8b Change local storage name for rustdoc because of conflicts with mdbook 2018-02-20 19:29:13 +01:00
Guillaume Gomez
5b8504401c Fasten even more theme switch 2018-01-23 00:45:34 +01:00
Guillaume Gomez
5f93159e9d Fasten up theme loading 2018-01-22 23:44:08 +01:00