Skip to content

Conversation

@LauraBeatris
Copy link
Member

@LauraBeatris LauraBeatris commented Feb 13, 2025

Description

  • Introduce minimum length to trigger organization memberships search query
  • Refactor and simplify debouncing logic to use useDebounce hook instead of relying on keyup event
  • Update search row width to be partial based on the parent
CleanShot.2025-02-13.at.20.31.57.mp4

Checklist

  • pnpm test runs as expected.
  • pnpm 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:

@LauraBeatris LauraBeatris self-assigned this Feb 13, 2025
@changeset-bot
Copy link

changeset-bot bot commented Feb 13, 2025

🦋 Changeset detected

Latest commit: c264dc2

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

This PR includes changesets to release 23 packages
Name Type
@clerk/clerk-js Minor
@clerk/types Minor
@clerk/localizations Minor
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/elements Patch
@clerk/expo-passkeys Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/clerk-react Patch
@clerk/remix Patch
@clerk/shared Patch
@clerk/tanstack-start Patch
@clerk/testing Patch
@clerk/themes Patch
@clerk/ui Patch
@clerk/vue 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

@vercel
Copy link

vercel bot commented Feb 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2025 6:40pm

@LauraBeatris LauraBeatris force-pushed the laura/org-profile-members-search-validation branch from 905a136 to 89921a1 Compare February 13, 2025 21:48
@LauraBeatris LauraBeatris force-pushed the laura/org-profile-members-search-validation branch from 89921a1 to 8e3956a Compare February 13, 2025 21:49
@LauraBeatris LauraBeatris force-pushed the laura/org-profile-members-search-validation branch from 8e3956a to 4ba3605 Compare February 13, 2025 21:53
@LauraBeatris LauraBeatris force-pushed the laura/org-profile-members-search-validation branch from 61cfb18 to 5f0b04c Compare February 13, 2025 22:40
@LauraBeatris LauraBeatris force-pushed the laura/org-profile-members-search-validation branch 4 times, most recently from c5df69c to 383e89e Compare February 13, 2025 23:02
@LauraBeatris LauraBeatris force-pushed the laura/org-profile-members-search-validation branch from 52245bc to e829bb9 Compare February 13, 2025 23:24
@LauraBeatris LauraBeatris force-pushed the laura/org-profile-members-search-validation branch from d97775f to 4de61aa Compare February 13, 2025 23:34
@LauraBeatris LauraBeatris marked this pull request as ready for review February 13, 2025 23:34
@LauraBeatris LauraBeatris requested a review from a team February 13, 2025 23:35
return (
<Animated asChild>
<Flex sx={{ width: '100%' }}>
<Flex
Copy link
Member

Choose a reason for hiding this comment

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

We should follow up with descriptors for these elements. There currently is no way to target MemberSearchForm elements with the appearance prop.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a descriptor for the container on 8e0b49d

Now we have the following:

CleanShot 2025-02-14 at 13 58 49

<Field.Root {...searchField}>
<InputWithIcon
value={value}
{...searchField.props}
Copy link
Member

Choose a reason for hiding this comment

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

This is resulting in a bunch of warnings for passing invalid dom props.

Screenshot 2025-02-14 at 11 26 57 AM

Copy link
Member Author

@LauraBeatris LauraBeatris Feb 14, 2025

Choose a reason for hiding this comment

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

😢 Ooff, thanks for catching that! I forgot to sanitize the input props... going to push a fix for that

Copy link
Member Author

Choose a reason for hiding this comment

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

Pushed a fix on 4a53af3 - we currently only rely on the blur + focus event handlers from the useFormControl context

@LauraBeatris LauraBeatris changed the title chore(clerk-js): Introduce minimum length for organization memberships search chore(clerk-js,types,localizations): Introduce minimum length for organization memberships search Feb 14, 2025
@LauraBeatris
Copy link
Member Author

I'll do another review through the changes next week, will avoid merging on a Friday

@LauraBeatris
Copy link
Member Author

LauraBeatris commented Feb 17, 2025

We decided to park these changes for now in favor of not affecting the UX here due to this "jump" behavior of the input validation.

FAPI PR has also been closed there we won't get a 4xx error even if the query gets sent with less than 3 characters.

Let's keep analyzing the logs for the query performance, and decide later to react on the FAPI data layer instead of forcing the UI to not trigger the query.

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.

7 participants