-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Add respondent and subject labels to DataViz responses page (M2-7855) #1964
base: develop
Are you sure you want to change the base?
Feature: Add respondent and subject labels to DataViz responses page (M2-7855) #1964
Conversation
…e hidden as well as when we may want to to label the result as a respondent or subject. Add coloumn to display the respondent on the DataViz screen in RespondentSummary.
This pull request is automatically being deployed by Amplify Hosting (learn more). |
… useResposeLabel to denote who submitted the response.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @LashaunnaS. This PR nails the functionality, so I'm happy to approve it. I've left you some suggestions for how I think things could be improved
src/modules/Dashboard/features/RespondentData/RespondentDataReview/RespondentDataReview.tsx
Show resolved
Hide resolved
...oard/features/RespondentData/RespondentDataReview/ResponsesSummary/ResponsesSummary.hooks.ts
Outdated
Show resolved
Hide resolved
…e the previous usecases added in this PR with the use of getRespondentName.
…the sourceSubject.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @LashaunnaS! I just identified a couple nits, and a failing unit test that you might already be working on.
@@ -296,8 +305,12 @@ export const RespondentDataReview = () => { | |||
/> | |||
{!isLoading && ( | |||
<> | |||
{selectedAnswer && responsesSummary && !error && ( | |||
<ResponsesSummary {...responsesSummary} data-testid={dataTestid} /> | |||
{selectedAnswer && responsesSummary && !!sourceSubject && !error && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a new test is failing in RespondentDataReview.test.tsx
, maybe you're already on top of it. I'm guessing it's because the data for sourceSubject
needs to get mocked into the response?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@farmerpaul I removed that additional check because I assume the sourceSubject
will always be returned from the answer object. I don't believe the whole summary should not return if that fails . Is that a correct assumption?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah correct. Yes if for whatever reason the sourceSubject
is missing we should still render the component. Does this fix that broken test?
fix
orfeature
branches intodevelop
orrelease
branches viaSquash and Merge
(to keep clean history)📝 Description
🔗 Jira Ticket M2-7855
Changes include:
useRespondenLabel
hook to add appropriate labels forsubject
,respondent
, or the users credentials without the label.📸 Screenshots
🪤 Peer Testing
Responses
tab.