Skip to content

docs: wire up compiler/runtime warnings/errors #322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Oct 11, 2024

Conversation

dummdidumm
Copy link
Member

Companion PR to sveltejs/svelte#13557 which is responsible for the generation - this just brings it over, wires up a few redirects, and makes it possible to preview how it looks. Some observations:

  • the header font doesn't work great with the error codes
  • right now this page is much too white/bland. This will likely solve itself when we add details (i.e. prose text) for most if not all error codes

Copy link

vercel bot commented Oct 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
omnisite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 10, 2024 10:56pm

@Rich-Harris
Copy link
Member

Changes we should make, whether in this PR or as separate work that gets merged first:

  • only capitalise first word of document title ('Compiler errors', not 'Compiler Errors')
  • sort codes alphabetically
  • allow <code> inside headers (we currently strip them out but we should just avoid having backticks in places we don't want them in the first place), and style them appropriately (i.e. --sk-font-mono/--sk-font-size-code, though no background needed)
  • use a blockquote rather than a code fence (but styled differently to 'note' blockquotes)
  • add details for more messages

@dummdidumm
Copy link
Member Author

What are you envisaging for the look of the block quotes? You can go to the "Compiler errors" page where the first entry is a blockquote now and style it.

@Conduitry Conduitry changed the title docs: wire up compiler/runtime warnigns/errors docs: wire up compiler/runtime warnings/errors Oct 10, 2024
@Rich-Harris
Copy link
Member

Maybe this?

image

@Rich-Harris
Copy link
Member

(maybe we style the %interpolations% differently...)

@dummdidumm
Copy link
Member Author

dummdidumm commented Oct 10, 2024

Ready to go from my side, with details to be fleshed out once we have time.

  • ported a11y prose from our existing Svelte 4 docs
  • introduced a "raw" blockquote, used through [!NOTE] prefix

With more text in it, some of these italic blockquotes are really hard to read. Should we tone it done a bit with the italicness, if possible?

@Rich-Harris
Copy link
Member

The [!NOTE] syntax belongs on notes, not on the things that aren't notes :)

Seeing it on the page, I agree that there's way too much italic. And the headers really don't look good. I'm going to change all the h2s to h3s, put the blockquotes back in code blocks, and remove the copy-to-clipboard buttons

@Rich-Harris Rich-Harris merged commit 8a4d699 into main Oct 11, 2024
3 checks passed
@Rich-Harris Rich-Harris deleted the compiler-warnings-errors branch October 11, 2024 00:03
@Rich-Harris
Copy link
Member

oops I didn't mean to merge this yet

@Rich-Harris Rich-Harris mentioned this pull request Oct 11, 2024
Rich-Harris added a commit that referenced this pull request Oct 11, 2024
* docs: wire up compiler/runtime warnigns/errors

* allow (and properly style) code blocks in headings

* testbed

* wire up correct branch

* add [!NOTE] type

* sync

* back to main

* lint

* sync

* Revert "add [!NOTE] type"

This reverts commit 3d6ceaa.

* sync

* Revert "allow (and properly style) code blocks in headings"

This reverts commit 1501e5b.

* remove copy-to-clipboard buttons from code blocks without a lang

* support includes, remove some unused code

* sync

---------

Co-authored-by: Simon Holthausen <[email protected]>
dummdidumm added a commit that referenced this pull request Oct 11, 2024
#322 and #331 added pages for compiler/runtime errors/warnings, but these pages are barely usable because "On this page" is empty because of missing h2 tags.

This fixes that by enhancing our sections logic: If no h2 tags are found, try again with h3 tags.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants