Problem/Motivation
Currently, at /community there is a block to search the documentation - as discussed at #943156: QA: Documentation search from Community home page this feels like a bait and switch.
However, at http://beta.drupal.org/handbook (which one gets to by clicking "Documentation" in the primary links) the search documentation block is not used.
It seems like a usability win to display the "Search Documentation" block on the Documentation landing page.
Proposed resolution
Remove the block from /community
#2376953: Add "Search Documentation" block to /documentation will handle where to put the block (if anywhere)
Remaining tasks
- (done in #15 by @Bojhan) usability review
- (done in #32 and #2376023: Change 'Documentation Search Block' CSS by @cafuego) integrate the css changes suggested in #25-27 to a patch and deploy on the dev site
- (done) get feedback from the docs working group (see #23 f.) as to if they want this search on the documentation page. (In other words, maybe this issue becomes just remove the documentation search from the community page). If they want it, on which pages?
- add deploy instructions to the issue summary for how to remove the block from /community
User interface changes
Documentation before

After
https://searchdocs-drupal.redesign.devdrupal.org/community
https://searchdocs-drupal.redesign.devdrupal.org/documentation
Community after (no block now)

API changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #33 | 944332-documentation-searchresults-after.png | 672.82 KB | kattekrab |
| #33 | 944332-documentation-search-after.png | 524.54 KB | kattekrab |
| #32 | 944332-search-documentation-31.patch | 10.59 KB | cafuego |
| #29 | communityafter.png | 333.09 KB | yesct |
| #29 | communitybeforeresult.png | 624.6 KB | yesct |
Comments
Comment #1
tvn commentedMoving to D.o project as Redesign is over. Postponing till we are on D7.
Comment #2
dww+1 to this.
At the very least we should add the "Search documentation" block to the top of /documentation (even if removing it from /community is contentious). That seems like a trivial and obvious win. If we wanted to just manually change the block visibility configuration on the live site, I'm 95% sure it would survive the D7 upgrade and keep working (and it'd be easy to verify on the next automated site rebuild). So, if there's no objection, we don't necessarily have to postpone this until D7. However, if it's going to require lots of discussion, review, argument, etc, then yeah, that'd be a distraction from the D7 launch, in which case postponed is fine.
Cheers,
-Derek
Comment #3
mgiffordComment #4
mgiffordThis is still an issue. I should have posted that in January.
https://drupal.org/documentation
Comment #5
mgiffordComment #6
mgiffordI don't seem to have write permissions here at the moment:
/var/www/dev/search_api-drupal.redesign.devdrupal.org/htdocs/sites/default/modules/drupalorg/drupalorg/drupalorg-community.tpl.php
But this is a diff which will remove this block. I haven't figured out how to insert
<?php print $help_form; ?>into the documentation where it belongs.I'm also not sure why it's called $help_form... $documentation_search would be better...
EDIT: The help text on the right sidebar documentation page is controlled here /admin/structure/block/manage/block/56/configure
We just need to make $help_form a block and then control it the same way.
Comment #7
kattekrab commentedyeah - can we please do this? the documentation search box on the community page makes no sense at all. it should be on the documentation page.
Perhaps for a short period of time we could replace the search box on the community page with a new block that says something like...
"Looking for community documentation? Try https://drupal.org/documentation" or something.
I dunno if @mgifford's patch works - but if it does, let's do this already! :)
Mike - thanks for unpostponing this too! It bugs me everytime I end up on the community page :)
Comment #8
mgiffordI don't have permission to write to files where I have been working. I've got to follow-up on IRC to figure out where to best do this since the environment I was working in I no longer have write permission to:
https://drupal.org/comment/8595609#comment-8595609
Comment #9
drummThe supporting code in
drupalorg_preprocess_drupalorg_community()also needs to be moved.Please choose a different dev site to work with or request a new one, if you are able to work on this issue.
Comment #10
cafuego commentedAttached patch removes the search form code in
drupalorg_preprocess_drupalorg_community()and also removed the now unused variable from the template, like @mgiffords patch.Additionally, I've added a block in drupalorg_search that will now generate the 'Search Documentation' block, so it can be placed as normal. I've renamed the associated javascript file from community.js to documentation.js.
The search textfield title is now changed to the placeholder text, as the block has a title that matches what the textfield title was. The placeholder text as-is is too big, so that will need a change. Content people? Ideas? Bueller?
I've clagged it on tvn-drupal.redesign.devdrupal.org, as I had write access there (sorry Tatiana ;-) so you can check it there.
Comment #11
kattekrab commentedWow! Thanks @cafuego.
I jumped into the devsite and took a couple of screenshots. The new block needs work before it can be placed on the docs page - but removing it from community, and turning it into a proper block is a great step!
Comment #12
kattekrab commentedNeeds work from a front endy kind of person.
Comment #13
mgiffordIs there a "Needs usability review" for d.o?
Comment #14
yesct commentedComment #15
Bojhan commentedSounds very sensible to me.
Comment #16
mgiffordOk, it's been over 4 years. Looks like it has front end approval. Let's get this in.
Comment #17
jhodgdonUm. So in #11/#12, kattekrab said the doc block cannot be used in its present form, and then in #16 mgifford set this to RTBC. Which one is right?
Also, can we postpone actually acting on this until the Documentation Working Group has had a chance to review the idea? I cannot speak for the whole group and as far as I know, the ping I got today in IRC from kattekrab is the first attempt to contact the Documentation Working Group about this change (which obviously affects documentation).
And can we get a working dev site to look at this on? Right now https://tvn-drupal.redesign.devdrupal.org/community is broken (theme/CSS problem).
Comment #18
tvn commentedhttps://searchdocs-drupal.redesign.devdrupal.org/ will be ready in about 2 hours.
Comment #19
cafuego commentedThanks tvn! Mango juice for you!
I've applied the patch on https://searchdocs-drupal.redesign.devdrupal.org/
[edit]
Awww, actually, the dev site is WSODing. The log tells me "PHP Fatal error: Call to undefined function drupal_bootstrap() in /var/www/dev/searchdocs-drupal.redesign.devdrupal.org/htdocs/index.php on line 20". It *looks* as if all of Drupal is definitely present on disk and the selinux context looks ok, so I'm not sure what's going wrong. Would you be able to have a look, tvn?
Comment #20
drummI didn't see a notification for the edit, since it was an edit, so this reply is late.
I restarted PHP-FPM and the WSOD is resolved.
Comment #21
MixologicThe dev server had a php issue that's been resolved. I doesnt seem as though the patch is applied however.
Comment #22
cafuego commentedCorrect, I unapplied the patch just in case it was causing the PHP issue.
Reapplied the patch, configured the block, for your review enjoyment at https://searchdocs-drupal.redesign.devdrupal.org/documentation and https://searchdocs-drupal.redesign.devdrupal.org/community :-)
ps: Thanks drumm!
Comment #23
jhodgdonThanks!
I tried this out on the dev site and I think it needs a bit of work before we should deploy it -- and most of these comments probably apply to the existing box on the Community page as well:
a) There's apparently placeholder text in the text field but it gets cut off:

(this is not present on drupal.org/community and I think we should get rid of it)
b) There is a lot of space below the search block. I'm not sure where this is coming from but it needs to be reduced. (this is not present on drupal.org/community)
c) Is this accessible? Needs testing to see if users of screen readers:
- Understand that when they type in the box, a search is done in real time
- Are notified that results are appearing and/or changing
d) I am not sure about the number of results and the display in general... The list can be quite long (I think there are about 20 shown?), and there is no context on the results like what you would get if you went to Search (with your search terms highlighted). In particular, it's definitely possible to get a result that doesn't include your search term in what is displayed (page title only).
So it might make more sense to show about 5 results and link to the full search page (what you'd get if you used the main Search box in the header and then limited results to type Documentation)? As it is now there is no real indication of whether or not there are more results than those shown, or how many there might be.
e) CSS - I found the separation between one result and the next result to be very subtle if not invisible. There is a horizontal rule between results, but it is definitely not an accessible color contrast (if I, who luckily have more or less normal vision, thought it was nearly invisible, what about someone with vision issues?).
f) The Docs Working Group is having a meeting next week and we'll discuss this there as well. Things to decide:
- Do we want this search box?
- If so, on which pages?
- If not, should we consider an alternative like a non-Ajax box that mimics the main site search box but limits the results to documentation pages?
Comment #24
jhodgdonHm, my image tag for the subtle results didn't get into that comment:

Comment #25
kattekrab commentedThanks @jhodgdon! I'm really glad you've had a chance to take a look at this issue now.
I think fixing the actual search results, is out of scope on THIS issue, but is definitely something that needs to be addressed. Shall we create a follow up issue for that?
This issue is focussed on moving the "search documentation" box from the community page, to the documentation page, because it seems to make more sense for it be there, and it doesn't make sense on the community page.
Making that change proved to be tricky, because it was custom code, rather than a matter of moving a block. That's the work that @cafuego has done. He has said he's not a front endy kind of person, so can't help with that bit.
I agree the text inside the search field itself should go, and that there's too much space around that field. I think I can tweak those things using inspect element, and will take a couple of screen shots.
There's also a throbber thing, that's invisible at the moment, but twiddling with the CSS reveals it.
Removed placeholder="Search Documentation" from the input field
And remove padding and margin and width in a couple of spots led to this.
Comment #26
kattekrab commentedand screengrabs from my inspect element twiddles - in case that's helpful.
Comment #27
kattekrab commentedComment #28
kattekrab commentedComment #29
yesct commentedadding before images to the issue summary.
once the css changes from @kattekrab get into the patch/dev site, we should add after screenshots also.
Created
#2376009: Fix accessibility of "Search Documentation" block
and
#2376011: Improve usability of "Search Documentation" block (which mentions re-using the search from the header in some way)
added remaining tasks to the issue summary
Also, this seems more like a task than a feature request.
Comment #30
yesct commentedComment #31
kattekrab commentedthanks @YesCT =D
Comment #32
cafuego commentedI've opened a new issue (#2376023: Change 'Documentation Search Block' CSS) on Bluecheese to change the search block CSS and the patch attached to that issue has been applied to the dev site.
Attached patch #31, which removes the placeholder text from the search textfield. This is applied on https://searchdocs-drupal.redesign.devdrupal.org/documentation
Comment #33
kattekrab commentedSometimes it's a little bit like magic!
Thanks Cafuego.
screenshot of the search page after removal of the placeholder text, and the CSS changes in #2376023: Change 'Documentation Search Block' CSS
Search Block
Search Results
Comment #34
kattekrab commentedComment #35
jhodgdonRegarding fixing the block so it actually works well being out of scope... If it isn't going to work well I would advocate for just simply removing it from Community rather than moving it to a more prominent place like on the Documentation page. We can wait until someone makes a better block to have one there. I don't want to see a lame block deployed on the Documentation landing page.
So items (c), (d), and (e) in #23 still need to be addressed, in my opinion, before we should consider enabling this block on the Documentation landing page. If they're not being addressed, in my opinion we should just trash the block for now.
Comment #36
jhodgdonAlso can someone update the issue summary with deployment instructions -- step by step list of what someone will need to do to get this deployed? I don't think it's just "apply these two patches" right?
Comment #37
yesct commented#2376953: Add "Search Documentation" block to /documentation created for adding it back.
I agree: I think at this point it should just be removed from /community
updating the title and summary.
Comment #38
cafuego commentedIn that case, the deployment instructions are indeed just "apply these two patches" ;-)
Comment #39
kattekrab commentedRighteooo.
The results you get from this search block, and the main site search if filtered by "Documentation" are exactly the same. So I also agree it seems safe to remove the search docs block from the Community landing page without replacing it immediately on the Documentation landing page.
Comment #40
eojthebraveWe talked about this in today's Documentation Working Group meeting and all agreed that this seemed like unnecessary clutter. Especially given that the results are the same as what you get from searching with the regular search tool (which would be right above this anyway) that it's not really very useful.
So +1 for simply removing the block.
Comment #41
mgiffordBeen a pretty busy week or two since I marked this RTBC. Looks like a lot of good work has been done since then. Thanks everyone!
Looking froward to seeing these two patches being applied to d.o.
So, should this be marked RTBC again?
Comment #42
jhodgdonUm. The patch in #32 seems to be doing something other than just "Remove the search block from Community". It seems to be more in line with the "add this to the Documentation page" idea?
Comment #43
cafuego commentedThe patch in #32 removes the form code from the community template and makes it available as a block. That block is not enabled by the code, that's entirely up to humans.
Comment #44
kattekrab commentedSo the block isn't going on to documentation.
Can we get it removed from /community now?
Comment #45
kattekrab commented4 years later.
Comment #47
drummI went ahead and made an extra commit to clean out the code. If this ever makes a re-appearance on the documentation pages, I think it would benefit from a fresh start.
Comment #48
drummNow deployed.
Comment #49
jhodgdonThanks!
Comment #50
kattekrab commentedWhooohooooo!!!
Thanks @drumm
:)