Skip to content

Conversation

@sjd210
Copy link
Contributor

@sjd210 sjd210 commented Nov 3, 2025

ContentSummaryListGroupItems are a legacy way of dealing with a list of objects (e.g. on the question finder or search page). We have replaced this with the more robust and type-smart AbstractListViewItem during the Isaac Science redesign, but until now Ada CS was still using this old component.

ALVIs are built in a modular(ish) way so this was relatively straightforward to convert, with the following points of significance:

  • Added new TopicListViewItem for topics in Ada search
  • Added hasCaret as a top-level ListView prop, allowing for a right-caret/chevron to be displayed to the right of each item in the list, used in Ada search and assignments
  • Also replaces the legacy GameboardViewer component for similar reasons; it was causing issues such as not displaying the LLM-marked question indicator. This has been replaced everywhere on Ada, and specifically the Assignment Schedule question deck preview on Isaac (which I think was just accidentally missed during redesign)

Overall the lists should look nearly identical to before, with exceptions such as including the aforementioned LLM-marked question indicator on Ada quizzes and some minor layout changes at smaller screenwidths (which I think are for the better). If you see anything else in review let me know.

@sjd210 sjd210 marked this pull request as ready for review November 4, 2025 14:11
@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

❌ Patch coverage is 45.67901% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.75%. Comparing base (99a861b) to head (533c47b).
⚠️ Report is 34 commits behind head on main.

Files with missing lines Patch % Lines
...c/app/components/elements/list-groups/ListView.tsx 42.50% 23 Missing ⚠️
...c/app/components/elements/layout/SidebarLayout.tsx 0.00% 8 Missing ⚠️
src/app/components/pages/AssignmentSchedule.tsx 25.00% 6 Missing ⚠️
src/app/components/pages/Search.tsx 0.00% 2 Missing ⚠️
...mponents/elements/LLMFreeTextQuestionIndicator.tsx 0.00% 1 Missing ⚠️
src/app/components/elements/PageTitle.tsx 0.00% 1 Missing ⚠️
...ents/elements/list-groups/AbstractListViewItem.tsx 90.90% 1 Missing ⚠️
src/app/components/pages/Concepts.tsx 0.00% 1 Missing ⚠️
src/app/components/pages/QuestionFinder.tsx 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1814      +/-   ##
==========================================
+ Coverage   41.56%   41.75%   +0.19%     
==========================================
  Files         543      543              
  Lines       23784    23689      -95     
  Branches     7863     7849      -14     
==========================================
+ Hits         9885     9891       +6     
+ Misses      13256    13157      -99     
+ Partials      643      641       -2     

☔ 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.

Copy link
Contributor

@jacbn jacbn left a comment

Choose a reason for hiding this comment

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

Couple of things to fix, but overall this is such a nice piece of debt to get off our backs! Thanks for picking this one up.


const icon: TitleIconProps = isPhy
? {type: "hex", icon: "icon-question", size: "lg"}
: item.state === CompletionState.IN_PROGRESS
Copy link
Contributor

Choose a reason for hiding this comment

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

We're missing ALL_ATTEMPTED in this ternary, so it's showing up as not started. We could reuse the in progress one:

Suggested change
: item.state === CompletionState.IN_PROGRESS
: [CompletionState.IN_PROGRESS, CompletionState.ALL_ATTEMPTED].includes(item.state as CompletionState)

but it does annoy me that we don't have a function to perform consistent generation of status symbols somewhere. We have similar logic here (different output unfortunately), but that's for physics.

I think the output of this mystical function ought to be:

question status (CompletionState) sci symbol ada symbol
ALL_CORRECT status-correct status-correct
ALL_ATTEMPTED status-attempted status-in-progress
ALL_INCORRECT status-attempted status-incorrect
IN_PROGRESS status-in-progress status-in-progress
NOT_ATTEMPTED status-not-attempted status-not-attempted

But note that for question parts, sci uses INCORRECT => status-incorrect:

part status (QuestionPartState) sci symbol ada symbol (currently unused)
CORRECT status-correct status-correct
INCORRECT status-incorrect status-incorrect
NOT_ATTEMPTED status-not-attempted status-not-attempted

I'm not suggesting we do this now (unless you're keen!) as the first suggestion will work fine. But it is something to pre-prep if not, at least.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder, coming back to what this function might output, if we could supersede type: hex in TitleIconProps with type: icon or similar, which does precisely what hex does but doesn't create the background hex on Ada (or indeed just have 'show hex' be a prop we enable for Sci), and we can use size: "md" for the 24px sizing. That way, all things that use it create a TitleIconProps.

Copy link
Contributor Author

@sjd210 sjd210 Nov 7, 2025

Choose a reason for hiding this comment

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

I've made a start on this (which I've moved to another branch), but there are some complications like Ada not using consistent square icon sizes (see cs/icons/concept with 26x35px for example) which means we can't quite do sizes in the same way without either changing these icon sizes or the surrounding code. It's still doable, just out of scope of this PR - I'll make that card.

Arguably the generic question icon should also be 32px here, but this makes it too big in other places like the QF. This can be reconsidered in the upcoming icon refactor PR, but for now this is consistent with live.
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.

4 participants