Skip to content

feat: add devicon icons to tag badges#25

Merged
michellepace merged 6 commits intomainfrom
feat/devicon-tags
Jan 2, 2026
Merged

feat: add devicon icons to tag badges#25
michellepace merged 6 commits intomainfrom
feat/devicon-tags

Conversation

@michellepace
Copy link
Owner

@michellepace michellepace commented Jan 2, 2026

Summary

  • Add technology icons to tag badges using the Devicon font library (600+ icons)
  • Icons render automatically for any tag matching the devicon registry
  • Alias resolution enables flexible tag names (js → javascript, ts → typescript)
  • Fallback to Lucide <Tag /> icon for unknown tags

Changes

Core Implementation:

  • lib/devicon.tsgetDeviconClassName() utility with O(1) registry lookup
  • lib/devicon.json — Committed registry for predictable behaviour
  • components/tag-link.tsx — Render icons inline with colored prop support

Integration:

  • app/layout.tsx — Load devicon CSS via CDN
  • components/right-sidebar/right-sidebar.tsx — Use brand colours in sidebar

Tests:

  • 20 unit tests covering known icons, aliases, normalisation, fallback, and colored option

Test plan

  • Unit tests pass (20 tests)
  • E2E tests pass (17 tests)
  • Build succeeds
  • Visual verification: icons appear on home page and right sidebar
  • Verify alias resolution: tags like "js" show JavaScript icon

🤖 Generated with Claude Code

michellepace and others added 4 commits January 2, 2026 18:29
Folder Restructure:
- Move completed task notes to `x_docs/OLD/`
- Move reference notes to `x_docs/my_notes/`
- Move active task folder to `x_docs/` root
- Delete obsolete/redundant notes (colours, flex_grid_layout, globals-compare, etc.)

New Documentation:
- Add `authentication.md` and `navigation.md` to `OLD/` for architecture reference
- Add `textbook/url-state.md` for searchParams pattern documentation

Configuration:
- Add `Read(x_docs/OLD/**)` to Claude deny list to prevent reading archived docs

Consolidates project documentation by separating active work from completed tasks
and archived reference material.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Component Structure:
- Move tag-link.tsx from right-sidebar/ to components/ for reuse
- Update imports in right-sidebar and home page

Home Page:
- Replace inline tag spans with TagLink component
- Change title from demo text to "All Questions"
- Remove demo content (overflow tests, flexbox examples)
- Reduce tags to tailwind and nextjs only

TagLink is now a shared component used by both the right sidebar and home page,
providing consistent tag styling and link behaviour across the application.
Handover Documentation:
- Add handover-2.md with implementation spec for devicon integration
- Rename handover.md to handover-1.md (previous right sidebar work)
- Include visual target reference (tags.jpg)

Reference Materials:
- Add devicon.json registry (600+ icons with styles and aliases)
- Add devicon-readme.md for installation and usage reference

Documents the JSON registry lookup approach for adding technology icons to
tag badges. Includes technical constraints around style availability per icon
and alias resolution from the official devicon registry.
Devicon Integration:
- Add `getDeviconClassName()` utility with O(1) registry lookup
- Support 600+ icons via devicon.json with alias resolution (js → javascript)
- Style preference: plain → original → line → first available
- Configurable `colored` param for brand colours vs monotone

TagLink Component:
- Render devicon icons inline when available
- Fall back to Lucide `<Tag />` for unknown tags
- Add `colored` prop (default false, right sidebar uses true)

Infrastructure:
- Load devicon CSS via CDN in layout
- Add 20 unit tests for icon resolution

Docs:
- Rename x_docs/OLD to x_docs/DONE
- Move right-sidebar handover to DONE, mark criteria verified

Enables automatic technology icons for user-generated tags without manual
mapping. Icons render for any tag matching the devicon registry.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
devflow Ready Ready Preview, Comment Jan 2, 2026 9:52pm

@coderabbitai
Copy link

coderabbitai bot commented Jan 2, 2026

Caution

Review failed

The pull request is closed.

Summary by CodeRabbit

  • New Features
    • Tag links now show optional devicon icons and colour support; tags on the home list use the centralised tag component.
  • UI
    • Page heading updated to "All Questions" and several demo sections removed for a cleaner layout.
  • Documentation
    • Added guides for Devicon, authentication, navigation and URL state; removed several legacy/internal docs.
  • Tests
    • New unit tests for devicon lookup and tag sorting behaviour.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Adds devicon support and a new shared TagLink component with optional coloured icons and icon selection logic; introduces lib/devicon utility and tests, updates tag rendering and layout to load devicon stylesheet, and adds/removes several documentation files and test/data changes.

Changes

Cohort / File(s) Summary
Devicon utility & tests
lib/devicon.ts, lib/devicon.test.ts
New utility getDeviconClassName(name, colored = true) with alias/name maps, style preference and normalization; comprehensive unit tests covering aliases, casing, fallbacks and coloured option.
TagLink component
components/tag-link.tsx, components/right-sidebar/tag-link.tsx
New shared components/tag-link.tsx exporting TagLink(name, questionCount?, colored?, showIcon?); removed the old right-sidebar local tag-link file.
Right sidebar usage
components/right-sidebar/right-sidebar.tsx
Updated import to use new components/tag-link.tsx and passes showIcon/colored props where applicable.
App pages & layout
app/(root)/page.tsx, app/layout.tsx
Root page title changed to "All Questions"; simplified tag rendering to use TagLink; removed demo sections. Layout now injects external devicon stylesheet link in head.
Tags data & tests
lib/data/tags.ts, lib/data/tags.test.ts
Reordered/inserted several mock tags (typescript, css, tailwind, postgres, nodejs, html) and added test to assert getPopularTags(5) returns descending counts.
Access control
.claude/settings.json
Added "Read(x_docs/OLD/**)" to permissions.deny.
Documentation added
x_docs/DONE/.../devicon-readme.md, x_docs/DONE/.../handover-1.md, x_docs/DONE/.../handover-2.md, x_docs/DONE/authentication.md, x_docs/DONE/navigation.md, x_docs/textbook/url-state.md
Added Devicon README, handover docs, Clerk auth guide, navigation architecture doc, and URL-state textbook note.
Documentation removed
x_docs/mine/colours.md, x_docs/mine/flex_grid_layout.md, x_docs/mine/globals-compare.md, x_docs/mine/nav_mobile_sidebar-and-rail.md, x_docs/quick_notes.md
Removed multiple legacy/docs-in-progress files (colours, layout guides, theming comparisons, previous nav doc, Playwright caching note).

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I hopped from sidebar into code,
I found some tags and struck a node,
Icons coloured, aliases tamed,
Tests passed, the registry named,
Hop, sprite, render — badges glow.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add devicon icons to tag badges' accurately reflects the main feature addition—integrating Devicon font library icons into tag badge components.
Description check ✅ Passed The description is directly related to the changeset, providing a clear summary of the feature, implementation details, integration points, and test coverage for the Devicon icons addition.

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cfa1a09 and 5de552f.

📒 Files selected for processing (5)
  • components/right-sidebar/right-sidebar.tsx
  • components/tag-link.tsx
  • lib/data/tags.test.ts
  • lib/data/tags.ts
  • x_docs/DONE/2026-01-01-right-sidebar/handover-2.md

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fcf4a3b and cfa1a09.

⛔ Files ignored due to path filters (3)
  • x_docs/DONE/2026-01-01-right-sidebar/current.jpg is excluded by !**/*.jpg
  • x_docs/DONE/2026-01-01-right-sidebar/pic1-target.jpg is excluded by !**/*.jpg
  • x_docs/DONE/2026-01-01-right-sidebar/tags.jpg is excluded by !**/*.jpg
📒 Files selected for processing (32)
  • .claude/settings.json
  • app/(root)/page.tsx
  • app/layout.tsx
  • components/right-sidebar/right-sidebar.tsx
  • components/right-sidebar/tag-link.tsx
  • components/tag-link.tsx
  • lib/devicon.json
  • lib/devicon.test.ts
  • lib/devicon.ts
  • x_docs/DONE/2025-12-14-eval-auth-ui-customise.md
  • x_docs/DONE/2025-12-17-make-mobile-nav.md
  • x_docs/DONE/2025-12-17-page-spacing.md
  • x_docs/DONE/2025-12-25-layout-refactor.md
  • x_docs/DONE/2026-01-01-right-sidebar/devicon-readme.md
  • x_docs/DONE/2026-01-01-right-sidebar/devicon.json
  • x_docs/DONE/2026-01-01-right-sidebar/handover-1.md
  • x_docs/DONE/2026-01-01-right-sidebar/handover-2.md
  • x_docs/DONE/authentication.md
  • x_docs/DONE/navigation.md
  • x_docs/mine/colours.md
  • x_docs/mine/flex_grid_layout.md
  • x_docs/mine/globals-compare.md
  • x_docs/mine/nav_mobile_sidebar-and-rail.md
  • x_docs/my_notes/WORDS.md
  • x_docs/my_notes/caching-explained-1.md
  • x_docs/my_notes/caching-explained-2.md
  • x_docs/my_notes/micro-interactions.md
  • x_docs/my_notes/secrets-reference.md
  • x_docs/my_notes/theme_resources.md
  • x_docs/my_notes/zustand.md
  • x_docs/quick_notes.md
  • x_docs/textbook/url-state.md
💤 Files with no reviewable changes (6)
  • components/right-sidebar/tag-link.tsx
  • x_docs/mine/colours.md
  • x_docs/quick_notes.md
  • x_docs/mine/flex_grid_layout.md
  • x_docs/mine/nav_mobile_sidebar-and-rail.md
  • x_docs/mine/globals-compare.md
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx,md}

📄 CodeRabbit inference engine (CLAUDE.md)

Use British English throughout the codebase (comments, strings, documentation)

Files:

  • app/(root)/page.tsx
  • x_docs/DONE/2026-01-01-right-sidebar/handover-2.md
  • x_docs/DONE/navigation.md
  • lib/devicon.ts
  • x_docs/textbook/url-state.md
  • app/layout.tsx
  • lib/devicon.test.ts
  • components/right-sidebar/right-sidebar.tsx
  • x_docs/DONE/authentication.md
  • x_docs/DONE/2026-01-01-right-sidebar/devicon-readme.md
  • components/tag-link.tsx
  • x_docs/DONE/2026-01-01-right-sidebar/handover-1.md
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Only add "use client" directive when interactivity is needed
Avoid manual useMemo/useCallback unless profiling shows need

Files:

  • app/(root)/page.tsx
  • lib/devicon.ts
  • app/layout.tsx
  • lib/devicon.test.ts
  • components/right-sidebar/right-sidebar.tsx
  • components/tag-link.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Always use @/ import aliases, even for sibling files (use @/app/fonts instead of ./fonts)

Files:

  • app/(root)/page.tsx
  • lib/devicon.ts
  • app/layout.tsx
  • lib/devicon.test.ts
  • components/right-sidebar/right-sidebar.tsx
  • components/tag-link.tsx
🧠 Learnings (8)
📚 Learning: 2025-12-10T20:20:46.607Z
Learnt from: michellepace
Repo: michellepace/devflow PR: 7
File: components/navigation/navbar/index.tsx:1-12
Timestamp: 2025-12-10T20:20:46.607Z
Learning: Clerk's Next.js components (SignedIn, SignedOut, SignInButton, SignUpButton, UserButton) from clerk/nextjs can be used inside Server Components without adding 'use client' in the consuming component. They manage client/server boundary internally. When reviewing code, prefer omitting 'use client' in server components that render these Clerk components and avoid introducing client directives solely for these components. This guideline helps maintain server/server boundary and reduce client bundle size.

Applied to files:

  • app/(root)/page.tsx
  • app/layout.tsx
  • components/right-sidebar/right-sidebar.tsx
  • components/tag-link.tsx
📚 Learning: 2025-12-25T13:56:09.644Z
Learnt from: michellepace
Repo: michellepace/devflow PR: 18
File: components/navigation/content-top-bar.tsx:23-30
Timestamp: 2025-12-25T13:56:09.644Z
Learning: In the Grok-style layout for this project, authenticated user account controls (Clerk's UserButton) are placed in the sidebar footer (components/app-sidebar.tsx), not in the content top bar (components/navigation/content-top-bar.tsx). The content top bar only displays SignedOut authentication options (Sign in/Sign up buttons).

Applied to files:

  • x_docs/DONE/navigation.md
  • x_docs/DONE/authentication.md
📚 Learning: 2025-12-25T15:46:08.787Z
Learnt from: michellepace
Repo: michellepace/devflow PR: 18
File: lib/utils.ts:17-19
Timestamp: 2025-12-25T15:46:08.787Z
Learning: In Tailwind CSS v4, the shorthand bg-(image:--gradient-primary) with parentheses is valid and equivalent to bg-[image:var(--gradient-primary)]. The michellepace/devflow repo standardizes on using the v4 shorthand syntax with parentheses for CSS variable references; when you need a Tailwind utility that references a CSS variable, prefer the shorthand form to maintain consistency across TypeScript files in the project (e.g., lib/**/*.ts).

Applied to files:

  • lib/devicon.ts
  • lib/devicon.test.ts
📚 Learning: 2025-12-28T22:41:43.683Z
Learnt from: CR
Repo: michellepace/devflow PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-28T22:41:43.683Z
Learning: Applies to proxy.ts : Use proxy.ts with clerkMiddleware() instead of middleware.ts for authentication

Applied to files:

  • x_docs/DONE/authentication.md
📚 Learning: 2025-12-10T20:20:54.402Z
Learnt from: michellepace
Repo: michellepace/devflow PR: 7
File: components/navigation/navbar/index.tsx:1-12
Timestamp: 2025-12-10T20:20:54.402Z
Learning: Clerk's Next.js components (SignedIn, SignedOut, SignInButton, SignUpButton, UserButton) exported from clerk/nextjs are designed to work in Server Components without requiring a "use client" directive in the consuming component, as they handle the client/server boundary internally with their own directives.

Applied to files:

  • x_docs/DONE/authentication.md
📚 Learning: 2025-12-28T22:41:43.683Z
Learnt from: CR
Repo: michellepace/devflow PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-28T22:41:43.683Z
Learning: Applies to components/auth/clerk-signin.tsx : Sign In component (components/auth/clerk-signin.tsx) should be a client component with theme-aware logo

Applied to files:

  • x_docs/DONE/authentication.md
📚 Learning: 2025-12-28T22:41:43.683Z
Learnt from: CR
Repo: michellepace/devflow PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-28T22:41:43.683Z
Learning: Applies to components/clerk-provider.tsx : ClerkProvider should be implemented in components/clerk-provider.tsx and apply shadcn theme and Inter font

Applied to files:

  • x_docs/DONE/authentication.md
📚 Learning: 2025-12-28T22:41:43.683Z
Learnt from: CR
Repo: michellepace/devflow PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-28T22:41:43.683Z
Learning: Applies to components/auth/clerk-signup.tsx : Sign Up component (components/auth/clerk-signup.tsx) should use a static logo

Applied to files:

  • x_docs/DONE/authentication.md
🧬 Code graph analysis (3)
app/(root)/page.tsx (1)
components/tag-link.tsx (1)
  • TagLink (12-37)
lib/devicon.test.ts (1)
lib/devicon.ts (1)
  • getDeviconClassName (44-68)
components/tag-link.tsx (1)
lib/devicon.ts (1)
  • getDeviconClassName (44-68)
🪛 LanguageTool
x_docs/DONE/2026-01-01-right-sidebar/handover-2.md

[uncategorized] ~39-~39: The official spelling of this programming framework is “Next.js”.
Context: ...["original", "original-wordmark"] | | nextjs | `["plain", "line", "original-wordmark...

(NODE_JS)


[uncategorized] ~54-~54: The official spelling of this programming framework is “Next.js”.
Context: ...| ["reactjs"] | reactjs → react | | nextjs | [] | (no aliases) | | android | `[]...

(NODE_JS)


[style] ~81-~81: Would you like to use the Oxford spelling “normalizes”? The spelling ‘normalises’ is also correct.
Context: ...viconClassName(name): string | null` — normalises tag name, looks up registry, selects co...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~84-~84: To form a complete sentence, be sure to include a subject.
Context: ...TagLink is currently the only consumer. Can be extracted later if icons appear else...

(MISSING_IT_THERE)


[typographical] ~108-~108: Do not use a colon (:) before a series that is introduced by a preposition (‘for’). Remove the colon or add a noun or a noun phrase after the preposition.
Context: ...n CSS loaded via CDN - [x] Icons render for: nextjs, react, javascript, tailwindcss ...

(RP_COLON)


[uncategorized] ~108-~108: The official spelling of this programming framework is “Next.js”.
Context: ... loaded via CDN - [x] Icons render for: nextjs, react, javascript, tailwindcss - [x] A...

(NODE_JS)

x_docs/textbook/url-state.md

[uncategorized] ~24-~24: Use a comma before ‘or’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...or Redux, etc.) when state changes often or you need fine-grained control over re-r...

(COMMA_COMPOUND_SENTENCE)

x_docs/DONE/authentication.md

[style] ~47-~47: Would you like to use the Oxford spelling “localization”? The spelling ‘localisation’ is also correct.
Context: ...rovider.tsx` applies global theming and localisation defaults. ### Proxy (Route Protection)...

(OXFORD_SPELLING_Z_NOT_S)


[misspelling] ~62-~62: This word is normally spelled as one.
Context: ...erk uses catch-all routes to handle its multi-step authentication flows: - `app/(auth)/si...

(EN_COMPOUNDS_MULTI_STEP)


[style] ~69-~69: Would you like to use the Oxford spelling “customizations”? The spelling ‘customisations’ is also correct.
Context: ...d <SignUp> components with appearance customisations. ### Auth Layout `app/(auth)/layout.t...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~83-~83: Would you like to use the Oxford spelling “customizes”? The spelling ‘customises’ is also correct.
Context: ... use CSS variables. The component also customises header alignment (left-aligned rather t...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~91-~91: Would you like to use the Oxford spelling “Customization”? The spelling ‘Customisation’ is also correct.
Context: ...light and dark backgrounds. --- ## UI Customisation Clerk's appearance is customised at tw...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~93-~93: Would you like to use the Oxford spelling “customized”? The spelling ‘customised’ is also correct.
Context: ...UI Customisation Clerk's appearance is customised at two levels: ### Global (ClerkProvid...

(OXFORD_SPELLING_Z_NOT_S)


[grammar] ~101-~101: An apostrophe ‘s’ denotes possession. Did you mean to use the plural form of the noun (no apostrophe)?
Context: ...Clerk styles - Font: References the app's Inter font via CSS variable - **Button ...

(NOUN_APOSTROPHE_S_VERB)


[style] ~103-~103: Would you like to use the Oxford spelling “Localization”? The spelling ‘Localisation’ is also correct.
Context: ...and gradient (--gradient-primary) - Localisation: Custom text for sign-in/sign-up titl...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~156-~156: Would you like to use the Oxford spelling “localization”? The spelling ‘localisation’ is also correct.
Context: ...rovider.tsx| Global Clerk theming and localisation | |app/(auth)/layout.tsx` | Auth page...

(OXFORD_SPELLING_Z_NOT_S)


[style] ~169-~169: Would you like to use the Oxford spelling “localization”? The spelling ‘localisation’ is also correct.
Context: ...es with authentication state. - Clerk's localisation API allows customising any text string....

(OXFORD_SPELLING_Z_NOT_S)


[style] ~169-~169: Would you like to use the Oxford spelling “customizing”? The spelling ‘customising’ is also correct.
Context: ...tate. - Clerk's localisation API allows customising any text string. The `{{provider|titlei...

(OXFORD_SPELLING_Z_NOT_S)

x_docs/DONE/2026-01-01-right-sidebar/devicon-readme.md

[style] ~261-~261: Consider a more concise word here.
Context: ...de.js and NPM. These tools are required in order to build Devicon properly.

Install Fi...

(IN_ORDER_TO_PREMIUM)


[uncategorized] ~287-~287: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...n your operating system's speed and the amount of icons.

If there are any error...

(AMOUNTOF_TO_NUMBEROF)

🔇 Additional comments (11)
x_docs/DONE/navigation.md (1)

1-265: Exemplary navigation architecture documentation.

This is comprehensive, well-structured documentation that clearly explains the navigation system across breakpoints and contexts. The visual breakdowns, component architecture, and implementation details are particularly clear. Importantly, the authentication UI placement (lines 82–91) correctly reflects the Grok-style layout pattern where the UserButton appears in the sidebar footer rather than the content top bar. The document appropriately uses British English throughout (e.g., "expiry" on line 188) and serves as clear handover material for the navigation system.

components/tag-link.tsx (4)

1-4: LGTM: Import usage follows guidelines.

All imports correctly use the @/ alias convention as specified in the coding guidelines.


24-24: LGTM: Correct Tailwind v4 CSS variable syntax.

The bg-(--tag-bg) and text-(--tag-text) syntax correctly uses parentheses for CSS variables, which is the required syntax in Tailwind v4 (a breaking change from v3's bracket syntax).


12-37: LGTM: Appropriate server component usage.

The component correctly omits the "use client" directive. Next.js Link components work in server components, and no client-side interactivity (hooks, event handlers) is present. This follows the coding guideline to only add "use client" when interactivity is needed.


12-16: Default value mismatch is intentional. The getDeviconClassName utility defaults colored to true (permissive, brand colours enabled) whilst TagLink defaults to false (monotone, opt-in). This is a deliberate design pattern: the utility provides a general-purpose default, whilst the component establishes a context-specific default for its primary use case. No action required.

components/right-sidebar/right-sidebar.tsx (1)

2-2: LGTM! Clean refactoring to centralised TagLink component.

The import path update correctly references the new shared TagLink component location, and the colored prop enables brand colours for the popular tags sidebar. The boolean attribute without an explicit value correctly evaluates to true, aligning with the component's API.

Also applies to: 62-62

lib/devicon.test.ts (1)

1-130: Excellent test coverage with proper British English usage.

The test suite comprehensively covers all critical paths of getDeviconClassName:

  • Known icons with different style preferences (plain vs original)
  • Alias resolution for common abbreviations
  • Input normalisation (case, whitespace)
  • Edge cases (unknown tags, empty strings)
  • Style fallback logic when preferred styles are unavailable
  • Coloured/uncoloured icon variants

The use of British English ("normalisation", "coloured") correctly aligns with the project's coding guidelines.

x_docs/DONE/2026-01-01-right-sidebar/devicon-readme.md (1)

1-319: Reference documentation from Devicon project.

This is archived reference documentation from the official Devicon project. The static analysis style hints (lines 261, 287) apply to the original upstream content and don't require changes, as this is third-party documentation kept for reference purposes.

lib/devicon.ts (3)

63-67: Excellent style preference logic.

The style selection correctly prioritises plainoriginalline with fallback to the first available style in the registry. This handles the varying style availability across different devicons elegantly.


1-1: LGTM: Correct usage of conventions.

The code correctly uses the @/ import alias (line 1) as per coding guidelines, and British English spelling "normalised" (line 48) throughout. Well done maintaining consistency with project standards.

Based on learnings, when referencing CSS variables in Tailwind v4, this project standardises on using the shorthand syntax with parentheses (e.g., bg-(--var)), though this utility doesn't directly interact with Tailwind.

Also applies to: 48-48


24-28: No case sensitivity bug exists in this code.

The nameMap stores lowercase keys because all names in devicon.json are already lowercase (e.g., "react", "angular", "adonisjs"). Lookups use the normalised (lowercase) input, so the code functions correctly as-is. The proposed .toLowerCase() fix is redundant since entry.name is already lowercase from the source data.

Likely an incorrect or invalid review comment.

michellepace and others added 2 commits January 2, 2026 22:48
TagLink Component:
- Add `showIcon` prop (default: false) for optional icon display
- Change default to text-only badges for cleaner appearance
- Icons render only when `showIcon` is explicitly enabled

Right Sidebar:
- Add explicit `showIcon` prop to retain icons with brand colours

Documentation:
- Update handover to reflect new prop and defaults

Simplifies default TagLink usage for contexts where icons add clutter. The right
sidebar retains rich visual treatment with `showIcon colored`, while question
cards use minimal text-only badges.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Mock Data:
- Add 5 new tags (typescript, css, tailwind, nodejs, html)
- Sort tags by question count descending

Test:
- Add assertion to verify tags return in descending order by question count

New tags ensure devicon icons display for common programming topics. The sort
order test documents the expected behaviour and will catch data ordering issues
when migrating to a database.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@michellepace michellepace merged commit eec8e21 into main Jan 2, 2026
6 of 7 checks passed
@michellepace michellepace deleted the feat/devicon-tags branch January 2, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant