Repository navigation
Description
Context
In the schema, categories, permissions, roles, and role extensions all have an optional icon field. Today that field must be a Paragon icon name. Validation checks it against a copy of Paragon's icon list stored in this repo (ADR 0017 §4, ADR 0029). Keeping that list current is what #528 / #537 set out to automate.
The discussion on #537 (@arbrandes) raised two problems:
- The backend is coupled to a frontend presentation library.
- No single repo decides which Paragon version a site uses. Paragon is a peer dependency in frontend-base, and each operator's site picks the version. Syncing against
frontend-app-admin-consoletherefore doesn't give a reliable answer.
Proposal
Define a fixed, documented set of icon identifiers that this repo owns and that don't depend on Paragon. The admin console maps each identifier to whatever icon it renders.
openedx-authz
- Define the allowed icon identifiers as a constant. The identifiers don't need to match Paragon names.
- Validate
iconvalues against that set. Remove the copied Paragon list, the generator script, and theparagon_icons/paragon_icons_checkmake targets. - Document the icon set as part of the extension API, since extension authors will use it.
- Write a new ADR that supersedes ADR 0029 and amends ADR 0017 §4. Add an addendum to each older ADR that links to the new one.
- Update the built-in schema files to use the new identifiers.
frontend-app-admin-console (could be a separate linked issue)
- Map each identifier to an icon component.
- If an identifier has no mapping, or the icon it maps to doesn't exist, render a default icon.
- Document the mapping in the README as a public API.
- Add unit tests that fail if a mapped Paragon icon is renamed or removed.
Initial icon set
Implement the full list María de los Ángeles proposed in the icon proposal sheet. That includes both the Essential and the Recommended icons.
Open questions
- What naming convention should identifiers use (for example
arrow_backorArrowBack)? - Should unknown icon values fail backend schema validation, or only produce a warning?
Acceptance criteria
- Schema validation no longer depends on Paragon.
- Every icon in the proposal sheet is in the icon set.
- The icon set is documented, and the new ADR has been merged.
- The built-in schemas pass validation with the new identifiers.
- The admin console renders every identifier, falls back to a default icon for unknown ones, and has tests for the mapping.
Supersedes
- Scheduled job to update Paragon icons list for validation #528 and feat: add scheduled workflow to sync Paragon icon allow-list #537. Close both once this issue is accepted.
Refs: #537 (discussion), ADR 0017, ADR 0029
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn Review
Activity
feat!: replace Paragon icon names with an Open edX AuthZ icon set