Skip to content

refactor(many): extract raw svgs for cross-package use#2543

Open
HouseOfHawks wants to merge 1 commit into
masterfrom
TASTY-1731
Open

refactor(many): extract raw svgs for cross-package use#2543
HouseOfHawks wants to merge 1 commit into
masterfrom
TASTY-1731

Conversation

@HouseOfHawks
Copy link
Copy Markdown
Collaborator

@HouseOfHawks HouseOfHawks commented May 6, 2026

This PR:

  • Extracts raw SVGs into a separate ui-icons-svg package, free of framework dependencies, for use in other icon-generating packages,
  • adds a new bucket in ui-icons-svg/svg/Parchment for all Graphics, Icons and Vectors used in Parchment, Digitary, Scribbles and Quottly applications,
  • maintains backwards compatibility for Lucide/React icons in ui-icons while making new Parchment icons available in this React package (both legacy and beta), and
  • updates the __docs__ app so that consumers can now filter icons by organization type and asset type when viewing Parchment assets (demo below)

Tech-Spec Outlining the Justification For This Work

Demo:

Screen.Recording.2026-05-06.at.8.46.53.AM.mov

Next iterations (ongoing work):

Currently there is significant asset overlap. Design teams will need to work through both asset libraries and unify that overlap (ie, InstUI's x.svg and Parchment's close.svg). Parchment application developers will need access to this full set of assets initially as teams begin implementing InstUI, but as re-design work becomes available those teams will be pointed to the InstUI icons where applicable. In other cases where assets are Parchment-specific or there is no InstUI counterpart, those Parchment assets will remain.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 6, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

PR Preview Action v1.8.1

QR code for preview link

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

Built to branch gh-pages at 2026-05-20 13:55 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@matyasf matyasf self-assigned this May 6, 2026
@HouseOfHawks HouseOfHawks force-pushed the TASTY-1731 branch 3 times, most recently from 68f4ad5 to c66c76d Compare May 11, 2026 12:50
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 11, 2026

Visual regression report

No changes.

Status Count
Unchanged 32
Changed 0
New 0
Removed 0

📊 View full report

Baselines come from the visual-baselines branch. They refresh on every merge to master.

@matyasf
Copy link
Copy Markdown
Collaborator

matyasf commented May 14, 2026

Can you please add a postfix to the new icons? e.g. AccessibilityParchment

github-actions Bot pushed a commit that referenced this pull request May 15, 2026
@HouseOfHawks HouseOfHawks marked this pull request as ready for review May 15, 2026 14:04
@HouseOfHawks HouseOfHawks self-assigned this May 15, 2026
Copy link
Copy Markdown
Collaborator

@matyasf matyasf left a comment

Choose a reason for hiding this comment

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

see my comments

* SOFTWARE.
*/

import { useState, memo, useCallback, useMemo, useRef } from 'react'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As we have discussed, isnt this a bad place for Parchment icons? Parchment devs will look for InstUI components in Storybook, and not visit this site? Also it might be confusing to them, why are we here showing only React icons, why not Angular/WebComponents/Svelte/...?

And its confusing for Instructure users too, why show here icons, that they will never use? I would not place Parchment icons into the Instructure-side InstUI documentation

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Instructure devs will be coming here to look for icons in their Figma designs, which may include Parchment vectors/graphics.

We will point Parchment devs to the upcoming Storybook, which will show the new Instructure icons (new to them) as well as the pre-existing vectors and graphics made available from Parchment - and temporarily have some icon overlap until we dedupe/prune the list to one that is unified.

Remember, the vectors/graphics are product branded and likely to be used in Instructure apps as we integrate our products more - something we are already doing with two Instructure teams.

Since this page is only for Instructure devs, we are only showing React icons. If you recall, the expectation is not to build Angular/WebComponents/Svelte for the Instructure stakeholders as that's not a technical requirement there. That will be handled for Parchment stakeholders only and it will live in the upcoming Storybook page where we will direct Parchment stakeholders.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hmm OK, I guess its also a better DX because we dont hide some icons, that are accessible via imports.

Comment on lines +36 to +38
export * from './generated/parchment/icons'
export * from './generated/parchment/graphics'
export * from './generated/parchment/vectors'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please suffix all icons, so its easily distinguishable on the code side what kind of icons are these e.g. AddDocumentLineParchment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

On vectors/graphics, too? We had discussed adding the suffix on the icons, since there's overlap, but there's no overlap in vectors/graphics.

We can make this adjustment - I only hesitate because this makes some of these names very long and I'm just being empathetic to the dev experience.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hmm I understand. In this case I would still add some prefix/suffix to these too, now the ui-icons package exports 2000+ graphics, which is super hard to navigate:

  • *InstUIIcon -- new InstUI icons (1900+)
  • *ParchIcon -- Parchment icons
  • [no logic] -- Parchment graphics (100+)
  • [no logic] -- Parchment vectors (50+)
  • Icon* -- Legacy, deprecated InstUI icons (must have this name for backwards compat, will be deleted in the future)

I think a prefix or a suffix would help all devs to navigate this huge number of exports.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thinking through the DX - maybe pivoting on the plan by adding a prefix is a better experience; and also safer via import. When an app dev is intentionally looking for a Parchment Icon and is typing the import, starting with Parch..., it's a very clear direction to Parchment icons/vectors/graphics and most (if not all) InstUIIcons get filtered - save potential edge cases. In the other direction as an Instructure dev is importing the <AccessibilityInstUIIcon>and has typed Acc..., all Parchment icons/vectors/graphics are filtered in the IDE auto-pop.

Copy link
Copy Markdown
Collaborator Author

@HouseOfHawks HouseOfHawks May 19, 2026

Choose a reason for hiding this comment

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

Looks like I need the semantics deep merge fix - rebased on pushed anyways, but build is expected to fail until we have #2561

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Odd that the build didn't fail. 🤷

extracted raw svgs into a new ui-icons-svg package and added as a dependency

in ui-icons

feat(ui-scripts,ui-icons,ui-icons-svg): added parchment assets

added parchment icons, vectors and graphics
retooled script bundling to support parchment asset categories
extended demo app to conditionally render all icons by org
extended demo app to conditionally render parchment icons by type

refactor(ui-icons-svg): icons cleanup

cleaned up now unused directory

refactor(ui-scripts): typescript fix

fix(github actions): pin chromaui/action to v11

ci(github actions): removed debugging change

refactor(ui-scripts): rebase and add suffix

Handled a complex rebase and added a ParchIcon suffix to Parchment Icons

refactor(ui-scripts): pivot to prefix

parchment icons will now prefix icons - no longer used as a suffix
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.

3 participants