Skip to content

Adding custom/brand icons#2410

Open
joyenjoyer wants to merge 1 commit intov12from
INSTUI-4892-tidy-up-the-icons-gallery
Open

Adding custom/brand icons#2410
joyenjoyer wants to merge 1 commit intov12from
INSTUI-4892-tidy-up-the-icons-gallery

Conversation

@joyenjoyer
Copy link
Contributor

No description provided.

@joyenjoyer joyenjoyer self-assigned this Feb 18, 2026
@joyenjoyer joyenjoyer changed the base branch from master to v12 February 18, 2026 10:19
@joyenjoyer joyenjoyer force-pushed the INSTUI-4892-tidy-up-the-icons-gallery branch from 69c5e5e to 84fae89 Compare February 18, 2026 10:27
@joyenjoyer joyenjoyer force-pushed the INSTUI-4892-tidy-up-the-icons-gallery branch from 84fae89 to feb4960 Compare February 18, 2026 10:36
@github-actions
Copy link

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://instructure.design/pr-preview/pr-2410/

Built to branch gh-pages at 2026-02-18 10:40 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Contributor

@balzss balzss left a comment

Choose a reason for hiding this comment

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

skimmed through the PR and mostly left questions, not change requests since i'm not familiar with the first iteration at all

i'm not really sure about the name "stroke" for the new icon variants, since it's a small technical detail about them, not really important for neither us and especially not for the end user. i think a more semantic differentiation could be better but that's just my 2 cents

as someone who is not familiar with how the icons are generated, from where and why, the structure feels very complicated to me and i'm not really looking forward to maintain this in the future. i think it would really benefit us in the long run to come up with something that's easier to wrap our heads around

also with the old icons we also provided the raw svg values along with the react components (in the docs page). are those not needed anymore? I'm not against it, just asking if that is intentional

i also don't see the colored ai icon in the new custom icons, was that intentional too? don't we have components depending on that?

InstUI has switched to a new icon set based on [Lucide](https://lucide.dev/icons/). We are still keeping some Instructure-specific icons, like product logos. We have a codemod that will help you migrate your code to the new icon set (see below).

### Lucide Icons Package
### Stroke-Based Icons Package
Copy link
Contributor

Choose a reason for hiding this comment

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

where is this name coming from? did design come up with it? it's a bit confusing for me what it means (and how this is different from other icons. others are store based too, no?)

const __dirname = path.dirname(__filename)
const require = createRequire(import.meta.url)

// Use CommonJS require to load ui-themes to avoid ES module resolution issues
Copy link
Contributor

Choose a reason for hiding this comment

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

is this a new issue? or was it not working before?

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason this is in a separate dir and not under Icons?

* Stroke width is automatically derived from size for consistent visual weight.
* Numeric and custom CSS values are not supported.
*/
export function wrapStrokeIcon(
Copy link
Contributor

Choose a reason for hiding this comment

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

wouldn't wrapLucideIcon actually be an appropriate name here? since this is actually for wrapping just the lucide library icons

Copy link
Contributor

Choose a reason for hiding this comment

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

is this a build file? seems like it has the same svg data as svg/Custom/.... or what's the difference?

// Re-export all generated SVG icons and Lucide icons
// Main entry point - exports all icons for backwards compatibility
export * from './lucide'
export * from './custom'
Copy link
Contributor

Choose a reason for hiding this comment

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

could this (in theory) cause a naming conflict if a custom icon has a same name as a lucide icon? is that even a problem?

Copy link
Contributor

Choose a reason for hiding this comment

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

isn't this the canvas logo?

const MyIcon = () => {
return (
<${iconName} size={'2xl'} color='successColor'/>
<${icon.name} size={'2xl'} color='successColor' />
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: double quotes and string primitive would be nicer here


function getUsageInfo(iconName: string) {
return `import { ${iconName} } from '@instructure/ui-icons'
// Get all stroke icons
Copy link
Contributor

Choose a reason for hiding this comment

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

this section is a bit overcomplicated. you are getting the keys of each icon type to convert an object list to a string array and then you are converting it back to an object while accessing each item in the original list again. this is resource heavy and with lots of icons could cause perf issue.

...strokeIconNames.map((name) => ({
name,
component: (StrokeIcons as any)[name],
source: 'stroke' as const,
Copy link
Contributor

Choose a reason for hiding this comment

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

why as const?

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.

2 participants