docs: update#101
Conversation
📝 WalkthroughWalkthroughThis PR synchronizes Avatar Compressor documentation with expanded feature explanations (exclusion mechanisms, editor preferences, ASTC options) and consistent "LAC:" branding, while simultaneously redesigning the homepage from a marketing-focused layout to a component-driven showcase with a new carousel, footer, and simplified installation flow. ChangesContent and Branding Synchronization
Homepage UI Redesign and Component Library
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
Documentation~/avatar-compressor-docs/package.json (1)
36-41: ⚡ Quick winConsolidate pnpm build-script policy to allowBuilds.
Both
package.jsonandpnpm-workspace.yamlconfigure the same packages (esbuild, sharp, unrs-resolver) for build scripts using different settings:onlyBuiltDependencies(deprecated) andallowBuilds(modern). Remove thepnpm.onlyBuiltDependenciesconfiguration and rely only onallowBuildsinpnpm-workspace.yamlto avoid policy drift.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Documentation`~/avatar-compressor-docs/package.json around lines 36 - 41, Remove the deprecated pnpm.onlyBuiltDependencies block from package.json so the build-policy is consolidated to pnpm-workspace.yaml's allowBuilds; specifically delete the "pnpm": { "onlyBuiltDependencies": ["esbuild","sharp","unrs-resolver"] } entry and ensure pnpm-workspace.yaml lists esbuild, sharp and unrs-resolver under allowBuilds so only allowBuilds controls build-script allowance.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@Documentation`~/avatar-compressor-docs/content/docs.ja/usage/reduce-texture-memory.mdx:
- Line 127: The label "Excluded textures / paths" is left in English and breaks
Japanese consistency; replace it with a Japanese label (e.g., "除外されたテクスチャ / パス")
or add Japanese first with the English in parentheses (e.g., "除外されたテクスチャ / パス
(Excluded textures / paths)") wherever this exact string appears in the document
so the troubleshooting bullet matches surrounding Japanese UI guidance.
In `@Documentation`~/avatar-compressor-docs/src/components/component-showcase.tsx:
- Around line 61-69: The global keydown handler inside the useEffect registers
onKey which currently always calls cycle for ArrowLeft/ArrowRight; update onKey
to ignore events when the active target is an editable element by checking
e.target (or document.activeElement) for input, textarea, select,
contentEditable=true, or similar editable controls and return early in those
cases so cycle only runs when focus is not in editable fields; modify the onKey
handler used by useEffect (references: useEffect, onKey, cycle, hasMultiple) to
perform this guard before handling arrow keys and keep the same add/remove
listener logic.
---
Nitpick comments:
In `@Documentation`~/avatar-compressor-docs/package.json:
- Around line 36-41: Remove the deprecated pnpm.onlyBuiltDependencies block from
package.json so the build-policy is consolidated to pnpm-workspace.yaml's
allowBuilds; specifically delete the "pnpm": { "onlyBuiltDependencies":
["esbuild","sharp","unrs-resolver"] } entry and ensure pnpm-workspace.yaml lists
esbuild, sharp and unrs-resolver under allowBuilds so only allowBuilds controls
build-script allowance.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 06596115-dc31-44be-8b24-9da98ba32e8d
⛔ Files ignored due to path filters (1)
Documentation~/avatar-compressor-docs/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (27)
Documentation~/avatar-compressor-docs/content/docs.ja/changelog.mdxDocumentation~/avatar-compressor-docs/content/docs.ja/components/texture-compressor.mdxDocumentation~/avatar-compressor-docs/content/docs.ja/index.mdxDocumentation~/avatar-compressor-docs/content/docs.ja/installation.mdxDocumentation~/avatar-compressor-docs/content/docs.ja/releases.mdxDocumentation~/avatar-compressor-docs/content/docs.ja/usage/reduce-texture-memory.mdxDocumentation~/avatar-compressor-docs/content/docs/changelog.mdxDocumentation~/avatar-compressor-docs/content/docs/components/texture-compressor.mdxDocumentation~/avatar-compressor-docs/content/docs/index.mdxDocumentation~/avatar-compressor-docs/content/docs/installation.mdxDocumentation~/avatar-compressor-docs/content/docs/releases.mdxDocumentation~/avatar-compressor-docs/content/docs/usage/reduce-texture-memory.mdxDocumentation~/avatar-compressor-docs/package.jsonDocumentation~/avatar-compressor-docs/pnpm-workspace.yamlDocumentation~/avatar-compressor-docs/src/app/[lang]/(home)/layout.tsxDocumentation~/avatar-compressor-docs/src/app/[lang]/(home)/page.tsxDocumentation~/avatar-compressor-docs/src/app/[lang]/docs/[[...slug]]/page.tsxDocumentation~/avatar-compressor-docs/src/app/[lang]/layout.tsxDocumentation~/avatar-compressor-docs/src/app/[lang]/og/docs/[...slug]/route.tsxDocumentation~/avatar-compressor-docs/src/app/[lang]/og/home/route.tsxDocumentation~/avatar-compressor-docs/src/app/global.cssDocumentation~/avatar-compressor-docs/src/components/component-showcase.tsxDocumentation~/avatar-compressor-docs/src/components/footer.tsxDocumentation~/avatar-compressor-docs/src/components/image-preview.tsxDocumentation~/avatar-compressor-docs/src/components/vpm-repository-link.tsxDocumentation~/avatar-compressor-docs/src/lib/layout.shared.tsxDocumentation~/avatar-compressor-docs/tsconfig.json
💤 Files with no reviewable changes (2)
- Documentation~/avatar-compressor-docs/src/app/global.css
- Documentation~/avatar-compressor-docs/tsconfig.json
|
|
||
| - **サイズフィルター** — テクスチャが `Min Source Size` または `Skip If Smaller Than` より小さい | ||
| - **タイプフィルター** — テクスチャのカテゴリ(Main / Normal / Emission / Other)が無効 | ||
| - **Excluded textures / paths** — テクスチャまたはアセットパスが **Exclusions** セクションに登録されている |
There was a problem hiding this comment.
Use a Japanese label for consistency in troubleshooting bullets.
Excluded textures / paths stands out from the surrounding Japanese UI guidance. Consider localizing this label (or adding Japanese first with English in parentheses) for consistency.
Suggested tweak
-- **Excluded textures / paths** — テクスチャまたはアセットパスが **Exclusions** セクションに登録されている
+- **除外テクスチャ / パス(Excluded textures / paths)** — テクスチャまたはアセットパスが **Exclusions** セクションに登録されている📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - **Excluded textures / paths** — テクスチャまたはアセットパスが **Exclusions** セクションに登録されている | |
| - **除外テクスチャ / パス(Excluded textures / paths)** — テクスチャまたはアセットパスが **Exclusions** セクションに登録されている |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@Documentation`~/avatar-compressor-docs/content/docs.ja/usage/reduce-texture-memory.mdx
at line 127, The label "Excluded textures / paths" is left in English and breaks
Japanese consistency; replace it with a Japanese label (e.g., "除外されたテクスチャ / パス")
or add Japanese first with the English in parentheses (e.g., "除外されたテクスチャ / パス
(Excluded textures / paths)") wherever this exact string appears in the document
so the troubleshooting bullet matches surrounding Japanese UI guidance.
| useEffect(() => { | ||
| if (!hasMultiple) return; | ||
| function onKey(e: KeyboardEvent) { | ||
| if (e.key === 'ArrowLeft') cycle(-1); | ||
| else if (e.key === 'ArrowRight') cycle(1); | ||
| } | ||
| window.addEventListener('keydown', onKey); | ||
| return () => window.removeEventListener('keydown', onKey); | ||
| }, [cycle, hasMultiple]); |
There was a problem hiding this comment.
Guard global Arrow key handling for editable targets.
On Line 63, the window-level handler runs even when focus is in inputs/textareas/contenteditable, which can trigger unintended carousel navigation while editing text.
🔧 Suggested fix
useEffect(() => {
if (!hasMultiple) return;
function onKey(e: KeyboardEvent) {
+ const target = e.target as HTMLElement | null;
+ if (
+ target &&
+ (target.tagName === 'INPUT' ||
+ target.tagName === 'TEXTAREA' ||
+ target.isContentEditable)
+ ) {
+ return;
+ }
if (e.key === 'ArrowLeft') cycle(-1);
else if (e.key === 'ArrowRight') cycle(1);
}
window.addEventListener('keydown', onKey);
return () => window.removeEventListener('keydown', onKey);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| useEffect(() => { | |
| if (!hasMultiple) return; | |
| function onKey(e: KeyboardEvent) { | |
| if (e.key === 'ArrowLeft') cycle(-1); | |
| else if (e.key === 'ArrowRight') cycle(1); | |
| } | |
| window.addEventListener('keydown', onKey); | |
| return () => window.removeEventListener('keydown', onKey); | |
| }, [cycle, hasMultiple]); | |
| useEffect(() => { | |
| if (!hasMultiple) return; | |
| function onKey(e: KeyboardEvent) { | |
| const target = e.target as HTMLElement | null; | |
| if ( | |
| target && | |
| (target.tagName === 'INPUT' || | |
| target.tagName === 'TEXTAREA' || | |
| target.isContentEditable) | |
| ) { | |
| return; | |
| } | |
| if (e.key === 'ArrowLeft') cycle(-1); | |
| else if (e.key === 'ArrowRight') cycle(1); | |
| } | |
| window.addEventListener('keydown', onKey); | |
| return () => window.removeEventListener('keydown', onKey); | |
| }, [cycle, hasMultiple]); |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Documentation`~/avatar-compressor-docs/src/components/component-showcase.tsx
around lines 61 - 69, The global keydown handler inside the useEffect registers
onKey which currently always calls cycle for ArrowLeft/ArrowRight; update onKey
to ignore events when the active target is an editable element by checking
e.target (or document.activeElement) for input, textarea, select,
contentEditable=true, or similar editable controls and return early in those
cases so cycle only runs when focus is not in editable fields; modify the onKey
handler used by useEffect (references: useEffect, onKey, cycle, hasMultiple) to
perform this guard before handling arrow keys and keep the same add/remove
listener logic.
Summary by CodeRabbit
New Features
Documentation
Chores