- Sponsor
-
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
feat(admin-next): Email password invite flow in admin 2.0 #6821
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
1ebc3ac
to
8592426
Compare
<LogoBox | ||
className="mb-4" | ||
checked={success} | ||
containerTransition={{ |
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.
Probably not something for now, but a general comment: It's much better to encapsulate and standardize transitions and animations, both for consistency in appearance, as well as simplfying the code. As you can see now, half of the JSX is animation config. cc @kasperkristensen WDYT?
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.
+1 think that we could have something as <Fade direction= "up" />
or at least easing functions in the UI lib
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.
Do we want to address such things in UI for v2, or should we wait till after?
And if so, do we know where we want to place these?
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 would define these in medusajs/ui
but probably not necessary for v2 atm
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.
If the animation is ever re-used I think it would make sense to move it to a file in @medusajs/dashboard
, but it's a one off animation, so don't see a reason to move it into a separate file atm. Feel free to move it to a const outside of the JSX for better readability though.
And I would prefer to not move any framer logic into @medusajs/ui
. We don't use Framer in the project, only a small number of CSS animations. If people want to add animations on top of that they can then use framer or their preferred animation component, but I don't think it should be something that is built-in, or force people to use a specific animation library ✌️
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.
@kasperkristensen it doesn't necessarily need to be part of medusajs/ui
, it can be a separate animations
folder in the admin, but my point is that it would be nice to see what is extractable. And definitely not urgent for v2, just a general comment after looking at the code.
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.
NIce 💪
Left a few comments.
<LogoBox | ||
className="mb-4" | ||
checked={success} | ||
containerTransition={{ |
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.
+1 think that we could have something as <Fade direction= "up" />
or at least easing functions in the UI lib
@fPolic, could I get you to give this another review? |
On it @olivermrbl 👀 |
The main flow works nicely! However, I've noticed 2 issues:
|
Did you accept it with a different email + password or the same as the first time?
This is actually intended behaviour and part of our new auth flow. Funny enough, I just had a discussed with Seb on how to address this in our docs. Probably could have a cron job cleaning up unused auth users on a fixed schedule, but we'll let that be up to users to decide |
I used a different email.
Ahh alright 😅 I thought that might be intentional but wanted to check. |
"Issue" with double-accepting invites resolved internally. We failed to reproduce, so will keep it as is. |
* fix(inventory): cannot migrate existing products (#6877) * chore: add changeset (#6821) --------- Co-authored-by: Geoffroy Empain <[email protected]> Co-authored-by: Stevche Radevski <[email protected]>
Add invite flow for email-password auth provider
CleanShot.2024-03-27.at.09.56.31.mp4
To test it out, you need the latest changes from
develop
, in which invite support has been added to our CLI.Then do:
cd packages/admin-next/dashboard && yarn run dev
medusa user -e [email protected] --invite
http://localhost:5173/invite?token=[token]