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

Start with moving over a little piece #3541

Open
Angamanga opened this issue May 28, 2019 · 0 comments

Comments

3 participants
@Angamanga
Copy link
Contributor

commented May 28, 2019

DESCRIPTION
As a proof of concept, lets start moving over a little piece of information to React.

TODO

  • Create a new branch from the js-migration-branch
  • Select one of the isolated parts from the list you made in #3540

The first step is to create the files for this part. We need a component and a test-file. Look at the https://github.com/ushahidi/platform-client/blob/js-migration/app/react/settings/users/UserList/UserAvatar.spec.jsx for test-file setup and https://github.com/ushahidi/platform-client/blob/js-migration/app/react/settings/users/UserList/UserAvatar.jsx for the component

  • Create one file for the test (with .spec. between the name and the jsx)
  • Create one file for the component(name + .jsx)
  • Commit the files
    We can pair-program on below if you want to:
  • Look at the test-example and copy the setup
  • Figure out what you want this component to do, what is the functionality of the component?
  • Write tests in the test-file
  • Run npm run tdd:jest, the tests should fail
  • Commit the files
  • Go to the component-file, look at the component-example and copy the setup
  • Add the functionality
  • Run npm run tdd:jest again, it hopefully succeeds
  • Commit once it succeeds
  • Repeat to cover all functionality for this component

Now we will use this component in the angular code:

(I added userName as example prop, you add the props you need to your component)

  • Remove the old html!
  • Check if it looks ok!
  • Commit
  • Push to platform-client repository create a pullrequest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.