How to use with Olivero's dropdown search bar?

Created on 23 May 2022, almost 3 years ago
Updated 9 May 2023, almost 2 years 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

Needs work

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 almost 2 years 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 almost 2 years ago
  • πŸ‡«πŸ‡·France Dom.

    Will be added to release 3.0

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

  • Status changed to Fixed almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States w01f

    @dom, was this ported to the new 4.0 version? I just upgraded and I'm not getting results to show, though something else may have broken as well.

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

    Hi !
    Thanks for using this module and sorry for the troubles.

    My testing platform is a fresh D11 install, so maybe something interfere in the way.

    1. First, check that autocompletion is activated at : /admin/config/search/search_autocomplete. Especially the first one "search bar"

    2. Eventually clear the cache

    3. Test in the search bar (here Olivero 11.1.6):

    If this does not work, could you be more specific on your issue ?

Production build 0.71.5 2024