Repository navigation
Restyle and narrow the sidebar, and fix its Japanese labels - #1264
Merged
Merged
Conversation
Drop the orange accent bar from the section headers, which read like a current-page marker, and separate the groups with a hairline above each header instead. The old :first-of-type rule matched every header (each sits alone in its <li>), so every group got the small top margin; now only the first header does. The headers are raw HTML items, which Docusaurus does not translate, so sidebars.js now picks their labels per locale and the Japanese site gets Japanese headers. Also tighten the sidebar: 15px labels, smaller chevrons, a guide line beside nested lists and a quieter scrollbar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Turn on autoCollapseCategories so the long User Manual sidebar doesn't accumulate open categories as you browse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 15px labels free about 13.5px on the widest top-level row, "PlayCanvas Web Components" plus its chevron, whatever the system font. Dropping 10px therefore still leaves that row more room than it has on the live site on every platform: 12px to spare on Windows, measured with the classic scrollbar. 300px is also the Docusaurus default. Measured on Windows, no English label that fits on one line at 310px wraps at 300px. Japanese labels run longer, and six more of them would wrap, so the Japanese site keeps 310px. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Four Japanese titles named PlayCanvas or 3D models where the English
doesn't: "Your First App" read 初めてのPlayCanvasアプリを作る ("Make your
first PlayCanvas app"), and "Exporting Assets" read "Exporting 3D models
for PlayCanvas". The Delete asset page was titled "Create asset", so the
Japanese REST API list showed Create asset twice, and "Controls &
Keyboard Shortcuts" had lost "Controls".
The bracketed English UI names, such as インスペクターパネル (Inspector),
and abbreviations, such as アンビエントオクルージョン(AO), look deliberate
and stay.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restyles the User Manual sidebar and narrows it to the Docusaurus default width. It also translates the section headers on the Japanese site, corrects six Japanese sidebar titles, and makes expanding a category collapse its siblings.
What changed
Section headers (INTRODUCTION, CORE PRODUCTS and so on)
.sidebar-section-header:first-of-typerule matched every header, because each sits alone in its<li>, so all five got the first header's smaller 12 px margin and the intended larger gap never applied.type: 'html'sidebar items, which Docusaurus doesn't translate, so asectionHeader()helper insidebars.jsnow picks each label by locale.sidebars.jsis reloaded for every locale, and bothdocusaurus buildanddocusaurus startsetDOCUSAURUS_CURRENT_LOCALEfirst.Sidebar density (
src/css/custom.scss)--ifm-toc-border-color).Sidebar width (
src/css/custom.scss)html[lang='ja']. Its labels run longer, and at 300 px six more of them would wrap onto a second line.Japanese sidebar titles (front matter
title, which is also each page's heading)The bracketed English UI names (ヒエラルキーパネル (Hierarchy), インスペクターパネル (Inspector), ビューポート (Viewport)) and abbreviations ((PBR), (IBL), (AO)) are unchanged. They look deliberate: the Editor's UI is in English.
Auto-collapse (
docusaurus.config.js, in its own commit)autoCollapseCategories: true: expanding a category collapses its expanded siblings, at every level.Why
The orange bars read like a current-page marker and competed with the real current-page highlight. The sidebar also felt heavy: 16 px medium-weight labels, large chevrons and no cue for nesting. With more than 500 entries, it accumulated open categories as you browsed. On the Japanese site the section headers were still in English.
Measuring every label for the width change also showed six Japanese titles that had drifted from their English pages. Four added "PlayCanvas" or "3D models", and one had lost "Controls". The Delete asset page was titled "Create asset", so the Japanese REST API list showed Create asset twice.
Testing
npm run buildsucceeds for en and ja with no warnings or broken linksnpm run lintis clean, andnpm testpasses (52 tests)/ja/user-manual/has the Japanese headers and the corrected titles, and/user-manual/has the English headers/ja/, and in the mobile drawer. There is a divider above every header except the first, labels are 15 px, and breadcrumbs are unchangedNotes for review
I confirm I have read the contributing guidelines.
🤖 Generated with Claude Code