-
Notifications
You must be signed in to change notification settings - Fork 463
refactor(api-reference): new content rendering #6174
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
refactor(api-reference): new content rendering #6174
Conversation
🦋 Changeset detectedLatest commit: 460bd81 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
f0f3839
to
9d7fe71
Compare
1ea39f4
to
9534dad
Compare
1d2f8fb
to
6af0866
Compare
00d6d49
to
2247978
Compare
#11523 Bundle Size — 2.6MiB (-0.1%).460bd81(current) vs e895f86 main#11521(baseline) Warning Bundle contains 3 duplicate packages – View duplicate packages Bundle metrics
Bundle analysis report Branch hanspagel/doc-3647-using-a-summa... Project dashboard Generated by RelativeCI Documentation Report issue |
40548ad
to
1cec30f
Compare
54736fe
to
a8214d1
Compare
Cloudflare Preview for the API Client |
3298480
to
82ac382
Compare
5a955cc
to
18d54a0
Compare
Alright its good to go, once its merged lets hold release and we should do lazy loading + parameter links at the same time |
This will be conflicted until I revert my revert |
8e05c01
to
0cbb157
Compare
@marclave give it a go! |
4cc5b80
to
da61ace
Compare
refactor: move section flare to its own component, rename tags folder, clean up refactor: move everything to sections fix: broken imports refactor: decoiple models section from config fix: persistAuth of undefined refactor: use traverseTags refactor: render all tags chore: add tasks chore: clean up refactor: remove old loops, render operations in new loop refactor: drop the parsedSpec from the OperationsSection, yay! chore: extend the example feat: render taggroups feat: loop through untagged webhooks, too (wip), clean up chore: add some examples, will remove it later (wip) chore: add comments, update tag accordion chore: clean up chore: clean up fix: webhooks section has empty operations list fix: operations with just the default tag aren’t rendered chore: clean up chore: clean up refactor: move OperationsList to its own component test: OperationsList refactor: make the tests simpler test: HttpMethod chore: delete unused files test: OperationsSection chore: clean up test: enhance OperationsSection tests with tag grouping and webhooks test: restructure chore: disable show more for now (wip) fix: all sections are collapsed by default fix: broken classic layout fix: can’t expand tags refactor: remove duplicate props refactor: Lazy component, add tests test: Lazy chore: clean up refactor: clean up props refactor: rename components refactor: move more components around refactor: rename test fix: broken import refactor: remove duplicate prop chore: remove debug output chore: clean up chore: ignore old component fix: does not expand all tags if their is only one default tag fix: test doesn’t see collapsed tags test: tagsSorter and operationsSorter docs(changeset): refactor: new main content rendering fix: build issues test: Tags/ClassicLayout test: Tags/ModernLayout test: clean up tests for Tags/ModernLayout test: Tags/Tag test: Tags/TagSection test: add more tests to Tags/TagSection test: Models/Models chore: restore old name for content
da61ace
to
460bd81
Compare
@scalar/api-reference
Problem
When passing
tagsSorter: 'alpha'
the order of the tags in the content doesn’t match the order in the sidebar.We’re using a completely different logic to render the sidebar (new) and the main content (old).
Solution
This PR refactors how we loop through tags, tag groups, operations and webhooks in the content to re-use the logic from the sidebar, and those felt unavoidable:
anymoreTransformedOperation
<HttpMethod />
,<OperationsList />
and the new<Content />
tagsSorter
andoperationsSorter
work correctly when rendering the<Content />
(see Using a ///<summary>test</summary> is affecting sort order of tags #6062)<OperationsList />
tocomponents/
, added testsAnd a bunch of other minor tweaks and bug fixes. 🥴
✅ Fixes #6062
✅ Fixes #6049
✅ Fixes #5744
Checklist
I've gone through the following:
pnpm changeset
).