OpenSourceOrg / dotOrg

Public tracker of opensource.org issues
GNU General Public License v3.0
7 stars 1 forks source link

Update the Search Results Page #77

Closed jonesch closed 3 weeks ago

jonesch commented 1 month ago

Description

We'd like to update the Search results page to better showcase pages, posts, and other content while continuing to use the Table format that works rather well for the licenses.

Given that we're aiming to have two different layouts/formats on the Search Results page, one for License Post Type and one for everything else, I think we have two options.

The Search results will default to 10 items; I suggest we change that query to pull 20.

Option 1

We can NOT have any pagination, but just display 10 Posts/Pages, and then display 10 of the License post type. I put together that mockup here: opensource org_s=ethical-practice

Option 2

Would have the same layout as Option 1, but we could could pagination. On the search results, we'd loop through the 20 results and return Posts/Pages to one Bucket. And then Licesns to another bucket. And then display them in the same layout as Option 1. But the results/buckets might be uneven - Page 1 of Search Results could be 17 Posts/Pages and 3 Licenses. Then on Page 2, it could be 16 Licenses and 4 Posts/Pages. The layout/results might be uneven, but it would allow us to keep pagination and loop through the Search by 20 items at a time and display each in their appropriate section.

Additional context

No response

ajolo2ky commented 1 month ago

Hi, thanks for putting this together! I think Option 2 makes more sense in the interest of the user who is trying to search for something. Let's move forward with that.

smaffulli commented 1 month ago

Honestly I don't like any of these options.

Can't WordPress search be faceted by post type? One could select to search blog only, meeting minutes, directors, licenses, press mentions, etc? That's the best solution.

On Fri, May 17, 2024, 17:55 Ariel Jolo @.***> wrote:

Hi, thanks for putting this together! I think Option 2 makes more sense in the interest of the user who is trying to search for something. Let's move forward with that.

— Reply to this email directly, view it on GitHub https://github.com/OpenSourceOrg/dotOrg/issues/77#issuecomment-2118426599, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKJJADMNT5MVA3DSSDMEHLZCZ4GFAVCNFSM6AAAAABH4XJQT2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJYGQZDMNJZHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jonesch commented 1 month ago

Howdy @ajolo2ky and @smaffulli -

Jetpack offers a Search tool that we could also try out. We spun up a new development site to test it and made small adjustments to match the styling. You can preview it here: https://open-source-initiative-jetpacksearch.mystagingwebsite.com/?s=What%20is%20Open%20Source

To @smaffulli's point above: search be faceted by post type?, it addresses that by allowing folks to filter their Search Results based on those post types, by years, and/or categories.

Have a look and let us know what you think of this as an option!

smaffulli commented 1 month ago

that's what we need but not with Jetpack! We don't want to manage cookies, we have a strict requirement not to ever require a cookie banner on our sites. Those banners are just awful.

Is there a search plugin that doesn't require a cookiebanner?

jonesch commented 1 month ago

We have Jetpack installed on the production site and this staging site (where we have Jetpack Search active). Knowing your cookie policy, Jetpack does not load cookies on a user's device, so there is no need for a Cookie Banner. The Complianz plugin installed on the site offers the ability to block plugins from loading cookies, and Jetpack is already on that block list.

While Jetpack does use and occasionally requires Cookies for certain features, they are not needed to use Jetpack Search. Jetpack Search tries to load a Cookie with an anonymous ID for usage stats, but Complianz is blocking that for you.

If you use Jetpack Search, no new cookies will be added. Your site will still have zero cookies loading for any visitors.

smaffulli commented 1 month ago

Ok, I based my comment on the scan I ran on the staging site that showed 6 performance cookies being loaded by the search page. If no cookies are added, go ahead and use Jetpack search then. Thanks

On Thu, May 23, 2024, 19:35 Christopher W. Jones @.***> wrote:

We have Jetpack https://jetpack.com installed on the production site and this staging site (where we have Jetpack Search active). Knowing your cookie policy, Jetpack does not load cookies on a user's device, so there is no need for a Cookie Banner. The Complianz plugin installed on the site offers the ability to block plugins from loading cookies, and Jetpack is already on that block list.

While Jetpack does use and occasionally requires Cookies for certain features https://jetpack.com/support/cookies/, they are not needed to use Jetpack Search. Jetpack Search tries to load a Cookie with an anonymous ID for usage stats, but Complianz is blocking that for you.

If you use Jetpack Search, no new cookies will be added. Your site will still have zero cookies loading for any visitors.

— Reply to this email directly, view it on GitHub https://github.com/OpenSourceOrg/dotOrg/issues/77#issuecomment-2127707698, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKJJAHYRVZ3O6UI2NQVWNLZDYSFBAVCNFSM6AAAAABH4XJQT2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXG4YDONRZHA . You are receiving this because you were mentioned.Message ID: @.***>

jonesch commented 1 month ago

HI @smaffulli - those cookies you saw were all from https://get.gaug.es/website-analytics/, which is an analytics software used by Pressable to track visitors to websites. We've removed those at a platform level for https://opensource.org/, but have not for the staging environment we have. Which would explain those cookies you saw (as we saw them as well).

We'll add Jetpack Search to the Production site and double-check to ensure that the domain continues to not load any cookies.

jonesch commented 3 weeks ago

@bernattorras - we are wanting to add Jetpack Search to the site and we've done that work over on: https://open-source-initiative-jetpacksearch.mystagingwebsite.com/

I don't have Write Permissions to this Repo, so can you update Lines 51-53 on the following file to the below code: https://github.com/OpenSourceOrg/dotOrg/blob/main/themes/osi/header.php#L51C1-L53

<a aria-label="Open Search" class="open-search open-button jetpack-search-filter__link" href="#">
    <?php OSI\SVG::the_svg( 'search' ); ?>
</a>

And also remove line 65 on: https://github.com/OpenSourceOrg/dotOrg/blob/main/themes/osi/header.php#L65

Can you push this on both develop and main?

bernattorras commented 3 weeks ago

@jonesch I've applied these changes to both the development and production sites and configured the Jetpack Search filters in the Search sidebar as in the development site.

Let me know if anything else is needed!

jonesch commented 3 weeks ago

Thank you, @bernattorras! I added a snippet of CSS in the Customizer to extend the Input form on the search bar 100%.

cc: @smaffulli and @ajolo2ky here as the Search is now live!

Closing this GH Issue out. ❤️