Repository navigation
Show the exam centre validity pill in the pin popup - #326
Merged
AnayDhawan merged 1 commit intoOct 30, 2026
Merged
Conversation
Contributor
|
@propcgamer20-png is attempting to deploy a commit to the studentsuite Team on Vercel. A member of the Team first needs to authorize it. |
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.
What this changes
Part of #313, one item from its checklist:
ExamCentreCountdown(src/components/pins/exam-centre-countdown.tsx) was written but not used anywhere. This renders it in the pin popup, next toVerifiedBadge, as the issue suggests. The other items are untouched, so this does not use "Fixes".src/components/pins/pin-popup.tsx: the header row now includes<ExamCentreCountdown place={place} />. It renders nothing for places withoutvalid_till, so only SAT and foreign-language exam centres get a pill. The "reconfirm by " text in the exam note below the address is removed, because the pill now carries the same date, and the unused localformatValidTillis deleted with it.src/components/pins/exam-centre-countdown.tsx: new optionalnowprop (defaults to the current time), the same patternVerifiedBadgeuses, so the date logic can be tested.src/components/pins/exam-centre-countdown.test.tsx(new): 7 tests. Far-off date is green "Valid until ...", inside 60 days is amber "Expires soon", the day after the reference date still counts, a past date is red "Expired ...", novalid_tillrenders nothing, and the popup shows the pill (and no longer the "reconfirm by" text) for an exam centre but no pill for a library.Note for review
The pill says "Valid until " while the data field and the old popup text call the date a "reconfirm by" date (
data/CONTRIBUTING.md). I kept the component's own wording rather than change its design; if "Reconfirm by" reads better for students, that is a one-word change in the component.Proof
npm run lint,npm run typecheck,npm run format:checkclean.npm run test:unitfor the pins folder: 11 passed. I did not look at it in a browser.Type of change