Skip to content

refactor: add missing IconClass type to icon props#2462

Open
C1ANCYSz wants to merge 6 commits intonpmx-dev:mainfrom
C1ANCYSz:main
Open

refactor: add missing IconClass type to icon props#2462
C1ANCYSz wants to merge 6 commits intonpmx-dev:mainfrom
C1ANCYSz:main

Conversation

@C1ANCYSz
Copy link
Copy Markdown

@C1ANCYSz C1ANCYSz commented Apr 10, 2026

🔗 Linked issue

Partially resolves #1256

🧭 Context

The codebase already had an IconClass type defined in ~/types/icon
for Iconify icon class strings (e.g. i-lucide:home). However, some
component props that accept icon classes were still typed as plain string,
missing out on type safety.

📚 Description

Applied the existing IconClass type to props that accept Iconify icon
class strings in two components:

  • app/components/CollapsibleSection.vue: icon?: stringicon?: IconClass
  • Diff/SidebarPanel.vue: icon: stringicon: IconClass inside
    the sectionMeta computed record

Full resolution of #1256 would require a dedicated icon component that
enforces IconClass usage across the whole codebase, as noted by maintainers.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev (canary) Ready Ready Preview, Comment Apr 10, 2026 9:50pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Apr 10, 2026 9:50pm
npmx-lunaria Ignored Ignored Apr 10, 2026 9:50pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: efc4ef04-33cb-41c9-92bf-08b46434329d

📥 Commits

Reviewing files that changed from the base of the PR and between 64c2017 and 6b5ec24.

📒 Files selected for processing (2)
  • app/components/CollapsibleSection.vue
  • app/components/Diff/SidebarPanel.vue
✅ Files skipped from review due to trivial changes (2)
  • app/components/CollapsibleSection.vue
  • app/components/Diff/SidebarPanel.vue

📝 Walkthrough

Walkthrough

This pull request tightens TypeScript typings for icon properties in two Vue components: app/components/CollapsibleSection.vue now types its public icon prop as IconClass (imported from ~/types/icon) instead of string, and app/components/Diff/SidebarPanel.vue updates the sectionMeta computed type so each section’s icon is IconClass. No runtime logic, rendering, or control flow was changed.

Possibly related PRs

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The PR partially addresses issue #1256 by applying existing IconClass type to props, but does not implement the suggested template-literal type pattern. Clarify whether the existing IconClass type matches the template-literal approach suggested in #1256, or if further refinement is needed to fully satisfy the typing requirements.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description accurately relates to the changeset, explaining the context of adding IconClass type to icon props in two components.
Out of Scope Changes check ✅ Passed All changes are directly scoped to updating icon prop types in two components as described in the PR objectives and linked issue.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@ghostdevv ghostdevv left a comment

Choose a reason for hiding this comment

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

Good catch! The import path just needs updating - also in future could you create a branch to PR from instead of using your main branch, as it makes it easier for us 🙏

@ghostdevv ghostdevv changed the title feat: add IconClass typing to icon props refactor: add missing IconClass type to icon props Apr 10, 2026
C1ANCYSz and others added 2 commits April 10, 2026 23:24
Co-authored-by: Willow (GHOST) <ghostdevbusiness@gmail.com>
Co-authored-by: Willow (GHOST) <ghostdevbusiness@gmail.com>
@C1ANCYSz
Copy link
Copy Markdown
Author

Thanks
Noted on the branch, will follow that going forward.

@C1ANCYSz C1ANCYSz requested a review from ghostdevv April 10, 2026 21:43
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.

Add proper typing for iconify icon classes

2 participants