Git Product home page Git Product logo

Comments (6)

choldgraf avatar choldgraf commented on June 30, 2024 2

Oh nice - pinging @12rambau and @drammock who may also have thoughts, and probably more time than me since I'm the one with an infant now 🙂

from readthedocs-sphinx-search.

humitos avatar humitos commented on June 30, 2024 1

I just wanted to chime in into this conversation to let you know that are working on a new "js client" that will include all the Read the Docs Addons integrations: flyout, analytics, search as you type, etc.

This is not ready for users/authors to start using/integrating it yet; but I wanted to comment here in case you want to chime in there and follow the conversation/design.

It will be super helpful for us getting feedback from you so we can build something that's easy to integrate for theme authors and easy to use for writers 😉 . Note that this is a work-in-progress work and things will change a lot, but having feedback at this early stage could be helpful for us.

from readthedocs-sphinx-search.

ericholscher avatar ericholscher commented on June 30, 2024

@choldgraf The docs say that it attachs to an input element with the search role. So I think you just need to add role="search" to it. The code looks for an input below that:

inputField = document.querySelector("[role='search'] input");
if (inputField === undefined || inputField === null) {
throw "'[role='search'] input' not found";
}

There's definitely a chance that this will conflict with our hotkey integration in the extension, but we are definitely interested in making it work nicely.

from readthedocs-sphinx-search.

choldgraf avatar choldgraf commented on June 30, 2024

Sorry I did have clarified - the "input" thing is what I wasn't sure about. Because our buttons are just buttons, there is no input field inside them. Does that mean that this won't work w the extension? Or that we'd need to nest an empty and visible input field or something?

from readthedocs-sphinx-search.

ericholscher avatar ericholscher commented on June 30, 2024

@choldgraf presumably the input is the text field that the search term goes in after the popup is launched? Changing the integration to trigger on other actions shouldn't be hard, but might take a small change to the code. We can definitely look into this next week.

from readthedocs-sphinx-search.

choldgraf avatar choldgraf commented on June 30, 2024

Ya - there is an input field on the page, it is just not nested inside the search button. It exists in a standalone spot and is simply revealed when the search button is pressed.

from readthedocs-sphinx-search.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.