-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Redirect to New Workspace Creation with Invalid Policy Id in Workspace URL #4481
Redirect to New Workspace Creation with Invalid Policy Id in Workspace URL #4481
Conversation
@timszot Work done. Few things with this PR.
|
Sorry for the delay here. I'll give this a review and work on getting the translations for you as well, but please give us some time as we're currently prioritising a company wide internal project. |
Hey just a note for when this hits QA stage. We're getting rid of the I'd say this doesn't need any further QA when it hits staging and instead the QA will be handled in the other PR where we're changing the |
@TomatoToaster Are you saying that with the other PR, my current PR's modal won't show. One workspace with the default name will be auto created and I don't need to handle it in the current PR, right? |
Yep you got it. Nothing left to do on your side 👍🏾 |
@mananjadhav Hello! Any QA needed for this PR? |
@isagoico From QA, we could just check that it doesn't land up to a blank Workspace Card page? |
This has been deployed to production and is now subject to a 7-day regression period. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed a bug on dev related to this PR, but unsure if it's causing any significant issues. What I observed was a failure to create a policy and then the app crashes. Unfortunately, I didn't manage to catch why the policy wasn't created.
Gonna create an issue to make sure we handle this case properly.
Navigation.dismissModal(); | ||
Navigation.navigate(ROUTES.getWorkspaceCardRoute(response.policyID)); | ||
Navigation.navigate(ROUTES.getWorkspaceCardRoute(res.policyID)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up, res
will be null
if we get a non 200 jsonCode
here. Since we are returning early in the first .then()
block the next once will still go and we end up trying to access policyID
on null
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Give me a day I'll check. Afaik, Workspace creation was manual with the form when this PR was merged and we did test this.
I'll fix it anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TomatoToaster Does your change cover this as well? or I'll cover this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh hey, I totally did not do this, my bad for missing this comment! I put up a PR here: #5687
if (_.isEmpty(policy)) { | ||
return null; | ||
} | ||
useEffect(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. I'll check and update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll mostly be working on this issue #5185 and it involves working on WorkspaceSidebar
. I'll update this block of code too when working with this PR.
Will change WorkspaceSidebar
to a class component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey just want to note, I actually got rid of the useEffect in one of my PRs when I was editing this component. You won't need to update it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TomatoToaster Thanks for the note. :)
@timszot Can you please review?
Details
Fixed Issues
$ #4350
Tests
policyId
in the URL (random numbers and characters)QA Steps
Tested On
Screenshots
Web
invalid-policyid-redirect-web.mp4
Mobile Web
invalid-policyid-redirect-mweb.mp4