WIP: chore(root): new docs docusaurus + swagger ui#331
WIP: chore(root): new docs docusaurus + swagger ui#331alirezakazemeini wants to merge 29 commits intomasterfrom
Conversation
aminlotfi
left a comment
There was a problem hiding this comment.
Thanks for your efforts @alirezakazemeini ❤️
There was a problem hiding this comment.
I suggest having someone from the SRE team review this workflow.
.idea/vcs.xml
Outdated
There was a problem hiding this comment.
Please remove all .idea files and add them to .gitignore as well.
node_modules/.yarn-integrity
Outdated
| ], | ||
| ], | ||
|
|
||
| themeConfig: { |
There was a problem hiding this comment.
@SepidehM mentioned we don’t need all those language tabs and prefer having just 3–4. You can control this via themeConfig, for example:
languageTabs: [
{
highlight: "python",
language: "python",
logoClass: "python",
},
{
highlight: "javascript",
language: "nodejs",
logoClass: "nodejs",
},
],Please double-check with @SepidehM which languages she wants.
There was a problem hiding this comment.
thanks a lot! i tried using themeConfig.api and several other methods, but none of them worked. this one does! 😁
package.json
Outdated
| "@docusaurus/core": "3.8.1", | ||
| "@docusaurus/preset-classic": "3.8.1", |
There was a problem hiding this comment.
You can update to the latest Docusaurus version:
@docusaurus/core: 3.8.1 → 3.9.2
@docusaurus/preset-classic: 3.8.1 → 3.9.2
There was a problem hiding this comment.
updated ✅
|
|
||
| const results = searchIndex.filter((entry) => entryMatchesQuery(entry, query)) | ||
|
|
||
| setSearchResults(results.slice(0, 10)) |
There was a problem hiding this comment.
Nit: consider defining a constant for the max results. For example, const MAX_RESULTS = 10.
| setSelectedIndex((prev) => | ||
| prev < searchResults.length - 1 ? prev + 1 : prev | ||
| ) |
There was a problem hiding this comment.
Nit: setSelectedIndex((prev) => Math.min(prev + 1, searchResults.length - 1))
| ) | ||
| } else if (e.key === 'ArrowUp') { | ||
| e.preventDefault() | ||
| setSelectedIndex((prev) => (prev > 0 ? prev - 1 : 0)) |
There was a problem hiding this comment.
Nit: setSelectedIndex((prev) => Math.max(prev - 1, 0))
| const resultsRef = useRef<HTMLDivElement>(null) | ||
|
|
||
| useEffect(() => { | ||
| const handleKeyDown = (event: KeyboardEvent) => { |
There was a problem hiding this comment.
Nit: you can extract this into a custom hook. For example, useEscapeKey(onClose).
| direction: rtl; | ||
| } | ||
|
|
||
| .openapi-schema__name { |
There was a problem hiding this comment.
@SepidehM raised concerns about the UI spacing. Please fix the incorrect padding/margins and consider using CSS logical properties for automatic RTL/LTR support. For example, padding-inline-start, margin-inline-start, etc. as a more global solution.
No description provided.