Repository navigation
refactor(frontend): share how a CSV download writes an answer - #428
Merged
Merged
Conversation
The team assignment export turned answers into cells inline: one per question key, a tick-box as Yes or No. The participant roster is about to write the same answers, so the formatting moves next to answersByParticipant as answerCells, and both files will read alike.
An organizer downloading the participant roster or the team assignment now gets each person's GitHub, LinkedIn and Renku link, one column per site, empty where none is set. The backend already sends them on every user, so nothing new is fetched. The roster's rows move into $lib/utils/participantCsv.ts so the file has tests like the other CSVs. The team file's links are context only: the upload still reads nothing but user_id, project and team.
The participant roster download gains one column per registration question, headed by its label, as the team assignment download already has. Answers are written through answerCells, so a tick-box reads Yes or No in both files. Fetched as the team download fetches them: if the answers cannot be read, the file still downloads with those columns empty. Adds the CHANGELOG entry for this and the profile links, and mentions both in the Manage Participants and Manage Teams guides.
Nobody in the fixture had a GitHub, LinkedIn or Renku link, so the new link columns in the participant downloads were empty on a fresh seed. bob now has GitHub only, charles and dana all three, alice none, so each state shows. Set as each user through UserService.Edit, as the Account page does, with handles that are the fixture's own.
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.
More about each person in the participant downloads
Organizers can now see what participants answered at registration and where they are online without opening each profile. The participants download now includes the registration answers. Both downloads, on Manage Participants and on Manage Teams, now include each person's GitHub, LinkedIn and Renku links.
Before, the participants download had only email, name, status and role, and neither file had the links.
Left out: if the answers can't be loaded, the file still downloads with the answer columns empty, and nothing in it says so. The teams download already behaved this way.