Feature/ppi f03 ppi widget states - #504
Open
David-Tenni wants to merge 1480 commits into
Open
Conversation
…pm_and_yarn/postcss-8.5.16 chore(deps-dev): bump postcss from 8.5.15 to 8.5.16
…pm_and_yarn/tailwindcss/postcss-4.3.2 chore(deps): bump @tailwindcss/postcss from 4.3.1 to 4.3.2
…pm_and_yarn/typescript-eslint/parser-8.62.1 chore(deps-dev): bump @typescript-eslint/parser from 8.62.0 to 8.62.1
fix: persist portfolio filters in url
feat: task list filters and sorting
…tes to PPI widget
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.
Description
Adds safe loading, hidden, unavailable, disabled, stale and error states to the peer progress indicator widget that renders inside the task description card. Built on top of Gurwinder's PPI data contract PR (#5,
feature/ppi-data-contract) — this PR is what consumes that data contract for the first time in the UI.The new
f-ppi-widgetcomponent takes aTaskandTaskDefinition, callsPeerProgressIndicatorService.getIndicator(), and routes the response through a pureresolvePeerProgressState()function into one of the eight UI states (loading / success / no-data / hidden / unavailable / disabled / stale / error). Plain-language messages for the "safe" states come from the API'sunavailableMessagefield so the widget never leaks why another student's data is hidden. Stale peer values never appear after an error, new request, or task switch — the state resolver only reads response data when the request is not loading and has no error, and the widget cancels in-flight requests before starting new ones.Fixes PPI-F03.
Type of change
How Has This Been Tested?
PpiWidgetComponent, 10 onresolvePeerProgressState) covering every state, loading→success and loading→error transitions, and cancellation of in-flight requests when the task changes.docker compose exec doubtfire-web npx ng test --watch=false→ 21/21 of my tests pass, no regressions in other spec files.localhost:4200by hard-coding each mock state in the widget'sload()method ('normal'/'zero'/'suppressed'/'unavailable'/'stale'/'disabled') and screenshotting each — see below.To reproduce locally: log in as
student_1/password, open any task in COS10001, and observe the widget beneath the task description. To preview each state, change the 4th argument of.getIndicator(...)inppi-widget.component.tsto one of the six mock keys.Testing Checklist:
Checklist:
Blocker / next-step notes
@vitest/browser-playwright, which isn't inpackage.jsonon the base branch. I installed it locally to get tests running but deliberately left thepackage.json/package-lock.jsonchanges out of this PR since it's a dev-env issue and not part of PPI-F03. Flagging separately to Maple. Reviewers running tests locally will neednpm install --save-dev @vitest/browser-playwrightin the web container first.PeerProgressIndicatorService.getIndicator()is hardcoded to'normal'— this is how PR migrate: bootstrap rating #5's mock service picks which state to return. This argument goes away entirely once a real backend replaces the mock.