Create /test/view pages on redesign#1400
Merged
jacbn merged 36 commits intoredesign-2024from Apr 17, 2025
Merged
Conversation
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.
/test/view pages on redesign
Codecov ReportAttention: Patch coverage is
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. 🚀 New features to boost your workflow:
|
, 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.
Contributor
Author
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Besides applying #1396, which introduces the
test/viewpage, contains the following changesQuizSidebarnow shows thesubjectandtopicsQuizFooternow consistently ends atQuizSidebaracross theattemptandpreviewpages