Skip to content

Share search markup for search#2934

Merged
sebastianbenz merged 1 commit intofuturefrom
search-template
Sep 11, 2019
Merged

Share search markup for search#2934
sebastianbenz merged 1 commit intofuturefrom
search-template

Conversation

@sebastianbenz
Copy link
Copy Markdown
Collaborator

See #2924

@sebastianbenz
Copy link
Copy Markdown
Collaborator Author

@westonruter do you need anything else for the blog integration?

Copy link
Copy Markdown
Collaborator

@matthiasrohmer matthiasrohmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! @westonruter, in case you're missing context: this will extend https://amp.dev/shared/header/ to also return the search markup.

@westonruter
Copy link
Copy Markdown
Member

OK, so right now the blog is doing:

#searchTriggerOpen,
.ap-o-burger-menu-label {
	display: none;
}

This styling could be removed with this deployed?

@sebastianbenz
Copy link
Copy Markdown
Collaborator Author

@westonruter Is there a way to test this before deploying?

@westonruter
Copy link
Copy Markdown
Member

westonruter commented Sep 10, 2019

Is there a dev URL for this change that we can point the blog to?

@sebastianbenz sebastianbenz merged commit 29d97b2 into future Sep 11, 2019
@sebastianbenz sebastianbenz deleted the search-template branch September 11, 2019 14:58
@westonruter
Copy link
Copy Markdown
Member

@sebastianbenz OK, so apparently this was deployed? So this can be tested now… and it breaks:

image

The issue appears to be that the fragment being pulled in is using optimized AMP, which the AMP plugin does not allow as input, causing them to be stripped out by the sanitizer:

image

It's currently not broken on https://blog.amp.dev, but it is broken on a https://test-amphtml-blog.pantheonsite.io/ presumably because the cached header.html hasn't expired yet, but within a week it will be broken once the transient expires.

I'll preemptively add .ap-o-search-container { display:none } to blog.amp.dev to prevent the breakage from showing up.

@westonruter
Copy link
Copy Markdown
Member

For some reason the [src] attribute on amp-list is getting dropped when the https://amp.dev/shared/header/ fragment is imported, and this is causing what @mattludwig pointed out:

image

@westonruter
Copy link
Copy Markdown
Member

The reason for the AMP validation error is that the validator is not properly accounting for data-amp-bind-src as being an alias for [src]. I've filed a bug: ampproject/amphtml#24661

@westonruter
Copy link
Copy Markdown
Member

For a quick fix, I've just stripped out the div#searchLayer until this is resolved.

@westonruter
Copy link
Copy Markdown
Member

@sebastianbenz What CSS specifically does this new search component require? It seems like frontend/scss/components/organisms/search.scss. Anything else?

@matthiasrohmer
Copy link
Copy Markdown
Collaborator

@sebil, can you confirm adding /css/components/organisms/search.css to the blog's CSS is enough to successfully render search for the blog?

@sebil
Copy link
Copy Markdown
Collaborator

sebil commented Sep 23, 2019

@matthiasrohmer there is also /components/molecules/search-trigger.css which is included via the header markup. Besides that it should be enough, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants