Skip to content

Conversation

@suppermancool
Copy link
Contributor

Update Invited Registered User Workflow #3311

add new action for invite fail
maxceem added a commit that referenced this pull request Sep 24, 2019
@maxceem maxceem removed the on hold label Sep 29, 2019
Copy link
Collaborator

@maxceem maxceem left a comment

Choose a reason for hiding this comment

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

Hi @suppermancool. Sorry for the delay with review.

There are a few issues I've noticed.

  1. If I just open any project after several second I see an error page. For example if open project http://local.topcoder-dev.com:3000/projects/8369 with pshah_manager user and wait around 10 seconds. See demo video https://monosnap.com/file/5kso0uGG9G3oBZk5cCyP0we5tMhUZy.

  2. If I've already joined the project and use link like http://local.topcoder-dev.com:3000/projects/8369?invitation=accept or http://local.topcoder-dev.com:3000/projects/8369?invitation=decline it works good now and we just see the project. But also we have to remove ?invitation=... from the URL.

  3. In case user accepts invitation it works good and I can see that URL is changed to the URL without ?invitation=.... But the URL with ?invitation=... stays in history, so if we press back, we will go the URL with ?invitation=.... But when we press back we have to go to previous page. So after we accept invitation we have to replace URL with the new one instead of going to the next page so there is now URL with ?invitation=... in the browser history:
    image

    • I think we have to use history.replace instead of history.push for this.

    NOTE. In case of decline we should go to the next page. So decline URL should stays in the browser history.

@suppermancool
Copy link
Contributor Author

@maxceem all done in the latest commit

Copy link
Collaborator

@maxceem maxceem left a comment

Choose a reason for hiding this comment

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

@suppermancool all works great now except of case where the request to accept/decline invitation fails on the server.

To force failing of invitation processing on the server-side I've updated acceptOrRefuseInvite method, so it send a wrong invitation status to the server:

image

Now if I follow link with automatic invite declining it sends request to decline invitation in the infinite loop, see the demo video.

The same thing happens if I use link for automatic invitation acceptance.

Copy link
Collaborator

@maxceem maxceem left a comment

Choose a reason for hiding this comment

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

Thanks for the update @suppermancool.

Now there is no infinite loop anymore, but the error which is shown when there is error on the fail during accepting/declining invitation is not correct. Currently, it shows error 404 that page cannot be found, but we should show the error that we cannot accept/decline invitation. When we click Copy error details link, there should be detailed error from the server.

image

fix show error message for invite fail
@suppermancool
Copy link
Contributor Author

@maxceem done in the latest commit

Copy link
Collaborator

@maxceem maxceem left a comment

Choose a reason for hiding this comment

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

Thank you @suppermancool. Works good.

@maxceem maxceem changed the base branch from cf19 to hotfix/post-release-2.4.15.2 October 2, 2019 04:12
@maxceem maxceem merged commit 6d74631 into topcoder-archive:hotfix/post-release-2.4.15.2 Oct 2, 2019
maxceem added a commit that referenced this pull request Oct 2, 2019
In the PR #3335 the code was updated to show error details on the error page. But we have to show the standard error message.
Also, we have to show error 404 in case of error 403 because server throws error 403 if page is not found.

ref issue #3311
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