Skip to content

Conversation

@sjd210
Copy link
Contributor

@sjd210 sjd210 commented Nov 11, 2025

Standardises how most Ada icon SVGs are stored (other than ones for e.g. inequality and callouts), and refactors how these are presented to work in the same way as has been created for Isaac during the redesign (although not requiring any layering).


Firstly, for the SVGs themselves this has meant removing duplicate SVGs with the same icon but different colours. These are now black by default, and the colouring is handled on a per-icon basis in CSS instead (e.g. setting "icon-color-secondary" for cyan in most IconCards).

These SVGs are also all square in dimensions with the icon taking up as much space as possible given that constraint (i.e. pressing against the left/right or top/bottom sides depending on the size of the icon itself). They previously had inconsistent spacing that made it hard to align icons in the same way except by adding margin in the css manually, which also limited the maximum size usable without adding negative margins. This change allows for icon size to be set and lead to a predictable outcome (e.g. setting "icon-md" for a 24x24px icon will lead to the same visual size of icon as any other put into the same position).


On the code side, this aims to reconcile some of the different ways we show icons to one standard form. There are still some exceptions where an icon is explicitly only used once and so can be linked directly (these exist for both Isaac and Ada), but generally most icons aim to be reusable.

For this reconciliation, this introduces an IconProps interface used across HexIcon (and by extension PageTitle), IconCard, and PromptBanner, as well as allowing string input for simple cases and backwards-compatibility. These props arrange into a structure like:

 <i className="icon icon-$SIZE (icon-raw)? $ICON-NAME" color={$COLOR}/>

specialised to each use-place such as using a different default size or colour, and applying the $SIZE to the hex background. Most of this isn't new, but IconProps lets it be used in different (Ada-specific for now) places rather than write the whole structure manually as is done for one-off icon uses.


In all this changes a lot of things very slightly (183 files changed 😱), including various icon sizes. I think these are for the better in terms of simplifying code and standardising presentation, but it's quite far-reaching so should be reviewed carefully. Any feedback appreciated.

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 52.63158% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.70%. Comparing base (e651524) to head (554d064).

Files with missing lines Patch % Lines
...c/app/components/elements/list-groups/ListView.tsx 23.52% 12 Missing and 1 partial ⚠️
...ments/LLMFreeTextQuestionRemainingAttemptsView.tsx 0.00% 2 Missing ⚠️
src/app/components/elements/PageTitle.tsx 33.33% 2 Missing ⚠️
src/app/components/elements/cards/PromptBanner.tsx 0.00% 2 Missing ⚠️
.../components/elements/panels/TeacherConnections.tsx 50.00% 2 Missing ⚠️
...nents/navigation/LLMFreeTextQuestionInfoBanner.tsx 0.00% 1 Missing ⚠️
.../components/pages/AssignmentProgressIndividual.tsx 0.00% 1 Missing ⚠️
src/app/components/pages/Gameboard.tsx 0.00% 1 Missing ⚠️
src/app/components/pages/Glossary.tsx 0.00% 1 Missing ⚠️
src/app/components/pages/StudentChallenges.tsx 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #1825    +/-   ##
========================================
  Coverage   41.69%   41.70%            
========================================
  Files         542      542            
  Lines       23683    23690     +7     
  Branches     7875     7003   -872     
========================================
+ Hits         9874     9879     +5     
- Misses      13168    13765   +597     
+ Partials      641       46   -595     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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