54 Commits

Author SHA1 Message Date
Loris Cro
c0da41582b autodoc: better light mode colors
fix #15799
2023-09-03 17:12:52 +02:00
James Chen-Smith
c3a8f1fe92
autodoc: Extract decl ref style and fix light mode color (#15990)
Co-authored-by: James Chen-Smith <james@chen-smith.net>
Co-authored-by: Loris Cro <kappaloris@gmail.com>
2023-09-03 16:51:07 +02:00
Loris Cro
373e48c983
autodoc: new layout (#16715)
* autodoc: init guide TOC work

* autodoc: working guides toc navigation

* autodoc: more improvements

* autodoc: ui refinements

* autodoc: new layout and init descriptions for namespaces in std.zig
2023-08-06 18:12:05 +02:00
Krzysztof Wolicki
b317ca4d6f autodoc: Added line_comment tokens to ziglexer.js tokenizer 2023-08-03 19:07:33 +02:00
Loris Cro
e682d6eb29 autodoc: improve styling of new help dropdown 2023-07-28 17:00:07 +02:00
Loris Cro
feff968ec3 autodoc: html page fixes 2023-07-25 19:29:23 +02:00
Loris Cro
4f5082fc86 autodoc: improve handling of periods in search box and add search explainer 2023-07-25 19:19:39 +02:00
Loris Cro
a187141056
Autodoc tokenizer (#16409)
* autodoc: init work to refactor exprName

* autodoc: Implement more expressions in exprName refactor

* autodoc: more work

* autodoc: More exprName to ex refactoring

* autodoc: Remove whitespace flag from renderer; Add pre tags in
value and variable drawing in renderContainer

* autodoc: add inline styling to pre blocks

* autodoc: move renderer code to main.js

* autodoc: More exprName to ex refactoring; Fn signatures rendered with new code

* autodoc: Fix function rendering. Add more things to ex

* autodoc: nuke exprName

---------

Co-authored-by: Krzysztof Wolicki <der.teufel.mail@gmail.com>
2023-07-14 16:27:09 +02:00
Emile Badenhorst
8ce68e5f41 changed identifier to white 2023-07-06 16:44:42 +02:00
Emile Badenhorst
2d34b76e72 Fixed names prefix 2023-07-06 16:44:42 +02:00
Emile Badenhorst
e5b2f52213 updated css 2023-07-06 16:44:42 +02:00
Loris Cro
28ad74e8a6 autodoc: wire in js tokenizer to frontend 2023-07-03 19:18:44 +02:00
Ian Johnson
4dacaa1e12 Autodoc: add preference for / search
Closes #16081
2023-06-28 18:16:16 +02:00
Loris Cro
216ef10dc4
Merge branch 'master' into autodoc-searchkey 2023-06-18 09:06:40 +02:00
cryptocode
0fc1d39649 Add new shortcut to help popup 2023-05-03 12:10:52 +02:00
r00ster91
6f1336a50c autodoc: make the help modal toggleable
Now you can simply press "?" again to toggle the help modal instead of
requiring Esc. Both Esc and "?" work.
2023-05-02 04:41:25 +02:00
cryptocode
5d20a4e35c autodoc: Add / as an alternative search key
Per Discord discussion. Motivation: `/` is now the de facto standard for initating search on webpages.
2023-04-29 20:48:18 +02:00
Loris Cro
b294bff1a8
Autodoc: new decl search system (#15475)
New search system is based on a Radix Tree. The Radix Tree contains a shallow list of all decl names (ie no paths), plus some suffixes, split by following the official style guide (eg "HashMapUnmanaged" also produces "MapUnmanaged" and "Unmanaged", same with snake_case and camelCase names).

Additionally, the search system uses the decl graph data to recognize hierarchical relationships between decls, allowing you to zero on a target namespace for search. As an example "fs create" will score highe all things related to the creation of files and directories inside of `std.fs`, while still showing (but with lower score) matches from `std.Bulild`. 

As another example "fs windows" will prioritize windows-related results in `std.fs`, while "windows fs" will prioritize fs-related results in `std.windows`.
2023-04-26 18:17:20 +02:00
Krzysztof Wolicki
a260fa8bf2 autodoc: Change package to module to better reflect the new names 2023-04-23 01:02:09 +02:00
Loris Cro
aa765c1d70 autodoc: add support for defining guide sections
For example:

//!zig-autodoc-section: Advanced Topics
2023-04-15 18:26:53 +02:00
Loris Cro
af820bbb94 autodoc: init support for guides 2023-01-24 18:56:35 +01:00
Clement Espeute
66569c7ec6 autodoc: use js instead of details for collapsing descriptions 2023-01-12 13:38:26 +01:00
Loris Cro
0e66df2094 autodoc: scroll up when collapsing long fn description 2023-01-11 18:14:56 +01:00
Clement Espeute
b63a771e18 autodoc: allow function descriptions expansion 2023-01-10 18:55:49 +01:00
Loris Cro
1878bdfbb1 autodoc: fix bodyless fn type analysis and rendering 2023-01-05 17:12:43 +01:00
Nguyá»…n Gia Phong
c91adbbde7
autodoc: show binding in lowercase
<S-s> is not bound and shortcuts popup already use lowercase.
2023-01-03 15:11:44 +09:00
Loris Cro
201dca323e autodoc: improve rendering of long fn signatures 2022-09-05 17:26:59 +02:00
Loris Cro
dbd60e3d29 autodoc: add support for doc tests 2022-09-04 22:45:57 +02:00
Loris Cro
102a6e9e9c
Merge pull request #12481 from alichraghi/patch-1
docs: add padding between functions list
2022-08-23 15:48:35 +02:00
Ryan Liptak
9740bb2423 autodoc: Fix border color around field docs in light mode
Follow up to https://github.com/ziglang/zig/pull/12305
2022-08-19 19:06:01 -07:00
Ali Chraghi
51b2aa1643
docs: add padding between functions list 2022-08-18 22:02:02 +04:30
r00ster91
78bb29d1dc fix: scroll page to very top when S is pressed
Credits go to @rudedogg
2022-08-14 19:19:44 +02:00
r00ster91
9900413eb1 feat: indent keyboard shortcuts
This indents the keyboard shortcuts related to the S key because you can only
use these keyboard shortcuts after you pressed S (when the search field is focused).
This is a visual hint.
2022-08-14 11:54:51 +02:00
r00ster91
e1eaa1f7d6 fix: var(--mono) used for font-size 2022-08-14 11:54:51 +02:00
r00ster91
dc5174440c feat: better No Results Found page
This adds some helpful links to the page and makes it look nicer by using <kbd> etc.
2022-08-14 11:54:51 +02:00
zooster
3debd6b732
Merge branch 'master' into nicedocs 2022-08-06 19:32:42 +02:00
Loris Cro
9fc6990052 autodoc: re-introduce search result limits 2022-08-06 17:29:13 +02:00
r00ster91
943f4eb515 fix: use brighter bg color for help modal in light mode
You can see this issue in the video.
2022-08-06 16:07:32 +02:00
r00ster91
60b04b0988 style: some more formatting 2022-08-06 16:01:43 +02:00
r00ster91
beba29c24f feat: make shadow of <kbd>s look nicer 2022-08-06 15:34:38 +02:00
r00ster91
ee72868f92 style: format
This is mostly manually formatted. I couldn't find a good HTML formatter for this file.
It also converts a bunch of tabs to spaces.
2022-08-06 15:34:00 +02:00
r00ster91
2f0abe63d4 fix: disable search bar before loading
This fixes the new search placeholder not disappearing if you type before
it finished loading, and maybe some other things.
2022-08-06 15:16:27 +02:00
r00ster91
df8cfb1273 feat: new search placeholder
This new search placeholder looks much nicer because it allows HTML inside it which
the `placeholder` attribute on `<input>`s doesn't allow.
I tested it for all kinds of cases and it seems to work pretty well.
2022-08-06 15:15:59 +02:00
r00ster91
6354851909 fix: "dialog" -> "modal"
"Dialog" is the incorrect term here because a dialog is a separate window that still lets you use the app
but a modal is a window where you can't continue using the app until you close it.
2022-08-06 15:05:58 +02:00
Ryan Liptak
921ba6cad4 autodoc: Add borders to field docs to make it clear which field they are associated with 2022-07-30 17:26:29 -07:00
Andrew Kelley
aa1a06bf9b Autodoc: small polish on the html 2022-07-19 19:10:12 -07:00
Loris Cro
572f9a5602 Autodoc: add warning banner to html 2022-07-19 19:10:12 -07:00
Loris Cro
a5e7b0e4db autodoc: restore support for zig version + cleanup & init work to fix packages 2022-07-19 19:10:12 -07:00
Loris Cro
918475e2e2 autodoc: new design for function list 2022-07-19 19:10:12 -07:00
Loris Cro
64feb222b5 autodoc: make links respect internal docs mode 2022-07-19 19:10:11 -07:00