-
Notifications
You must be signed in to change notification settings - Fork 4
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
[DUOS-2033][risk=no] Update ResearcherProfile to use FormField components #1814
Conversation
I'm not sure what you mean by override. I changed it to where it will show your institution and also what you have previously suggested in the form if both exist, but you still have your current institution. This is because I (personally) found it confusing when I suggested an institution, and the pagre refreshed but nothing changed on the page. Thus, I added this as a way to give some feedback to the user. I am more than happy to revert if the previous approach is preferable. |
What I mean by override is that the institution value I have saved is not what is displayed in the institution field when the page loads. The value that is displayed is from one of the user properties which is incorrect. The two |
Ok, I understand. I still feel showing both the real institution and the suggested institution makes more sense to me as a user, since it provides feedback to the user if they suggest something, since, if not show, that value just disappears (I would think, as a user, that nothing happened). Since it was still populating and showing the real institution alongside the suggested, I thought it could be helpful feedback. That being said, I understand just showing only the current value of the institution, it just seems weird to me from a UX perspective that the user both 'selects valid institution' and 'suggests the creation of a new institution' in the same input box, since, they seem like two different operations to me, and effect different fields. |
They are two different operations - but for different phases of a user's registration process. This was the intended design that was run through Yvonne/Jonathan/Pamela so if we are going to make changes at this point, we should be going through a design review. I don't have a problem if we choose to do that, but PR reviews are the wrong forum for that discussion. |
That is very fair - the original behavior should be returned (but it look slike some cypress errors, will work on those) |
@rushtong I have been investigating this cypress error but I cannot seem to get to the bottom of what is causing it. I can replicate the error locally on my e2e tests; it seems to be an error with e2e background sign in authentication. Very odd since I did not touch that side of the code base. Kind of confused at what's causing it. Rerunning it on github doesn't seem to help, so it's a replicable issue. Just no idea what's causing it. Do you have any ideas? |
I think you need to pull in the latest from dev, your branch doesn't have changes from #1818. That PR moves auth testing to alpha instead of perf. |
ahhhh, that got it! thank you! |
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.
👍🏽
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.
Updates are looking good! There are a few things that I've left comments on.
institutionId: selectedInstitution?.institutionId, | ||
suggestedInstitution: profile.suggestedInstitution, | ||
displayText: ( | ||
(!isNil(selectedInstitution) |
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.
I think you can shorthand this to
displayText: selectedInstitution?.name || profile?.suggestedInstitution || ''
className: 'form-control' | ||
}) | ||
]), | ||
h(FormField, { |
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.
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.
Wasn't quite able to recreate this, but I should have fixed it by only displaying the error if there is no SO id.
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.
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.
Hmm curious, theoretically they should be the same but I added that check too.
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.
LGTM
Addresses
https://broadworkbench.atlassian.net/browse/DUOS-2033
I also added the ability to show both the suggested and selected institutions when the page loads.
Have you read Terra's Contributing Guide lately? If not, do that first.