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

Move $enable_keywords out of the default layout #271

Closed
adamjohnson opened this issue Jun 25, 2020 · 4 comments
Closed

Move $enable_keywords out of the default layout #271

adamjohnson opened this issue Jun 25, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@adamjohnson
Copy link
Contributor

Steps to reproduce the issue

  1. Open the Design System > Views > Layouts.
  2. Open default.html
  3. On lines 71-78, there is code for the Big Search component.

Results

This code puts an editable region for keywords for the Big Search component.

Expected results

Instead of having this in the default layout (and thus having to process the value of the $enable_keywords variable and resulting radius code), this should be moved to the Big Search partial and inserted into the layout via page_js with <r:content_for>.

The hope here is to minimize the amount of processing CleanSlate has to do for every single page; thus, improving performance (in this case, Time to First Byte / Server Response Time).

This also tightly couples this code together with its component and makes it less confusing as to what it is.

@adamjohnson adamjohnson added the enhancement New feature or request label Jun 25, 2020
@adamglenn
Copy link
Contributor

This code doesn’t apply to pages with the Big Search component, but any page in the site that is searchable by that component. The Big Search searches the keyword editable region of other pages and displays pages with those keywords on a Big Search Results page. So it could be any page that needs the region.

@adamglenn
Copy link
Contributor

What should happen is that this code should just be omitted by default and inserted only into themes that use the Big Search, since we are encouraging people to do stuff manually now anyways, and the Big Search is seldom used.

@adamjohnson
Copy link
Contributor Author

Should the custom page data in config.yml be removed too, or just the HTML from the default layout?

I suppose I'd vote remove both.

@adamglenn
Copy link
Contributor

Both. I just need to add documentation to the Big Search implementation notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants