Repository navigation
Description
Description
openedx-authz is replacing Paragon icon names with its own fixed set of icon identifiers (#651, implemented in #669). The icon field of categories, permissions and roles in the role catalog API will hold identifiers such as remove_red_eye or library_books instead of Paragon names such as RemoveRedEye. Today the admin console treats that value as a Paragon icon name, so once the backend change ships, every catalog icon stops rendering. This issue is the frontend side of #651: the admin console owns the mapping from each identifier to the icon it renders.
Current Behavior
CatalogIcon (src/authz-module/catalog/CatalogIcon.tsx) takes the catalog icon value as a Paragon icon name and lazily imports @openedx/paragon/icons/es5/${name}.js. When the name is unknown or doesn't match /^[A-Za-z0-9]+$/, it renders an empty placeholder. snake_case identifiers such as remove_red_eye fail that pattern, so they render nothing. The console doesn't decide which icons a value can resolve to: any Paragon icon name works, and a renamed or removed Paragon icon fails silently.
Expected Behavior
The console maps each identifier of the Open edX AuthZ icon set to a Paragon icon component. CatalogIcon renders the mapped icon for known identifiers and a default icon for any identifier that has no mapping or whose mapped icon can't be loaded. When the catalog sends null, it still renders nothing. The mapping is documented as a public API, so extension authors know how each identifier looks in the console.
Acceptance Criteria
- Every identifier in the backend icon set (
AUTHZ_ICONSinopenedx_authz/constants/icons.py, documented indocs/references/icons.rst) maps to a Paragon icon. -
CatalogIconrenders the mapped icon for a known identifier, such asremove_red_eye. -
CatalogIconrenders a default icon for an unknown identifier, and for an identifier whose mapped icon can't be loaded. -
CatalogIconstill renders nothing wheniconisnull. - Paragon names such as
RemoveRedEyeare no longer accepted as icon values. - A unit test fails if a mapped Paragon icon is renamed or removed.
- The test fixtures in
src/authz-module/catalog/testUtils.tsuse the new identifiers (for examplebook_openinstead ofBookOpen). - The README documents the mapping as a public API: each identifier, the icon it renders, and the default icon.
- The permission views that use
CatalogIcon(PermissionTable,RenderPermissionColumn,RenderPermissionInline) show icons for the built-in roles with the new backend schema loaded.
Dependencies
- Frontend counterpart of Replace Paragon icon names with an Open edX AuthZ icon set #651.
- Requires feat!: replace Paragon icon names with an Open edX AuthZ icon set #669, which changes the values the role catalog API returns. Both should ship in the same release (Willow) so icons don't break between them.
Technical Notes
- The identifier set has 154 values. They use
snake_caseand drop Paragon'sIconsuffix (RemoveRedEye→remove_red_eye,MenuIcon→menu). The backend list is the source of truth: the mapping should not add identifiers the backend rejects. CatalogIconloads each icon lazily to keep the bundle small. The mapping can keep that by mapping identifiers to Paragon file names, or it can import the icons statically. Measure the bundle size impact before choosing static imports.- The icon set is a public API of openedx-authz. Adding an identifier there needs a matching entry here, otherwise the console shows the default icon for it.
Notes or Additional Context
- Which Paragon icon to use as the default is not decided yet.
- Icon proposal sheet (Essential and Recommended icons).
- Background: feat: add scheduled workflow to sync Paragon icon allow-list #537 (discussion), openedx-authz ADR 0039 (supersedes ADR 0029, amends ADR 0017 §4).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady for Development
Activity