Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
search.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 May 2015 at 20:39 UTC
Updated:
11 Aug 2015 at 12:04 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
manjit.singhComment #2
manjit.singhmoving to classy :)
Comment #3
manjit.singhComment #4
lewisnymanNice! This looks simple, now we just need some screenshots in Classy.
Comment #5
sqndr commentedAdding Novice tag to the issue for screenshots.
Comment #6
lauriiiNeeds work for needs tag
Comment #7
epophoto commentedAre these screenshots all that is needed here then?
Comment #8
jstollerI think the screenshots we need are to show that the output from Classy is the same before and after the patch. As long as Stark works it doesn't need to look pretty, but moving the CSS here shouldn't break anything coming out of Classy.
Comment #9
manjit.singhbefore and after screenshots are same in classy :)
Comment #10
jstollerBased on the discussion at #2489460: [Meta] Move module.theme.css files to Classy or Seven, at this point library names in Classy should match what is in the core module. So,
search-resultsshould besearch.results.Comment #11
pjbaertI processed the remarks mentioned by @jstoller in #10 in this patch.
Comment #12
sqndr commentedIf the test passes, we need some new screenshots. Thanks for working on this pjbaert!
Comment #13
manjit.singh3rd and 4th screenshots have some issue at right side while capturing due to scrollbar ;)
Comment #14
jhodgdonThis change does not make sense to me.
The code that makes the ol.search-results is in the SearchController:
It is *not* in the Classy theme. So the CSS should remain here in the Search module.
Also it definitely is not part of the individual search result template, it is the overall list that contains the individual search results. So I think this is a Works as Designed issue. You'd need to totally rework this code in order to make it part of Classy, and we got rid of the search results template in 8 because it wasn't really doing anything and made it a classed OL list instead on purpose.
Comment #15
jstollerBased on the original Consensus Banana in Austin, all markup and CSS that isn't absolutely required for the bare minimum functionality of a module should be moved to Classy. Later this was revised, compromising with Core branch maintainers, so that code dealing with purely administrative functions would stay in the core modules, but all public-facing markup would still move to Classy. This was reaffirmed at the DrupalCon sprint in LA.
There are a number of grey areas we're finding, but it seems like search results unambiguously fall into the public-facing side of this split. Technically the search module shouldn't be making any markup decisions here. I don't know if that is possible at this point, but we should try to get as close to the ideal as we can. If we can move the CSS to Classy then we should do so, even if the classes it is styling are coming from the SearchController.
Comment #16
jhodgdonOK. Well we'll need a completely different patch then.
The search module controller is not really making a markup decision. It is only saying "This is an ordered list of items of type search results" in its render array.
Then the CSS is only saying "yeah it's an ordered list, but normally you wouldn't want the numbers on it".
I don't see how this can/should be moved to Classy, but am happy to review patches that do it.
Comment #17
lewisnymanIt looks like this class was missed during #2322163: [meta] Consensus Banana Phase 1, move CSS classes from preprocess to twig templates. - I've opened #2495419: Move the 'search-results' class from the render array and into a Classy template so we can move the classy into Classy before we move the CSS here.
Comment #18
jhodgdonTime to make this Active again, as the classes are now in Classy rather than the render array. So I think all that remains here is to move the CSS file?
Comment #19
star-szrAt a glance it looks like maybe a reroll of #11 would do the trick.
Comment #20
saki007sterrerolled the patch in #11
Comment #21
saki007sterComment #22
star-szrLooks reasonable, thanks @saki007ster! Needs screenshots/manual testing now.
Comment #23
manjit.singh@cottser I am searching text with keywords "test content". but there is no result with that keywords. After that i am searching with advance search and but previous keywords not going override with the new keywords i enter in advance search. Is that issue or its part of functionality.
adding screencast !!
Comment #24
jhodgdonWhat we need to test manually:
a) Create some content and run Cron so that you have something to search.
b) Search for keywords in your content.
==> Then for both Stark and Classy themes (and also for Bartik maybe, just to be sure?), we would want to verify that the markup and look of the search results page are as expected (before and after screen shots of the output and the markup would be helpful).
But... Before we do that... I'm looking at this patch, and it doesn't actually move the search.theme.css file to the Classy theme. So we need to fix that first.
Comment #25
star-szrThis should move the file, but it's subtle if you're just looking at the patch file.
Comment #26
jhodgdonDoh! I missed that. Sorry!
Comment #27
jhodgdonI was going to test this and make screen shots today but the patch does not apply.
Comment #28
star-szrRerolled after #2491259: move search.admin.css into seven. Thanks @jhodgdon!
Comment #29
jhodgdonHm. The CSS file is providing CSS for the ol.search-results list as a whole. This is attaching it in the template for each individual search result... but I guess that is OK, because we don't need the list style if it's an empty list I guess. And I hope/suspect Drupal is smart enough only to attach the CSS file once per page.
So, that aside, let's see about screen shots. To make these, I used Standard profile, added a node to the site, ran cron, and took screen shots of the search results page with Classy and Bartik.
They look identical to me. Seems good to go. Thanks!
Comment #30
jhodgdonComment #31
lewisnymanAce, thanks for the work here.
Comment #32
alexpottThe theme layer is not yet frozen. Committed 42ff057 and pushed to 8.0.x. Thanks!
Comment #34
lauriiiFor some reason this breaks my sites CSS/JS optimization. I don't have any clue why it happens.
Comment #35
lauriiiNothing to worry about. Bug was something that has nothing to do with this issue