Skip to content
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(elements,ui,clerk-js): Legal consent elements support and improvements #4427

Merged
merged 11 commits into from
Oct 31, 2024

Conversation

octoper
Copy link
Member

@octoper octoper commented Oct 29, 2024

Description

This PR adds Elements support for Legal consent feature, it also includes implementation of the UI build with Elements and includes a couple improvements on the AIO components

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Copy link

changeset-bot bot commented Oct 29, 2024

🦋 Changeset detected

Latest commit: d8648b8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 19 packages
Name Type
@clerk/elements Minor
@clerk/clerk-js Patch
@clerk/types Patch
@clerk/ui Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/localizations Patch
@clerk/nextjs Patch
@clerk/clerk-react Patch
@clerk/remix Patch
@clerk/clerk-sdk-node Patch
@clerk/shared Patch
@clerk/tanstack-start Patch
@clerk/testing Patch
@clerk/themes Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@octoper octoper force-pushed the vaggelis/user-744-implement-legal-consent-on-elements branch from bcb2dc6 to ab45205 Compare October 29, 2024 21:04
@octoper octoper self-assigned this Oct 29, 2024
@octoper octoper force-pushed the vaggelis/user-744-implement-legal-consent-on-elements branch from 9ac9d17 to e8a3406 Compare October 30, 2024 13:43
@octoper octoper marked this pull request as ready for review October 30, 2024 13:43
@octoper octoper changed the title feat(elements,ui): Legal consent feat(elements,ui,clerk-js): Legal consent elements support and improvements Oct 30, 2024
Copy link
Member

@tmilewski tmilewski left a comment

Choose a reason for hiding this comment

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

Elements stuff generally looks good to me, I'll leave UI up to @alexcarpenter.

@octoper octoper force-pushed the vaggelis/user-744-implement-legal-consent-on-elements branch from 2df32f8 to 5ad10db Compare October 30, 2024 14:23
Copy link
Member

@alexcarpenter alexcarpenter left a comment

Choose a reason for hiding this comment

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

Couple small notes, but everything else looks good.


<Common.Label asChild>
<Field.Label>
<span>
Copy link
Member

Choose a reason for hiding this comment

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

is there a reason for the extra wrapping span here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah because the <Field.Label/> components has a flex and I cant override id as the classes are not merged so I wrapped it in a span to escape it

Copy link
Member

Choose a reason for hiding this comment

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

Ok, maybe we need a prop on the label to set the flex direction? Trying to reduce the amount of extra markup added to reduce the need for descriptors.

<Card.Actions>
{legalConsentEnabled && hasIdentifier && <LegalAcceptedField />}
Copy link
Member

Choose a reason for hiding this comment

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

Similar to the continue step, I feel like this should live within the body not the actions.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is how we render it on AIO right now, it's closer to the Continue button when sign up has identifier, when not having identifier and only having social buttons we put this closer to the social button (within the body), if this feels a bit close to the continue button it's probably because we need to adjust the gap

Copy link
Member Author

Choose a reason for hiding this comment

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

If this still does not look right to you, we can bring Alvish to take a look and after that I will make the appropriate changes

Copy link
Member

Choose a reason for hiding this comment

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

ok, either way lets make it consistent. Looks like in the continue step its placed in the body.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah it's different there though as we wanted to have it on the body, because it's one of the missing fields and it didn't looked right when we were looking the designs with Alvish

asChild
>
<Field.Root>
<div className='flex justify-center gap-2'>
Copy link
Member

Choose a reason for hiding this comment

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

Will want to replace the gap-2 usage here with padding left on the label.

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense!

@octoper octoper force-pushed the vaggelis/user-744-implement-legal-consent-on-elements branch from 9fcb62f to 0a36c31 Compare October 30, 2024 18:08
Copy link
Member

@tmilewski tmilewski left a comment

Choose a reason for hiding this comment

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

Per Elements, 👍. Leaving the rest up to @alexcarpenter.

Copy link
Member

@alexcarpenter alexcarpenter left a comment

Choose a reason for hiding this comment

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

👍🏼 will tackle any tweaks in a follow up pr. Thanks @octoper!

@octoper octoper force-pushed the vaggelis/user-744-implement-legal-consent-on-elements branch from 8758130 to eadc5de Compare October 31, 2024 10:25
@octoper octoper enabled auto-merge (squash) October 31, 2024 11:25
@octoper octoper merged commit 434b432 into main Oct 31, 2024
26 checks passed
@octoper octoper deleted the vaggelis/user-744-implement-legal-consent-on-elements branch October 31, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants