Commit graph

261 commits

Author SHA1 Message Date
René Kijewski
2a5de352a1 docs: remove stray comma 2024-10-20 14:47:01 +02:00
bors
6a795887c4 Auto merge of #13539 - GuillaumeGomez:allow-no-js, r=Alexendoo
Allow to go through clippy lints page without javascript

Fixes #13536.

This is the follow-up of https://github.com/rust-lang/rust-clippy/pull/13269.

This PR makes it possible to expand/collapse lints (individually) without JS. To achieve this result, there are two ways:
1. Use `details` and `summary` tags. Problem with this approach is that the web browser search may open the `details` tags automatically if content matching it is inside. From a previous discussion with `@Alexendoo,` it seems to not be a desired behaviour.
2. Use a little trick where you use a `label` and a checkbox where the checkbox is in fact hidden. Then it's just a matter of CSS.

r? `@Alexendoo`

changelog: Allow to go through clippy lints page without JS
2024-10-18 19:24:16 +00:00
Guillaume Gomez
82969e5c4e Allow to go through clippy lints page without javascript 2024-10-18 18:03:16 +02:00
Anastasis Georgoulas
b86a48955e Fix link to source
The URLs contained an extra `clippy_lints`, which resulted in
broken links. Links are generated using each lint's `id_location`,
which already contains the full path inside the repository.
2024-10-15 22:42:51 +01:00
bors
6f1def79dd Auto merge of #13269 - GuillaumeGomez:rewrite-lints-page, r=Alexendoo
Rewrite lints page

This PR has multiple goals:

* Make lints page to work without needing a web server by removing the json file.
* Prepare the field to also make the page work with JS (not done in this PR but should be straightforward).
* Remove angular dependency.

r? `@Alexendoo`

changelog: make lint page work without web server
2024-10-11 14:18:54 +00:00
Guillaume Gomez
603934336d Greatly reduce generated HTML page size 2024-10-03 11:17:33 +02:00
Guillaume Gomez
80eb9cfa14 Run syntax highlighting only when needed 2024-10-03 11:12:19 +02:00
Guillaume Gomez
823c1246ab Move inlined CSS into style.css 2024-10-03 11:12:19 +02:00
Guillaume Gomez
8a3d4e1a70 Replace rinja custom syntax with default syntax
Since all angular code was removed, there is no conflict anymore before angular and jinja2 syntaxes so we can just use plain jinja2 syntax.
2024-10-03 11:12:19 +02:00
Guillaume Gomez
d52b9aa564 Move theme handling JS into its own file to make theme being applied before first rendering 2024-10-03 11:12:19 +02:00
Guillaume Gomez
47f40d468a Improve rendering speed by moving settings generation after theme rendering 2024-10-03 11:12:19 +02:00
Guillaume Gomez
e0b0851ba8 Support version filter URL parameters 2024-10-03 11:12:19 +02:00
Guillaume Gomez
4bb4cc6fcb Add support for URL arguments 2024-10-03 11:12:19 +02:00
Guillaume Gomez
00c11df107 Add support for version filtering 2024-10-03 11:12:19 +02:00
Guillaume Gomez
59ccebe426 Support all filters except versions 2024-10-03 11:12:19 +02:00
Guillaume Gomez
aeb548a4f7 Put back interactions with settings menus 2024-10-03 11:12:11 +02:00
Philipp Krones
6c2e82496f Remove unused import from Clippy versions.py file 2024-09-24 18:13:17 +02:00
Philipp Krones
b61fcbee76 Merge commit '7901289135257ca0fbed3a5522526f95b0f5edba' into clippy-subtree-update 2024-09-24 11:58:04 +02:00
Guillaume Gomez
f2193c680c Completely remove angular and generate parts of settings in JS 2024-09-22 22:30:45 +02:00
Guillaume Gomez
574e3dd922 Finish porting lint functionalities to vanilla JS 2024-09-22 22:30:45 +02:00
Guillaume Gomez
0055cebaa3 Replace search with vanilla JS 2024-09-22 22:30:45 +02:00
Guillaume Gomez
b522e7a944 Generate lint list in HTML directly instead of JS 2024-09-22 22:30:44 +02:00
Alex Macleod
d2305ff634 Generate versions HTML directly 2024-09-18 18:51:54 +00:00
Jason Newcomb
173d5a6af0 Merge commit '0f8eabd6231366bfc1bb1464601297c2d48f8f68' into clippyup 2024-08-24 18:33:44 -04:00
Alex Macleod
182cd5f278 Replace the metadata collector with tests 2024-08-12 20:24:46 +00:00
bors
c7c8724897 Auto merge of #13187 - GuillaumeGomez:settings-menu, r=Alexendoo
Add settings menu on clippy lints page

It looks like this (when the menu is expanded):

![Screenshot from 2024-08-06 21-36-41](https://github.com/user-attachments/assets/c464aef3-b21e-48cc-8e3a-c32a134f995e)

Follow-up of https://github.com/rust-lang/rust-clippy/pull/13178.

Someone pointed out that they should be able to disable the shortcuts on this page like it's the case for rustdoc and docs.rs. So here we go.

The first commit moves the style into its own file: it's much better for a web browser because it can then cache it.

The second one actually adds the new settings menu you can see above.

r? `@Alexendoo`

changelog: Add settings menu on clippy lints page
2024-08-11 18:42:37 +00:00
Guillaume Gomez
2ae6a4954b Move themes directly into HTML 2024-08-11 19:44:18 +02:00
Guillaume Gomez
934e98d591 Unify theme and settings menus 2024-08-11 19:39:19 +02:00
Philipp Krones
1ac76a2062 Merge commit 'cb806113e0f83a8f9b47d35b453b676543bcc40e' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
Jason Newcomb
2c34d58159 Store deprecated lints as an array of tuples.
Remove legacy deprecations.
Remove "View Source" link for deprecated lints.
2024-08-05 09:15:55 -04:00
Guillaume Gomez
7c5209121d Add new settings menu 2024-07-30 17:31:42 +02:00
Guillaume Gomez
b7e7975ded Move style into its file 2024-07-30 16:01:36 +02:00
bors
accf6868ee Auto merge of #13178 - GuillaumeGomez:clippy-lints-page-improvement, r=Alexendoo
Add possibility to focus on search input using keyboard

This PR adds the possibility to focus on the search input with `S` or `/` like in rustdoc and `mdbook` and `docs.rs` (unification++). Pressing escape will blur it.

r? `@Alexendoo`

changelog: Add possibility to focus on search input using keyboard
2024-07-29 19:58:12 +00:00
Guillaume Gomez
63174792c2 Add possibility to focus on search input using keyboard 2024-07-29 21:55:36 +02:00
Guillaume Gomez
957a301083 Clean up clippy lints page JS source code 2024-07-29 16:49:56 +02:00
Philipp Krones
4e6851e50b Merge commit '37f4fbb92913586b73a35772efd00eccd1cbbe13' into clippy-subtree-update 2024-07-25 18:29:17 +02:00
Spencer Will
6ae5fd958f
Remove event propagation calls. Adjust column spacing for filter panel to give more space for buttons on smaller screens. 2024-07-11 21:59:33 +02:00
Spencer Will
8bfd992953
Fix button styling on desktop and mobile views. 2024-07-11 21:58:51 +02:00
Spencer Will
d5e1acae82
Add Expand All and Collapse All 2024-07-11 21:58:47 +02:00
Philipp Krones
abdd057163 Merge commit '68a799aea9b65e2444fbecfe32217ce7d5a3604f' into clippy-subtree-update 2024-06-27 18:56:04 +02:00
bors
bd75e44f6e Auto merge of #12655 - SpencerAWill:Add-applicability-filter, r=xFrednet
Add applicability filter to lint list page

changelog: Add applicability filter to lint list website.
Fixes #7958

Desktop view:
![image](https://github.com/rust-lang/rust-clippy/assets/43732866/ef16dff1-c1c5-48a7-aa5c-ddd504280c90)

Mobile view:
![image](https://github.com/rust-lang/rust-clippy/assets/43732866/9e6f54d9-b079-443f-a6b0-ca8ee4ed1eed)
2024-06-18 09:25:16 +00:00
Philipp Krones
3bff119f63 Merge commit '3e5a02b13b1244545454752c6629b767522a44b1' into clippy-subtree-update 2024-06-13 12:30:48 +02:00
alexey semenyuk
3f9c5872b9
Filter from first typed symbol 2024-06-09 17:37:05 +05:00
Roddy Rappaport
1c9bf96b96 Fix website dash replacement #12718
Searching for a lint on the website will replace all of the dashes with
underscores instead of only the first one.
2024-04-26 21:58:08 +03:00
forcedebug
d55e5b4500 chore: fix some typos in comments
Signed-off-by: forcedebug <forcedebug@outlook.com>
2024-04-23 20:31:26 +08:00
Spencer Will
c8a7e6e5e6
Remove debug helper.
Co-authored-by: Fridtjof Stoldt <xFrednet@gmail.com>
2024-04-11 17:27:55 -04:00
Spencer Will
e4ce248af4 Complete filter functionality. Formatted upper filters to take more visual column space. Force filter wrapping with flex for small screens. 2024-04-09 15:00:12 -04:00
Spencer Will
0b43e03ca9 Add applicability visually 2024-04-04 20:02:42 -04:00
Hamir Mahal
3ef693c555
refactor: remove CSS variables that are now unused 2024-02-26 00:00:33 -08:00
Hamir Mahal
30ee7af2ca
style: sync GitHub Corner colors 2024-02-25 12:54:46 -08:00