Skip to content

[$50] Fix code quality issues from V4 changes #32

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

Closed
5 tasks done
ThomasKranitsas opened this issue Dec 13, 2018 · 12 comments
Closed
5 tasks done

[$50] Fix code quality issues from V4 changes #32

ThomasKranitsas opened this issue Dec 13, 2018 · 12 comments

Comments

@ThomasKranitsas
Copy link
Contributor

ThomasKranitsas commented Dec 13, 2018

This #30 PR introduced code quality issues that should be fixed.

Most of them are in https://github.com/topcoder-platform/topcoder-react-lib/blob/1e4b154636c86c111b964c0258e6a6706735cf1a/src/services/challenges.js but everything should be checked and fixed.

  • Fix eslint issues and revert rules to the default configs
  • Fix many typos v3 => v4 in method documentation.
  • We use the getApiResponsePayloadV3() method with the response from the V4.
  • getApiV3 is defined but never used.
  • We defined both this.private.api and this.private.apiV4 as getApiV4(tokenV3). This is confusing.
@ThomasKranitsas
Copy link
Contributor Author

Contest https://www.topcoder.com/challenges/30076968 has been created for this ticket.

This is an automated message for thomaskranitsas via Topcoder X

@ThomasKranitsas ThomasKranitsas self-assigned this Dec 13, 2018
@ThomasKranitsas
Copy link
Contributor Author

Contest https://www.topcoder.com/challenges/30076968 has been updated - it has been assigned to thomaskranitsas.

This is an automated message for thomaskranitsas via Topcoder X

@ThomasKranitsas
Copy link
Contributor Author

Contest https://www.topcoder.com/challenges/30076968 has been updated - the new changes has been updated for this ticket.

This is an automated message for thomaskranitsas via Topcoder X

4 similar comments
@ThomasKranitsas
Copy link
Contributor Author

Contest https://www.topcoder.com/challenges/30076968 has been updated - the new changes has been updated for this ticket.

This is an automated message for thomaskranitsas via Topcoder X

@ThomasKranitsas
Copy link
Contributor Author

Contest https://www.topcoder.com/challenges/30076968 has been updated - the new changes has been updated for this ticket.

This is an automated message for thomaskranitsas via Topcoder X

@ThomasKranitsas
Copy link
Contributor Author

Contest https://www.topcoder.com/challenges/30076968 has been updated - the new changes has been updated for this ticket.

This is an automated message for thomaskranitsas via Topcoder X

@ThomasKranitsas
Copy link
Contributor Author

Contest https://www.topcoder.com/challenges/30076968 has been updated - the new changes has been updated for this ticket.

This is an automated message for thomaskranitsas via Topcoder X

@sushilshinde
Copy link
Collaborator

@ThomasKranitsas I did testing today and also reviewed the code. Everything looks fine on beta and test env where I deployed the code.

https://beta-community-app.topcoder.com/challenges
https://test-community-app.topcoder-dev.com/challenges
With this dependency

topcoder-react-lib": "git+https://github.com/topcoder-platform/topcoder-react-lib.git#code-quality-fixes

I'll merge PR tomorrow morning and we can do npm publish tomorrow. I still want to test app few more times.

@sushilshinde
Copy link
Collaborator

sushilshinde commented Dec 17, 2018

Improvement suggestions

@ThomasKranitsas I saw some opportunities where we can make some more generic changes.

  1. I think this whole thing can be rewritten using API factory function. And usage will be like
const { getApi } = services.api;
const api = getApi(version='V4',tokenV3)

This might need change on the community app side but it will generic for next versions.

  1. I think we should remove every mention of v4 from the docs, there are many places where there is v4. Probably in a month or two, we will be launching v5
    https://github.com/topcoder-platform/topcoder-react-lib/pull/33/files search for v4

@ThomasKranitsas
Copy link
Contributor Author

@sushilshinde can you elaborate on req. 2?

@ThomasKranitsas
Copy link
Contributor Author

Closing this as the fix has been addressed.

Will open a new ticket for the 2nd part

@ThomasKranitsas
Copy link
Contributor Author

Payment task has been updated: https://software.topcoder.com/review/actions/ViewProjectDetails?pid=30076968

This is an automated message for thomaskranitsas via Topcoder X

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants