Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does an amp-search-bar extension make sense? #4071

Closed
Meggin opened this issue Jul 14, 2016 · 10 comments
Closed

Does an amp-search-bar extension make sense? #4071

Meggin opened this issue Jul 14, 2016 · 10 comments

Comments

@Meggin
Copy link
Contributor

Meggin commented Jul 14, 2016

I'm currently working on a dictionary definition AMP sample, and one thing very common to dictionary definitions is the ability to easily change the word you are looking at.

It occurred to me that the same could be said if I am in an article, I may want to search for another article on a different topic.

The search box for a dictionary definition could be straight forward-- a simple bit of javascript that changes the url. The article search is trickier-- it could mean integrating with third party search engines (CSE, for example).

Outside the scope of AMP?

@rudygalfi
Copy link
Contributor

The searchbox itself should be implemented with forms (#3343) once that's available. There's also a feature request for autocomplete in #3403 that could let you jump from AMP page to AMP page via a suggest experience.

Search results pages themselves are out of scope for AMP because they are fundamentally not cacheable experiences.

@jpettitt
Copy link
Contributor

@rudygalfi you wrote "Search results pages themselves are out of scope for AMP because they are fundamentally not cacheable experiences." - is that the scope definition you are working to?

It seems a bit narrow to me. Yes you want cacheable for the carousel/cdn. However there are plenty of cases where having a really fast mobile page, with a cached javascript framework that manages load priorities, would be a good thing. Our internal roadmap is to have entire sites be AMP when that's practical. That makes your statement somewhat worrying, can you clarify?

@rudygalfi
Copy link
Contributor

OK, I think I was reasoning through this incorrectly. Disregard my previous comment "Search results pages themselves are out of scope for AMP because they are fundamentally not cacheable experiences" and replace with:

Search results pages should work in AMP. Something to be mindful of is supporting GET behavior on the in-progress form support so that you get from searchbox to loading a new page with the results in AMP, but this should be possible in an AMP context. This should also work in the cache context, though it obviously increases the entropy of what an AMP cache might need to handle.

cc @cramforce for context on our earlier conversation and if you have anything to add to the discussion.

@rudygalfi rudygalfi added this to the Current milestone Jul 19, 2016
@msroberts
Copy link

Is it possible, using amp-form, to integrate with a CSE such as Google Custom Search? If not, would this be added in the future?

@rudygalfi
Copy link
Contributor

I will direct Google Custom Search folks to this thread so that they might respond.

@gigster99
Copy link

Important for our pages also! Currently, we have to launch a non-AMP JS page for Google Custom Search. GCS is important because it works well with our JSON-LD structures.

@godofdream
Copy link

Hi, are there any further outcomes of this? I could need this for an onlineshop I'm creating.

@rudygalfi
Copy link
Contributor

@msowka-ninja Are you asking about Google Custom Search or searchbox functionality generally?

For searchbox, I'd invite you to take a look at amp-form. I don't have any updates on the Google Custom Search support, though.

@jaygray0919
Copy link

Half way there, Rudy. But how do we run a 'search' function on the form? We use 'amp-forms' for 'registration' and 'requests' by posting JSON from user submissions. But we don't see how to build an 'amp-compliant-form' that searches the JSON-LD structures on AMP pages. From our perspective, cache is not an issue, as the JSON-LD is part of the cache. The issue is using search to find the amp-page with the JSON-LD 'of interest'. A secondary issue is finding non-JSON-LD strings that can be registered with Google Custom Search. There, your point about cache come into play because those strings cannot be stored in a amp-compliant manner. So, for version 1, we propose to limit search to content in the JSON-LD.

@aghassemi
Copy link
Contributor

closing for #9785 which is implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
UI
  
Content ecosystem
Development

No branches or pull requests

10 participants