umbraco / Umbraco.Marketplace.Issues

Public issue tracker for Umbraco Marketplace
2 stars 0 forks source link

Apply type search to search input #61

Closed bjarnef closed 11 months ago

bjarnef commented 1 year ago

The search input should also use type="search" instead of type="text" (the browser clear icon can eventually be hidden using CSS).

It also implements potential action in https://schema.org/SearchAction :

<script type="application/ld+json">
    {
        "@context": "https://schema.org/",
        "@type": "WebSite",
        "name": "Umbraco Marketplace",
        "url": "https://marketplace.umbraco.com/",
        "potentialAction":
        {
            "@type": "SearchAction",
            "target": "https://marketplace.umbraco.com/search/{search_term_string}",
            "query-input": "required name=search_term_string"
        }
    }
</script>

but the name attribute of the search input doesn't match search_term_string: https://stackoverflow.com/a/29341196

image

AndyButland commented 12 months ago

I'm not sure we can do too much about the misspelt packages really. We are using Azure Cognitive Search under the hood, which kind of means we have to take what it returns for results of a query. We do have a minimal set of synonyms mapped - but that's a list we maintain and it's not really feasible to add all different misspellings of packages.

@nathanwoulfe - could you have a look at the second part please to see if there's some presentation updates we should make please?

AndyButland commented 11 months ago

type="search" has been added to the search input box now. Thanks for the suggestion @bjarnef.

bjarnef commented 11 months ago

Mainly to show a optimzed virtual keypad on mobile and tablet devices, but also a bit more semantic correct nowadays.

Screenshot_20231003_083250_Chrome