Skip to content

Conversation

@barna-isaac
Copy link
Contributor

Besides applying #1396, which introduces the test/view page, contains the following changes

  • QuizSidebar now shows the subject and topics
  • QuizFooter now consistently ends at QuizSidebar across the attempt and preview pages

On this page, users will be able to view a test's short description
(rubric). We have two similar pages, but
- `/preview` is only available to teachers
- `/attempt` commits the user to completing the test
This could affect the `/view` and `/attempt` pages as well, but I think
each quiz has at least one section. Even if there were tests without
sections, it'd make no sense to show a header and then not list any
sections. The `QuizView` component always passes an empty array for
sections, so the outcome is that sections are hidden from that component
only.
- remove "Click button when you are ready" message
- "Start" button should always just say continue. It was misleading that
  this ever said "Start", because by the time the user saw this page,
  the test has already been added to "My Practice Tests"
What used to be two buttons is now just one. From "View Test", teachers
can decide whether to take or preview the test. Students only ever had
the opportunity to take a test.
this ensures there's a margin between the "You are viewing..." text and
the "Instructions" heading. Without it, the margin is enforced by the
"Set Test" button, which we only show for teachers. The margin was
missing for students.
none if these components are memoized, so it doesn't matter that we pass
a different function each time
I'm hoping, in the future, we can extract similar helpers from other
tests as well.
Previusly, the footer separator line span into the sidebar on `view` and
`preview`, but not on `attempt`. Now it ends at the sidebar on all
three.
@barna-isaac barna-isaac changed the title Feature/quiz view redesign Create /test/view pages on redesign Apr 14, 2025
@codecov
Copy link

codecov bot commented Apr 14, 2025

Codecov Report

Attention: Patch coverage is 80.59072% with 46 lines in your changes missing coverage. Please review.

Project coverage is 40.91%. Comparing base (04b1291) to head (da27908).
Report is 77 commits behind head on redesign-2024.

Files with missing lines Patch % Lines
src/test/testUtils.tsx 63.15% 14 Missing ⚠️
...c/app/components/pages/quizzes/PracticeQuizzes.tsx 0.00% 11 Missing ⚠️
src/test/helpers/quiz.ts 68.75% 10 Missing ⚠️
...c/app/components/elements/layout/SidebarLayout.tsx 79.16% 5 Missing ⚠️
...components/elements/quiz/QuizContentsComponent.tsx 94.33% 3 Missing ⚠️
...p/components/pages/quizzes/QuizAttemptFeedback.tsx 50.00% 1 Missing ⚠️
.../app/components/pages/quizzes/QuizDoAssignment.tsx 50.00% 1 Missing ⚠️
src/app/services/tagsPhy.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##           redesign-2024    #1400      +/-   ##
=================================================
+ Coverage          38.94%   40.91%   +1.97%     
=================================================
  Files                486      491       +5     
  Lines              21687    21839     +152     
  Branches            6430     6457      +27     
=================================================
+ Hits                8445     8935     +490     
+ Misses             13202    12866     -336     
+ Partials              40       38       -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.

@jacbn jacbn mentioned this pull request Apr 15, 2025
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.

Also see #1396; there are a couple of redesign points there.

, because `DetailedQuizSummaryDTO` is an actual type that exists on the
API, whereas `IsaacRubricDTO` was a type I just made up. This became a
larger refactor because DetailedQuizSummaryDTO highlighted a lot of type
incompatibilites that I didn't encounter using `IsaacRubricDTO`.
API only specifies that `ContentDTO['children']` be `ContentBaseDTO`,
so I chose not to assume more (following a code review comment about
this by Jaycie). The specific test objects are narrower (they  have more
properties than specified by these types). I've introduced a new
`recordOf` function that I use here to assert that the mocks at least
implement the interface. I chose this over introducing new narrower
types specifically for just the test fixtures.
it's now also used for `QuizView`
`QuizDetails` is only ever shown for attempts, which always have
sections.
Fixed a bug where, after a student took a quiz, the feedback sites would
lose subject-specific theming. Also, across `Quiz` components, cleaned
up leftover classes from before the redesign.
@barna-isaac
Copy link
Contributor Author

barna-isaac commented Apr 16, 2025

Some suggestions I challenged, but most of them I addressed! Please have a look again, and let me know if I should maybe join -- using the correct types meant I needed to adjust QuizAttemptComponent quite a bit. Again, please also tell me if you think there's a way for this to be easier.

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.

Looks good!

@jacbn jacbn merged commit d251561 into redesign-2024 Apr 17, 2025
8 checks passed
@jacbn jacbn deleted the feature/quiz-view-redesign branch April 17, 2025 14:51
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