docs icon indicating copy to clipboard operation
docs copied to clipboard

feat: Linkable search

Open nilubava opened this issue 2 years ago • 10 comments

Describe this PR

Changes

What issue does this fix?

Any other relevant information

nilubava avatar Aug 03 '22 15:08 nilubava

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

Name Status Preview Updated
docs ✅ Ready (Inspect) Visit Preview Aug 16, 2022 at 11:11AM (UTC)

vercel[bot] avatar Aug 03 '22 15:08 vercel[bot]

Deploy Preview for prisma2-docs ready!

Name Link
Latest commit f6d8fbc8dda8f9737a1ae97136ae6bdbc80331a0
Latest deploy log https://app.netlify.com/sites/prisma2-docs/deploys/62fb7ab8a4108200084b3f9f
Deploy Preview https://deploy-preview-3556--prisma2-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Aug 03 '22 15:08 netlify[bot]

This PR changes the following pages (Netlify/Vercel Preview Deploy links):

Changed Netlify links

Changed Vercel links

(Note that links will only be valid after Netlify/Vercel preview deploy succeeded)

github-actions[bot] avatar Aug 03 '22 15:08 github-actions[bot]

@nilubava https://docs-git-linkable-search-prisma.vercel.app/?query=mongo&page=1 looks like this for me in Firefox / Chrome Screen Shot 2022-08-03 at 17 27 23

It does open the search box and adds the keyword, but it doesn't load the results.

Jolg42 avatar Aug 03 '22 15:08 Jolg42

@Jolg42 Can you check now?

nilubava avatar Aug 03 '22 18:08 nilubava

Does update URL, which is linkable: https://docs-git-linkable-search-prisma.vercel.app/?query=referential&page=1

Clicking into search box shows endless spinner though and seems to load things 🔴

Are pages like https://docs-git-linkable-search-prisma.vercel.app/?query=test&page=1 indexable by Google? They optimally should not be (even when discovering these should be hard for Google - but they are not for example linked here.)

janpio avatar Aug 03 '22 22:08 janpio

@nilubava It does work and loads results on my browser (Firefox) after I cleared the cache, nice!

@janpio we could add these query parameters to the robots.txt file to ignore them like this

# duplicated so we can ignore them independently of their position in the url
Disallow: /*?query=*
Disallow: /*?page=*
Disallow: /*&query=*
Disallow: /*&page=*

Jolg42 avatar Aug 04 '22 08:08 Jolg42

@janpio "Clicking into search box shows endless spinner though and seems to load things 🔴" can you give me the steps to reproduce this?

nilubava avatar Aug 15 '22 12:08 nilubava

  1. Open https://docs-git-linkable-search-prisma.vercel.app/
  2. Click into search box
  3. Observe endless spinner and visual impression it loading stuff over and over

janpio avatar Aug 15 '22 16:08 janpio

Indeed, the search works when you enter a keyword. But the endless spinner is unexpected when clicking on search, the input is empty and looks like this Screenshot 2022-08-15 at 18 03 44

Jolg42 avatar Aug 15 '22 16:08 Jolg42

@Jolg42 @janpio Can you confirm if this is good to go?

nilubava avatar Aug 19 '22 07:08 nilubava

Looks good to me 👍🏼

Jolg42 avatar Aug 19 '22 08:08 Jolg42