-
-
Notifications
You must be signed in to change notification settings - Fork 53
Docs improvements #1662
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
base: main
Are you sure you want to change the base?
Docs improvements #1662
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,12 @@ | ||
|
|
||
| "use client"; | ||
| import Callout from "@radui/ui/Callout"; | ||
|
|
||
| export const BookmarkIcon = () => { | ||
| return <svg width="24" height="24" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 2C3.22386 2 3 2.22386 3 2.5V13.5C3 13.6818 3.09864 13.8492 3.25762 13.9373C3.41659 14.0254 3.61087 14.0203 3.765 13.924L7.5 11.5896L11.235 13.924C11.3891 14.0203 11.5834 14.0254 11.7424 13.9373C11.9014 13.8492 12 13.6818 12 13.5V2.5C12 2.22386 11.7761 2 11.5 2H3.5Z" fill="currentColor" fillRule="evenodd" clipRule="evenodd"></path></svg>; | ||
| }; | ||
| import { AlertCircle as BookmarkIcon } from 'lucide-react'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # Read the CalloutExample.tsx file to see current state
cat -n docs/app/docs/components/callout/examples/CalloutExample.tsxRepository: rad-ui/ui Length of output: 617 🏁 Script executed: # Search for any imports of BookmarkIcon from CalloutExample
rg "from ['\"].*CalloutExample['\"]" -A 5 -B 2
# Search for any references to BookmarkIcon in the codebase
rg "BookmarkIcon" --type=tsx --type=ts --type=jsx --type=jsRepository: rad-ui/ui Length of output: 906 🏁 Script executed: # Let's check what's actually exported from codeUsage and if BookmarkIcon is defined there
cat -n docs/app/docs/components/callout/docs/codeUsage.ts 2>/dev/null || cat -n docs/app/docs/components/callout/docs/codeUsage.tsx 2>/dev/null || cat -n docs/app/docs/components/callout/docs/codeUsage.js 2>/dev/null
# Search for BookmarkIcon definition
rg "BookmarkIcon" -A 3 -B 3
# Check if CalloutExample exports BookmarkIcon
rg "export.*BookmarkIcon"Repository: rad-ui/ui Length of output: 13377 🏁 Script executed: # Check git history to see if BookmarkIcon was previously exported from codeUsage
git log --oneline -p docs/app/docs/components/callout/docs/codeUsage.ts 2>/dev/null | head -100
# Also check CalloutExample export history
git log --oneline -p docs/app/docs/components/callout/examples/CalloutExample.tsx 2>/dev/null | head -100
# Check if page.mdx actually uses the imported BookmarkIcon
grep -n "BookmarkIcon" docs/app/docs/components/callout/page.mdxRepository: rad-ui/ui Length of output: 943 Remove misleading icon alias in Callout examples. The Additionally, 🤖 Prompt for AI Agents |
||
|
|
||
| const CalloutExample = () => ( | ||
| <Callout.Root color="red"> | ||
| <Callout.Icon> | ||
| <BookmarkIcon /> | ||
| <BookmarkIcon className="w-full h-full" /> | ||
| </Callout.Icon> | ||
| <Callout.Text> | ||
| Seems like there's been an error. Please try again. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| "use client"; | ||
| import Callout from '@radui/ui/Callout'; | ||
| import { BookmarkIcon } from './CalloutExample'; | ||
| import { AlertCircle as BookmarkIcon } from 'lucide-react'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major Misleading icon alias: AlertCircle imported as BookmarkIcon. The 🔎 Proposed fix-import { AlertCircle as BookmarkIcon } from 'lucide-react';
+import { AlertCircle } from 'lucide-react';- <BookmarkIcon className="w-full h-full" />
+ <AlertCircle className="w-full h-full" />Also applies to: 15-15 🤖 Prompt for AI Agents |
||
|
|
||
| const CalloutSizes = () => { | ||
| const sizes = ['small', 'medium', 'large', 'x-large']; | ||
|
|
@@ -12,7 +12,7 @@ const CalloutSizes = () => { | |
| return ( | ||
| <Callout.Root size={size} color="red" key={index}> | ||
| <Callout.Icon> | ||
| <BookmarkIcon /> | ||
| <BookmarkIcon className="w-full h-full" /> | ||
| </Callout.Icon> | ||
| <Callout.Text> | ||
| Seems like there's been an error. Please try again. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| 'use client'; | ||
|
|
||
| import { Check, X, AlertCircle, Minus } from 'lucide-react'; | ||
|
|
||
| export const CheckIcon = () => <Check className="w-4 h-4 inline-block text-green-900" />; | ||
| export const XIcon = () => <X className="w-4 h-4 inline-block text-gray-600" />; | ||
| export const HighPriorityIcon = () => <AlertCircle className="w-4 h-4 inline-block text-red-600" />; | ||
| export const MediumPriorityIcon = () => <AlertCircle className="w-4 h-4 inline-block text-yellow-600" />; | ||
| export const DashIcon = () => <Minus className="w-4 h-4 inline-block text-gray-400" />; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Misleading icon alias: AlertCircle imported as BookmarkIcon.
Same issue as in CalloutSizes.tsx—the
AlertCircleicon is semantically a warning/error indicator, not a bookmark. The alias creates confusion about what icon is actually being displayed.🔎 Proposed fix
Also applies to: 12-12
🤖 Prompt for AI Agents