Skip to content

Conversation

@maxceem
Copy link
Collaborator

@maxceem maxceem commented Oct 19, 2017

Fix for issue #1266 - Update react-router to v4

Notes

  • Updated to react-router-dom@4.2.2 which is same as react-router@4.2.0 plus DOM bindings for browser environment.
  • Removed forceUpdate "hack" in ProjectToolBar component
  • Looks like Discourse doesn't work in dev enverinoment as I get Failed to create topic in Discourse: Unable to create discourse user when I try to post a message for project. So I couldn't make sure that route /discussions/:feedId handled properly. Though appropriate changes have been made to make it work. Tested with the provided user below and the old project. Works after fix in the second commit.
  • Fixed error in browser console: window.analytics.user in not a function
  • Added guide how to update npm-shrinkwrap.json to README.
  • Removed --fix flag from npm run lint command as sometimes it can truncate files during fixing (haven't found out why). And added command npm run lint:fix with fix flag so the developer is always aware of possible changes when run.

Found possible issues in existent code

On the way I saw some warnings in existent code which are not related to my changes. Though I've noted them just in case.

  • Page https://connect.topcoder-dev.com/projects doesn't show project list even if there are some projects created. Server doesn't return any projects on https://api.topcoder-dev.com/v4/projects/?limit=20&offset=0&fields=id,name,members,status,type,actualPrice,estimatedPrice,createdAt,updatedAt,details&sort=createdAt+desc

  • RedirectComponent doesn't return anything thus when navigate /login there is error in console:

    Error: RedirectComponent(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.
    
  • When open a project there is a warning in browser console:

    Warning: Failed prop type: The prop `members[0].handle` is marked as required in `O`, but its value is `undefined`.
    
  • When open project specifications there are warning in browser console:

    Warning: Failed prop type: Invalid prop `value` of type `string` supplied to `SpecFeatureQuestion`, expected an array.
    
    Warning: Failed prop type: Invalid prop `addedFeatures` of type `string` supplied to `FlattenedFeatureList`, expected `array`.
    
    Warning: Failed prop type: The prop `children` is marked as required in `FileList`, but its value is `undefined`.
    
  • Also from time to time warning from Formsy package appears

    Warning: Formsy: isMounted is deprecated. Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.
    

    For example, when editing project specification, click Add / Edit Feature, select some feature and click Save and Close warning appears in browser console.

@gondzo
Copy link
Collaborator

gondzo commented Oct 19, 2017

Looks like Discourse doesn't work in dev enverinoment as I get Failed to create topic in Discourse: Unable to create discourse user when I try to post a message for project. So I couldn't make sure that route /discussions/:feedId handled properly. Though appropriate changes have been made to make it work.

Discussions are visible for old projects only. you can test with project id 1304. The discussions page isn't displayed with this PR, but is displayed at https://connect.topcoder-dev.com/projects/1304/discussions. Can you please take a look at this ?

Page https://connect.topcoder-dev.com/projects doesn't show project list even if there are some projects created. Server doesn't return any projects on https://api.topcoder-dev.com/v4/projects/?limit=20&offset=0&fields=id,name,members,status,type,actualPrice,estimatedPrice,createdAt,updatedAt,details&sort=createdAt+desc

I can't reproduce that issue, project listing is displayed correctly (user pshah_manager/topcoder123)

RedirectComponent doesn't return anything thus when navigate /login there is error in console

Thanks, new issue created for the report.

When open a project there is a warning in browser console

I can't reproduce this one. Any specific project Id or user ?

When open project specifications there are warning in browser console

Thanks, new issue created for the report.

Also from time to time warning from Formsy package appears

It's a known issue. Thanks.

@maxceem
Copy link
Collaborator Author

maxceem commented Oct 20, 2017

Note both these issues I cannot reproduce with the user you've provided, but can with mine.

Page https://connect.topcoder-dev.com/projects doesn't show project list even if there are some projects created. Server doesn't return any projects on https://api.topcoder-dev.com/v4/projects/?limit=20&offset=0&fields=id,name,members,status,type,actualPrice,estimatedPrice,createdAt,updatedAt,details&sort=createdAt+desc

Please, try with my user maxceem-dev / topcoder123. I've already created a bunch of projects. But to make sure you can create a new project and after go to the projects list page, there is no project listing.

When open a project there is a warning in browser console

You can try with my user above. Open any existent project, for example, https://connect.topcoder-dev.com/projects/1922

@maxceem
Copy link
Collaborator Author

maxceem commented Oct 20, 2017

The discussions page isn't displayed with this PR, but is displayed at https://connect.topcoder-dev.com/projects/1304/discussions. Can you please take a look at this ?

Fixed.
I've tested Discourse related routes with your user and the old project:

  • /projects/:projectId/discussions/:discussionId?
  • /discussions/:feedId

@gondzo
Copy link
Collaborator

gondzo commented Oct 23, 2017

Thanks @maxceem, this looks good.
I can reproduce your issue with empty projects list and will handle that separately.

@gondzo gondzo merged commit 0fe2135 into topcoder-archive:test02 Oct 23, 2017
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.

2 participants