-
Notifications
You must be signed in to change notification settings - Fork 1.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
[dashboard] account deletion #3551
Conversation
7cd9a55
to
bc6d6dc
Compare
|
||
const deleteAccount = async () => { | ||
await getGitpodService().server.deleteAccount(); | ||
//TODO we are sad to see you go view |
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.
@gtsiolis I made it so that users get redirected to the home page.
We should think about something that helps users reconsidering their decision.
That said probably something to postpone to after this milestone.
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.
Current flow looks good but yes, we could improve this. Some visual feedback (see alert component) on the login page that the account has been deleted could be a starting point. I'd also vote for leaving this out of the scope of this milestone. Added #3554 as a follow-up issue.
@AlexTugarev After I have deleted my account I can no longer login. Any idea why that is? |
const deleteAccount = async () => { | ||
await getGitpodService().server.deleteAccount(); | ||
//TODO we are sad to see you go view | ||
document.location.href = 'https://www.gitpod.io'; |
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.
independent of the TODO, I think we should use the website URL from branding.
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.
also this #3551 (comment)
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.
We don't support "branding" anymore, just saas and self-hosted. In both cases users could land on our website.
But I changed this now to just go to logout.
yes. the session isn't destroyed on the API call. we need to redirect to |
455a889
to
22527ee
Compare
I think that the additional step is a commonly used guard to avoid accidental deletions. |
@svenefftinge, I got that. The thing is, it looks like the input field is already pre-filled, as if the browser already autofilled it maybe. Maybe it would help to prefix the placeholder text, e.g. |
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.
works nicely!
@gtsiolis WDYT? |
Looking at this now! 👀 |
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.
Looks good @svenefftinge! Left some minor comments. 🏓
|
||
const close = () => setModal(false); | ||
return <div> | ||
<Modal visible={modal} onClose={close}> | ||
<h3 className="pb-2">Delete Account</h3> | ||
<div className="border-t border-b border-gray-200 mt-2 -mx-6 px-6 py-2"> | ||
<p className="mt-1 mb-2 text-base">Are you sure you want to delete your account? This action will remove all the data associated with your account in Gitpod and cannot be reversed.</p> | ||
<p className="py-4 text-gray-900 text-base">You are about to permanently delete your account.</p> | ||
<ol className="text-gray-400 text-sm list-outside list-decimal"> |
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.
nitpick: Minor font color shift.
<ol className="text-gray-400 text-sm list-outside list-decimal"> | |
<ol className="text-gray-500 text-sm list-outside list-decimal"> |
|
||
const close = () => setModal(false); | ||
return <div> | ||
<Modal visible={modal} onClose={close}> | ||
<h3 className="pb-2">Delete Account</h3> | ||
<div className="border-t border-b border-gray-200 mt-2 -mx-6 px-6 py-2"> | ||
<p className="mt-1 mb-2 text-base">Are you sure you want to delete your account? This action will remove all the data associated with your account in Gitpod and cannot be reversed.</p> | ||
<p className="py-4 text-gray-900 text-base">You are about to permanently delete your account.</p> | ||
<ol className="text-gray-400 text-sm list-outside list-decimal"> |
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.
praise: Always fun to see W3C specs going live as browser standards and being available only with a class name! Go list-outside
! 🔮
|
||
const close = () => setModal(false); | ||
return <div> | ||
<Modal visible={modal} onClose={close}> | ||
<h3 className="pb-2">Delete Account</h3> | ||
<div className="border-t border-b border-gray-200 mt-2 -mx-6 px-6 py-2"> | ||
<p className="mt-1 mb-2 text-base">Are you sure you want to delete your account? This action will remove all the data associated with your account in Gitpod and cannot be reversed.</p> | ||
<p className="py-4 text-gray-900 text-base">You are about to permanently delete your account.</p> |
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.
<p className="py-4 text-gray-900 text-base">You are about to permanently delete your account.</p> | |
<p className="pb-4 text-gray-900 text-base">You are about to permanently delete your account.</p> |
await getGitpodService().server.deleteAccount(); | ||
//TODO we are sad to see you go view | ||
document.location.href = gitpodHostUrl.asApiLogout().toString(); | ||
}; | ||
|
||
const close = () => setModal(false); | ||
return <div> | ||
<Modal visible={modal} onClose={close}> | ||
<h3 className="pb-2">Delete Account</h3> | ||
<div className="border-t border-b border-gray-200 mt-2 -mx-6 px-6 py-2"> |
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.
nitpick: Minor padding changes.
<div className="border-t border-b border-gray-200 mt-2 -mx-6 px-6 py-2"> | |
<div className="border-t border-b border-gray-200 mt-2 -mx-6 px-6 py-4"> |
</div> | ||
<div className="flex justify-end mt-6"> | ||
<button className="border-red-900 bg-red-500 hover:bg-red-700" onClick={close}>Delete Account</button> | ||
<button className="text-gray-900 border-gray-100 bg-gray-100 hover:bg-gray-200 hover:border-gray-400" onClick={close}>Cancel</button> | ||
<button className="ml-2 border-red-900 bg-red-500 hover:bg-red-700 disabled:opacity-50" onClick={deleteAccount} disabled={typedEmail !== primaryEmail}>Delete Account</button> |
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.
question: Can we disable the hover changes when the button is disabled?
</div> | ||
<div className="flex justify-end mt-6"> | ||
<button className="border-red-900 bg-red-500 hover:bg-red-700" onClick={close}>Delete Account</button> | ||
<button className="text-gray-900 border-gray-100 bg-gray-100 hover:bg-gray-200 hover:border-gray-400" onClick={close}>Cancel</button> |
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.
suggestion: Let's remove the background here for the default state and add the font-medium
class which is missing also in some other buttons, too.
<button className="text-gray-900 border-gray-100 bg-gray-100 hover:bg-gray-200 hover:border-gray-400" onClick={close}>Cancel</button> | |
<button className="text-gray-500 border-white bg-white hover:bg-gray-100 hover:border-gray-100 font-medium" onClick={close}>Cancel</button> |
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'm adding text-base
to the default button style
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, wait. Buttons use 14px
text. The should be using font-medium
, too.
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.
Actually, button already had text-sm applied. Is that not right?
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.
Yes, text-sm
is corrent. Font weight (font-medium
) is missing. I tried this in #3521 (comment) but didn't work. Maybe I've missed something. ❓
thought: Font weight is not picked up when using
@apply
inindex.css
. Maybe this is by design?
<li className="ml-5">Your subscription will be cancelled. If you obtained a Gitpod subscription through the GitHub marketplace, you need to cancel your plan there.</li> | ||
</ol> | ||
<p className="pt-4 pb-2 text-gray-600 text-base font-bold">Type your email to confirm</p> | ||
<input className="border-2 border-gray-400 w-full" type="text" placeholder={primaryEmail} onChange={e => setTypedEmail(e.target.value)}></input> |
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.
suggestion: Maybe the specs were not clear enough. This shouldn't have any placeholder. 😇 /cc @AlexTugarev
<input className="border-2 border-gray-400 w-full" type="text" placeholder={primaryEmail} onChange={e => setTypedEmail(e.target.value)}></input> | |
<input className="border-2 border-gray-400 w-full" type="text" onChange={e => setTypedEmail(e.target.value)}></input> |
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.
@AlexTugarev I've cross-linked this conversation to the follow up issue in #3554 (comment).
@@ -65,6 +65,11 @@ module.exports = { | |||
'grayscale': 'grayscale(1)', | |||
}, | |||
}, | |||
variants: { | |||
extend: { | |||
opacity: ['disabled'], |
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.
thought: Ideally we should not use opacity for disabled states but different colors, however, let's leave this is out of the scope of this milestone. FWIW, our design specs have not reached this level of maturity yet, it's still missing aspects like tabindex, active, focus state, etc for many elements. Food for thought! 🍔
</div> | ||
<div className="flex justify-end mt-6"> | ||
<button className="border-red-900 bg-red-500 hover:bg-red-700" onClick={close}>Delete Account</button> | ||
<button className="text-gray-900 border-gray-100 bg-gray-100 hover:bg-gray-200 hover:border-gray-400" onClick={close}>Cancel</button> | ||
<button className="ml-2 border-red-900 bg-red-500 hover:bg-red-700 disabled:opacity-50" onClick={deleteAccount} disabled={typedEmail !== primaryEmail}>Delete Account</button> |
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.
suggestion: Also, missing the font-medium
class.
<button className="ml-2 border-red-900 bg-red-500 hover:bg-red-700 disabled:opacity-50" onClick={deleteAccount} disabled={typedEmail !== primaryEmail}>Delete Account</button> | |
<button className="ml-2 border-red-900 bg-red-500 hover:bg-red-700 disabled:opacity-50 font-medium" onClick={deleteAccount} disabled={typedEmail !== primaryEmail}>Delete Account</button> |
22527ee
to
4ec057e
Compare
4ec057e
to
868949d
Compare
/werft run 👍 started the job as gitpod-build-se-profile-page.8 |
Fixes #3395