How to use with Olivero's dropdown search bar?

Created on 23 May 2022, over 2 years ago
Updated 20 July 2023, over 1 year ago

I'm starting to utilize the new Olivero theme in projects, including the new user-friendly dropdown search. So far I can't figure out how to get search_autocomplete to work with Olivero's new styling. Any suggestions or advice greatly appreciated!

πŸ’¬ Support request
Status

Fixed

Version

2.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States w01f

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡«πŸ‡·France Dom.

    Hi !

    I did not forgot you, but I did not either find a way at the moment. I will let you know.

  • πŸ‡ΊπŸ‡ΈUnited States w01f

    Hi Dom!

    I "fixed" this for one of my sites with the following. Note: I ripped this straight from an internal ticket, so if anything doesn't make sense just let me know!

    I've added initial CSS code to make the autocomplete dropdown work with the Olivero theme search block, and included it below.

    Next Steps

    • The code isn't particularly pretty, so it needs to be assessed for any potential improvements.
    • The code then needs to be added to the Timbers Module? I'm guessing that's the best standard place to put it, unless there's another suggestion - some location to bundle our Olivero/Claro theme overrides and additions.
    • Whatever module this code is added to would need a note and additional code for the dependency on the autocomplete module.
    • Let's add some easy UI customization options such as:
      • Colors
      • Headings alignment (left/center/right)
      • Results alignment (left/center/right)
      • anything else?
    • Assess if/what other settings we need to add to make this work or disable it for responsive.
      • Please test on standard tablet and mobile sizes

    Testing

    Let's implement and test these changes/updates first.

    Code

    /* Search overrides and styling */
    .search-block-form .search-form .ui-menu .ui-state-focus,
    .search-block-form .search-form .ui-menu .ui-state-active {
    margin: 0;
    }
    .search-block-form .block-search-wide__wrapper {
    overflow: visible;
    }
    .search-block-form .search-form > ul {
    display: block !important;
    visibility: hidden;
    max-height: 0;
    width: auto !important;
    top: inherit !important;
    bottom: 0;
    overflow: hidden;
    transform: translateY(calc(100% + 1px));
    transition: max-height .3s .2s;
    }
    .search-block-form .is-active .search-form > ul {
    visibility: visible;
    max-height: 40rem;
    }
    .search-block-form .search-form > ul[data-sa-theme="basic-blue"] a.ui-menu-item-wrapper,
    .search-block-form .search-form > ul[data-sa-theme="basic-blue"] a.ui-menu-item-wrapper.ui-state-active {
    border-bottom: 0;
    }
    .search-block-form .search-form > ul > .ui-autocomplete-field-group {
    color: #fff;
    background-color: #7e0e00;
    }
  • Status changed to Needs review over 1 year ago
  • πŸ‡«πŸ‡·France Dom.

    Hi!

    Thanks @W01F for this excellent share. Using it, I was able to write a patch for Olivero.
    It works well on Drupal10, but I experience some little quirks with Drupal9.

    • Dom. β†’ committed e86036e1 on 3.x
      Issue #3281956 by Dom., W01F: How to use with Olivero's dropdown search...
  • Status changed to Fixed over 1 year ago
  • πŸ‡«πŸ‡·France Dom.

    Will be added to release 3.0

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Fixed over 1 year ago
Production build 0.71.5 2024