Skip to content
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

Allow the Emulator user to specify a User ID #1422

Merged
merged 20 commits into from
Apr 15, 2019

Conversation

Aliandi
Copy link
Contributor

@Aliandi Aliandi commented Apr 11, 2019

Fixes #1344

Description

This PR allows the Emulator users to specify a User ID which will be used within conversations.

Changes made

Functionality changes

To implement this feature we made the following changes:

  • Add an input to the Emulator Settings so that the user can configure a GUID
  • Change the startNewConversation method to choose between a randomly generated UserId, the UserId set in the props or the UserId set by the user.'
  • When the Use custom id checkbox is set to false, the input is disabled and cleaned. When true, it is a required field and it gets enabled.
  • The User ID field has a validation so that the user is not able to enter anything other than a GUID.
  • Restarting a conversation with the same userId will choose between the one set by the user or the one set by default (if the first one is empty).
  • Restarting a conversation with a new userId will generate a random ID the same way it was doing it until now.
  • Remove Restart Conversation Split Button
  • Add two new buttons Restart with Same User Id and Restart with New User Id to replace Restart Conversation Split Button.

UI Changes

Before
imagen
imagen

After
imagen
imagen

Testing

Manual testing
BETranscript-Test

Automated testing
Added automated tests for the new settings options.

imagen

@coveralls
Copy link

coveralls commented Apr 11, 2019

Pull Request Test Coverage Report for Build 2369

  • 10 of 13 (76.92%) changed or added relevant lines in 2 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.03%) to 55.447%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/app/client/src/ui/editor/emulator/emulator.tsx 8 11 72.73%
Files with Coverage Reduction New Missed Lines %
packages/app/client/src/ui/editor/emulator/emulator.tsx 4 75.3%
Totals Coverage Status
Change from base Build 2367: 0.03%
Covered Lines: 4898
Relevant Lines: 8326

💛 - Coveralls

Copy link
Contributor

@tonyanziano tonyanziano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I'll approve once tests are committed.

One thing I noticed that was when the checkbox is checked, and the GUID text field becomes active, the label styling still appears to be inactive:

image

I think that the color of the label text should match the color of the other active inputs.

justinwilaby
justinwilaby previously approved these changes Apr 12, 2019
Copy link
Contributor

@tonyanziano tonyanziano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! 🎉

@denscollo
Copy link
Contributor

Great job! 🎉

Thanks! 🎉

@cwhitten cwhitten merged commit 2c6a4cf into master Apr 15, 2019
@cwhitten cwhitten deleted the feature/southworks/choose-userId branch April 15, 2019 16:15
@justinwilaby justinwilaby restored the feature/southworks/choose-userId branch April 15, 2019 22:58
justinwilaby pushed a commit that referenced this pull request Apr 15, 2019
justinwilaby pushed a commit that referenced this pull request Apr 15, 2019
@cwhitten
Copy link
Member

Hi @Aliandi and @denscollo:

Justin's in-flight work in #1400 had problems reconciling with some of the changes made in this diff, so we reverted it in the hopes that when his branch lands @Aliandi can reissue the pull request against master again.

@cwhitten
Copy link
Member

@denscollo @Aliandi this is ready to be re-opened against master. There has been a refactor to some of the code-paths involved so some changes will be necessary.

@Aliandi Aliandi deleted the feature/southworks/choose-userId branch May 3, 2019 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow the Emulator user to specify a User ID to be used for conversations
6 participants