Improve docs layout#570
Conversation
📝 WalkthroughWalkthroughReplaced emoji icons with Tabler icons across docs and support components, added an icon mapping module and Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (5)
docs/src/components/support/CryptoModal.tsx (1)
69-70: Mark these inline icons as decorative.These icons are paired with visible text, so hiding them from assistive tech avoids duplicate/extra narration.
♿ Suggested adjustment
- <IconCurrencyBitcoin size={24} stroke={1.5} /> + <IconCurrencyBitcoin size={24} stroke={1.5} aria-hidden="true" focusable={false} /> @@ - <IconCheck size={16} stroke={2} /> + <IconCheck size={16} stroke={2} aria-hidden="true" focusable={false} /> @@ - <IconCopy size={16} stroke={1.5} /> + <IconCopy size={16} stroke={1.5} aria-hidden="true" focusable={false} />Also applies to: 137-143
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/src/components/support/CryptoModal.tsx` around lines 69 - 70, The inline icons (e.g., IconCurrencyBitcoin and the icons used around lines 137-143) are redundant with visible text and should be marked decorative for screen readers; update each icon component to include accessibility attributes like aria-hidden="true" and focusable={false} (or the equivalent props accepted by the icon component library) so they are ignored by assistive tech, and ensure you do not add an accessible title to these instances.docs/src/components/support/config/donationConfig.tsx (1)
49-133: Consider deduplicating repeated icon props.
size/strokeare repeated throughout config entries; extracting shared constants would reduce noise and simplify future updates.♻️ Optional refactor
+const DONATION_ICON_PROPS = { size: 24, stroke: 1.5 } as const; +const SUPPORT_ICON_PROPS = { size: 20, stroke: 1.5 } as const; + export const donationMethods: DonationMethod[] = [ { @@ - icon: <IconHeart size={24} stroke={1.5} />, + icon: <IconHeart {...DONATION_ICON_PROPS} />, @@ - icon: <IconCoffee size={24} stroke={1.5} />, + icon: <IconCoffee {...DONATION_ICON_PROPS} />, @@ - icon: <IconCurrencyBitcoin size={24} stroke={1.5} />, + icon: <IconCurrencyBitcoin {...DONATION_ICON_PROPS} />, @@ - icon: <IconCurrencyBitcoin size={20} stroke={1.5} />, + icon: <IconCurrencyBitcoin {...SUPPORT_ICON_PROPS} />, @@ - icon: <IconCurrencyEthereum size={20} stroke={1.5} />, + icon: <IconCurrencyEthereum {...SUPPORT_ICON_PROPS} />,🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/src/components/support/config/donationConfig.tsx` around lines 49 - 133, The config repeats icon size/stroke literals across donationConfig, cryptoCurrencies, and alternativeSupport; extract shared constants (e.g., ICON_SIZE and ICON_STROKE) at the top of the module and replace occurrences like IconHeart size={24} stroke={1.5} (and all other Icon... uses) with size={ICON_SIZE} stroke={ICON_STROKE}; ensure the new constants are exported or scoped appropriately and update any new icon entries to use these constants so future changes require updating only the constants instead of each config item.docs/src/components/documentation/SectionTitle.tsx (1)
2-2:iconprop is currently a no-op; render it here or remove the prop from callsites.
SectionTitleacceptsiconbut never uses it, so usages likeicon="brand-telegram"don’t display anything.Proposed fix
import React, { useState } from 'react'; import { IconLink, IconCheck } from '@tabler/icons-react'; import styles from './documentation.module.css'; import { generateIdFromTitle } from './utils'; +import { renderIcon } from './iconMap'; @@ <h2 id={elementId} className={`${styles.sectionTitle} ${className || ''}`}> + {icon && <span aria-hidden="true">{renderIcon(icon, 18)}</span>} {children} </h2>Also applies to: 63-63
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/src/components/documentation/SectionTitle.tsx` at line 2, SectionTitle currently accepts an icon prop but never renders it; update the SectionTitle component to use the icon prop (or change its type) and render it next to the title so usages like icon="brand-telegram" actually display; specifically, modify the SectionTitle component to accept icon: ReactNode (or a string mapped to a Tabler icon) and render that node before the heading (referencing the SectionTitle component and the icon prop), or alternatively remove the unused icon prop from all callsites if you prefer not to support icons.docs/src/components/documentation/ConfigSection.tsx (1)
53-53: Render the icon wrapper only when icon lookup succeeds.Right now, an unknown token renders an empty
.configIconspan (extra gap before title). Guard the wrapper with the resolved node.♻️ Proposed refactor
export default function ConfigSection({ @@ }: ConfigSectionProps) { const [copied, setCopied] = useState(false); + const iconNode = icon ? renderIcon(icon) : null; @@ <h3 className={styles.configTitle}> - {icon && <span className={styles.configIcon}>{renderIcon(icon)}</span>} + {iconNode && <span className={styles.configIcon}>{iconNode}</span>} {title} </h3>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/src/components/documentation/ConfigSection.tsx` at line 53, The icon wrapper is rendered even when an unknown token returns no node; update ConfigSection to resolve the icon node first (call renderIcon(icon) into a variable) and only render the <span className={styles.configIcon}> wrapper when that resolved node is truthy; use the resolved node inside the span (and keep existing styles/configIcon and renderIcon references) so unknown tokens do not produce an empty gap.docs/src/components/documentation/EnhancedAdmonition.tsx (1)
41-43: Prefer decorative icon semantics to avoid duplicate screen-reader announcements.Because the title text is already rendered in
<strong>, the icon can be hidden from assistive tech.Suggested tweak
- <span className={styles.admonitionIcon} aria-label={displayTitle}> + <span className={styles.admonitionIcon} aria-hidden="true"> {config.icon} </span>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/src/components/documentation/EnhancedAdmonition.tsx` around lines 41 - 43, The icon span in the EnhancedAdmonition component is announced redundantly to screen readers because it uses aria-label while the title is already exposed; update the span (the element using className styles.admonitionIcon that renders config.icon alongside displayTitle) to be decorative by removing the aria-label and adding aria-hidden="true" (and for SVG icons also add focusable="false" where applicable) so the icon is hidden from assistive technology while the title remains accessible.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/src/components/documentation/iconMap.tsx`:
- Around line 58-60: renderIcon currently returns null silently when a lookup in
iconMap fails, which hid missing icon keys referenced in PrefixedSection.tsx;
add entries for the two missing keys ('⏸️' and '⚡') to iconMap or change
PrefixedSection.tsx to use existing keys, and modify renderIcon (or the iconMap
initialization) to emit a dev-only console.warn/error with the missing key and
component name (only in non-production) so missing icon lookups are surfaced
during development; references: renderIcon, iconMap, PrefixedSection.tsx,
missing keys '⏸️' and '⚡'.
In `@docs/src/components/support/AlternativeSupport.tsx`:
- Around line 21-24: The icon wrapper span (className={styles.alternativeIcon})
in the AlternativeSupport component is left with an aria-label after role="img"
was removed; mark this non-interactive icon as decorative by removing the
aria-label and adding aria-hidden="true" (or role="presentation") on that span
so screen readers ignore it while the visible title text remains the accessible
label.
In `@docs/src/css/custom.css`:
- Around line 83-85: The html rule currently sets scroll-behavior: smooth; but
must be disabled for users who prefer reduced motion; wrap an override in a
prefers-reduced-motion media query (use `@media` (prefers-reduced-motion: reduce)
{ html { scroll-behavior: auto; } }) so the smooth scrolling is turned off for
that preference, and apply the same change where html { scroll-behavior: smooth;
} appears again (the block around lines 236-247) to ensure consistent behavior.
- Line 7: The `@import` uses url(...) which violates the stylelint rules
import-notation and may also trigger value-keyword-case; change the rule to use
string notation (e.g. `@import` 'https://fonts.googleapis.com/...&display=swap';)
instead of `@import` url(...), and ensure any keywords in that declaration (like
display=swap) are lowercased where applicable; apply the same change to the
other occurrences referenced (the other `@import` lines at the noted locations) so
the import-notation and value-keyword-case lint rules pass.
- Around line 10-45: The stylesheet is missing the CSS custom property
--accent-color used by index.module.css, causing invalid runtime declarations;
add a --accent-color (and any related accent variants you need like
--accent-color-hover or --accent-foreground if referenced) into the :root light
theme block and the corresponding dark-theme token block (the same file’s dark
token section around lines 48-80) so var(--accent-color) resolves—update the
declarations near the existing primary/brand tokens (e.g., alongside
--ifm-color-primary and --ifm-color-primary-light) to supply appropriate
hex/rgba values for both light and dark modes.
---
Nitpick comments:
In `@docs/src/components/documentation/ConfigSection.tsx`:
- Line 53: The icon wrapper is rendered even when an unknown token returns no
node; update ConfigSection to resolve the icon node first (call renderIcon(icon)
into a variable) and only render the <span className={styles.configIcon}>
wrapper when that resolved node is truthy; use the resolved node inside the span
(and keep existing styles/configIcon and renderIcon references) so unknown
tokens do not produce an empty gap.
In `@docs/src/components/documentation/EnhancedAdmonition.tsx`:
- Around line 41-43: The icon span in the EnhancedAdmonition component is
announced redundantly to screen readers because it uses aria-label while the
title is already exposed; update the span (the element using className
styles.admonitionIcon that renders config.icon alongside displayTitle) to be
decorative by removing the aria-label and adding aria-hidden="true" (and for SVG
icons also add focusable="false" where applicable) so the icon is hidden from
assistive technology while the title remains accessible.
In `@docs/src/components/documentation/SectionTitle.tsx`:
- Line 2: SectionTitle currently accepts an icon prop but never renders it;
update the SectionTitle component to use the icon prop (or change its type) and
render it next to the title so usages like icon="brand-telegram" actually
display; specifically, modify the SectionTitle component to accept icon:
ReactNode (or a string mapped to a Tabler icon) and render that node before the
heading (referencing the SectionTitle component and the icon prop), or
alternatively remove the unused icon prop from all callsites if you prefer not
to support icons.
In `@docs/src/components/support/config/donationConfig.tsx`:
- Around line 49-133: The config repeats icon size/stroke literals across
donationConfig, cryptoCurrencies, and alternativeSupport; extract shared
constants (e.g., ICON_SIZE and ICON_STROKE) at the top of the module and replace
occurrences like IconHeart size={24} stroke={1.5} (and all other Icon... uses)
with size={ICON_SIZE} stroke={ICON_STROKE}; ensure the new constants are
exported or scoped appropriately and update any new icon entries to use these
constants so future changes require updating only the constants instead of each
config item.
In `@docs/src/components/support/CryptoModal.tsx`:
- Around line 69-70: The inline icons (e.g., IconCurrencyBitcoin and the icons
used around lines 137-143) are redundant with visible text and should be marked
decorative for screen readers; update each icon component to include
accessibility attributes like aria-hidden="true" and focusable={false} (or the
equivalent props accepted by the icon component library) so they are ignored by
assistive tech, and ensure you do not add an accessible title to these
instances.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 22310a4f-2fb9-450d-96da-82f2dadde9f3
⛔ Files ignored due to path filters (2)
docs/package-lock.jsonis excluded by!**/package-lock.jsondocs/yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (35)
docs/docs/2_features.mdxdocs/docs/3_supported-apps.mdxdocs/docs/4_how_it_works.mdxdocs/docs/6_faq.mdxdocs/docs/configuration/arr/index.mdxdocs/docs/configuration/blacklist-sync/index.mdxdocs/docs/configuration/download-client/index.mdxdocs/docs/configuration/general/index.mdxdocs/docs/configuration/health-checks/index.mdxdocs/docs/configuration/malware-blocker/index.mdxdocs/docs/configuration/notifications/apprise.mdxdocs/docs/configuration/notifications/discord.mdxdocs/docs/configuration/notifications/gotify.mdxdocs/docs/configuration/notifications/index.mdxdocs/docs/configuration/notifications/notifiarr.mdxdocs/docs/configuration/notifications/ntfy.mdxdocs/docs/configuration/notifications/pushover.mdxdocs/docs/configuration/notifications/telegram.mdxdocs/docs/configuration/queue-cleaner/index.mdxdocs/docs/configuration/stats/index.mdxdocs/package.jsondocs/src/components/documentation/ConfigSection.tsxdocs/src/components/documentation/EnhancedAdmonition.tsxdocs/src/components/documentation/SectionTitle.tsxdocs/src/components/documentation/documentation.module.cssdocs/src/components/documentation/iconMap.tsxdocs/src/components/support/AlternativeSupport.tsxdocs/src/components/support/CryptoModal.tsxdocs/src/components/support/DonationCard.tsxdocs/src/components/support/SupportBanner.tsxdocs/src/components/support/SupportHero.tsxdocs/src/components/support/config/donationConfig.tsxdocs/src/css/custom.cssdocs/src/pages/index.module.cssdocs/src/pages/index.tsx
💤 Files with no reviewable changes (1)
- docs/docs/6_faq.mdx
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
docs/src/css/custom.css (2)
199-226: Considerwill-changefor ambient orb performance.These large, blurred, animated pseudo-elements can stress the compositor on lower-end devices. Adding
will-change: transformpromotes them to their own GPU layer, which may improve animation smoothness.⚡ Proposed optimization
[data-theme='dark'] main::before, [data-theme='dark'] main::after { content: ''; position: fixed; border-radius: 50%; filter: blur(120px); opacity: 0.12; pointer-events: none; z-index: 0; animation: float 20s ease-in-out infinite alternate; + will-change: transform; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/src/css/custom.css` around lines 199 - 226, Add will-change: transform to the dark-theme ambient orb pseudo-elements to promote GPU compositing: update the CSS rules for [data-theme='dark'] main::before and [data-theme='dark'] main::after in docs/src/css/custom.css (the two selector blocks that define the blurred, animated radial-gradient orbs) to include will-change: transform; so both pseudo-elements are promoted to their own layer for smoother animation on low-end devices.
148-161: Light mode inline code missing explicit background color.Dark mode explicitly sets
background-colorandborderfor inlinecodeelements, but light mode only defines padding/border-radius. This may cause inconsistent styling if Infima defaults change or if the inherited background doesn't match your design intent.💅 Proposed fix to add explicit light mode background
[data-theme='light'] code { + background-color: rgba(109, 40, 217, 0.08); padding: 0.2em 0.4em; border-radius: 4px; font-size: 0.95em; + border: 1px solid rgba(126, 87, 194, 0.15); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/src/css/custom.css` around lines 148 - 161, The light-mode inline code style ([data-theme='light'] code) lacks an explicit background and border, causing inconsistent appearance vs the dark-mode rule ([data-theme='dark'] code); update the [data-theme='light'] code rule to include a specific background-color (e.g., a subtle light gray) and a light border (e.g., 1px solid with low-opacity dark color) alongside the existing padding/border-radius/font-size so inline code renders consistently across themes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/docs/configuration/malware-blocker/index.mdx`:
- Line 121: Update the section title string used in the SectionTitle element:
change "Arr Service Settings" to a consistent branding form such as "*arr
Service Settings" (or "ARR Service Settings") to match nearby usage of "*arr
application" and other occurrences; locate the SectionTitle element that
currently contains "Arr Service Settings" and replace the text with the chosen
canonical form for consistency.
---
Nitpick comments:
In `@docs/src/css/custom.css`:
- Around line 199-226: Add will-change: transform to the dark-theme ambient orb
pseudo-elements to promote GPU compositing: update the CSS rules for
[data-theme='dark'] main::before and [data-theme='dark'] main::after in
docs/src/css/custom.css (the two selector blocks that define the blurred,
animated radial-gradient orbs) to include will-change: transform; so both
pseudo-elements are promoted to their own layer for smoother animation on
low-end devices.
- Around line 148-161: The light-mode inline code style ([data-theme='light']
code) lacks an explicit background and border, causing inconsistent appearance
vs the dark-mode rule ([data-theme='dark'] code); update the
[data-theme='light'] code rule to include a specific background-color (e.g., a
subtle light gray) and a light border (e.g., 1px solid with low-opacity dark
color) alongside the existing padding/border-radius/font-size so inline code
renders consistently across themes.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: afbd646e-1c78-4070-9f68-154b0eda9c02
⛔ Files ignored due to path filters (2)
docs/package-lock.jsonis excluded by!**/package-lock.jsondocs/yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (36)
README.mddocs/docs/2_features.mdxdocs/docs/3_supported-apps.mdxdocs/docs/4_how_it_works.mdxdocs/docs/6_faq.mdxdocs/docs/configuration/arr/index.mdxdocs/docs/configuration/blacklist-sync/index.mdxdocs/docs/configuration/download-client/index.mdxdocs/docs/configuration/general/index.mdxdocs/docs/configuration/health-checks/index.mdxdocs/docs/configuration/malware-blocker/index.mdxdocs/docs/configuration/notifications/apprise.mdxdocs/docs/configuration/notifications/discord.mdxdocs/docs/configuration/notifications/gotify.mdxdocs/docs/configuration/notifications/index.mdxdocs/docs/configuration/notifications/notifiarr.mdxdocs/docs/configuration/notifications/ntfy.mdxdocs/docs/configuration/notifications/pushover.mdxdocs/docs/configuration/notifications/telegram.mdxdocs/docs/configuration/queue-cleaner/index.mdxdocs/docs/configuration/stats/index.mdxdocs/package.jsondocs/src/components/documentation/ConfigSection.tsxdocs/src/components/documentation/EnhancedAdmonition.tsxdocs/src/components/documentation/SectionTitle.tsxdocs/src/components/documentation/documentation.module.cssdocs/src/components/documentation/iconMap.tsxdocs/src/components/support/AlternativeSupport.tsxdocs/src/components/support/CryptoModal.tsxdocs/src/components/support/DonationCard.tsxdocs/src/components/support/SupportBanner.tsxdocs/src/components/support/SupportHero.tsxdocs/src/components/support/config/donationConfig.tsxdocs/src/css/custom.cssdocs/src/pages/index.module.cssdocs/src/pages/index.tsx
💤 Files with no reviewable changes (1)
- docs/docs/6_faq.mdx
✅ Files skipped from review due to trivial changes (23)
- README.md
- docs/docs/configuration/notifications/discord.mdx
- docs/docs/4_how_it_works.mdx
- docs/package.json
- docs/docs/3_supported-apps.mdx
- docs/docs/configuration/blacklist-sync/index.mdx
- docs/docs/configuration/notifications/pushover.mdx
- docs/docs/configuration/general/index.mdx
- docs/docs/configuration/notifications/telegram.mdx
- docs/docs/configuration/notifications/gotify.mdx
- docs/src/components/support/SupportBanner.tsx
- docs/docs/configuration/download-client/index.mdx
- docs/docs/configuration/notifications/apprise.mdx
- docs/docs/configuration/stats/index.mdx
- docs/docs/configuration/notifications/notifiarr.mdx
- docs/docs/configuration/queue-cleaner/index.mdx
- docs/docs/configuration/health-checks/index.mdx
- docs/docs/2_features.mdx
- docs/docs/configuration/notifications/ntfy.mdx
- docs/docs/configuration/arr/index.mdx
- docs/src/pages/index.tsx
- docs/src/components/documentation/EnhancedAdmonition.tsx
- docs/src/components/support/SupportHero.tsx
🚧 Files skipped from review as they are similar to previous changes (9)
- docs/src/components/support/DonationCard.tsx
- docs/src/components/documentation/SectionTitle.tsx
- docs/src/components/documentation/ConfigSection.tsx
- docs/src/components/documentation/documentation.module.css
- docs/src/components/documentation/iconMap.tsx
- docs/src/components/support/CryptoModal.tsx
- docs/docs/configuration/notifications/index.mdx
- docs/src/components/support/AlternativeSupport.tsx
- docs/src/pages/index.module.css
Summary by CodeRabbit
New Features
Style
Documentation