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

docs: clicking outside search results should hide hits #11925

Merged
merged 5 commits into from
Oct 2, 2024

Conversation

blan19
Copy link
Contributor

@blan19 blan19 commented Sep 30, 2024

☕️ Reasoning

Currently, a search hits view is persisting when clicking outside Doc Search component.

I've modified it so that when clicking outside the Doc Search component, the view is no longer returned while still maintaining the query.

{isSearchHitsVisible && (
  <NoResultsBoundary>
    <Hits
        hitComponent={Hit}
        className="fixed left-2 top-28 z-50 mt-[50px] max-h-[calc(100dvh_-_120px)] w-[calc(100vw_-_16px)] overflow-y-auto rounded-md bg-neutral-100 shadow-lg md:absolute md:left-auto md:right-0 md:top-12 md:mt-auto md:w-96 dark:bg-neutral-800 [&>ol]:flex [&>ol]:flex-col [&>ol]:divide-y [&>ol]:divide-neutral-400/30 [&>ol]:dark:divide-neutral-900/50"
      />
  </NoResultsBoundary>
)}

// search hits view is no longer returned
// but maintaining a query

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

fixes #11893

📌 Resources

@blan19 blan19 requested review from 0ubbe and ndom91 as code owners September 30, 2024 03:20
Copy link

vercel bot commented Sep 30, 2024

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

Name Status Preview Comments Updated (UTC)
auth-docs 🛑 Canceled (Inspect) Oct 2, 2024 9:36pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Oct 2, 2024 9:36pm

Copy link

vercel bot commented Sep 30, 2024

Someone is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

@balazsorban44 balazsorban44 changed the title fix: Doc Search outside click not hiding search hits docs: clicking outside search results should hide hits Oct 2, 2024
@balazsorban44 balazsorban44 merged commit 8c00815 into nextauthjs:main Oct 2, 2024
8 of 10 checks passed
@blan19 blan19 deleted the fix/issue-11893 branch October 2, 2024 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue: Outside click not hiding search results
2 participants