backdrop-ops / forum.backdropcms.org

The Forum for BackdropCMS.org.
https://forum.backdropcms.org/
4 stars 10 forks source link

Add search block to homepage #90

Closed ghost closed 4 years ago

ghost commented 5 years ago

In https://github.com/backdrop-ops/forum.backdropcms.org/issues/58 @jenlampton said:

A search block has been added at the top right of most pages :)

Unfortunately, none of those pages are the homepage. So when going to the forum and wanting to search for something, you can't. And it's not obvious to click on another page in order to see the search block.

I recommend adding the search block to the homepage, or at the very least a link (icon?) to the search page: https://forum.backdropcms.org/search/node


PR - https://github.com/backdrop-ops/forum.backdropcms.org/pull/99

jenlampton commented 5 years ago

Doh, whoopsie :(

alanmels commented 4 years ago

Just to track the fate of this issue.

Screen Shot 2019-10-26 at 4 24 40 PM
stpaultim commented 4 years ago

I'm surprised I hadn't opened an issue on this earlier, I run into this all the time and find it frustrating. Thanks @BWPanda for opening the issue.

For the last year, I keep intending to take a week and focus on fixing issues with the forum. Hopefully, I can get to this sometime soon.

stpaultim commented 4 years ago

I'm going to take a stab at this issue.

stpaultim commented 4 years ago

OK. Basic task was pretty easy, but I managed to dig myself into a deep git hole and it took hours to get out.

:-(

https://github.com/backdrop-ops/forum.backdropcms.org/pull/99

This PR moves two existing blocks from "top" region to "content" region and replaces them with search block. The search blocks is bigger than on other pages and centered.

It has a label. Also added "hidden" labels to other search blocks on other layouts.

There is a small change to css that makes the top region a little smaller to take up less space.

Backdrop_CMS_Forum___Backdrop_Forum

ghost commented 4 years ago

For small forms like this with only one field, I think placeholder text looks better than a field label. That or using the Compact Forms module to move the field label into the field itself.

stpaultim commented 4 years ago

@BWPanda - Thanks for that. Your right. This looks better.

Backdrop_CMS_Forum___Backdrop_Forum

I updated the PR.

(That went A LOT faster than before).

stpaultim commented 4 years ago

Does this look like the best config options for accessibility? @BWPanda

Profile___Backdrop_Forum

ghost commented 4 years ago

I'm not very knowledgeable with accessibility stuff, but I'd say the new placeholder and settings look good.

jenlampton commented 4 years ago

@stpaultim the PR looks great!

This PR moves two existing blocks from "top" region to "content" region and replaces them with search block.

Hm, why were the two more important blocks moved? Was it a design problem?

For small forms like this with only one field, I think placeholder text looks better than a field label.

OOh, good idea. There should be placeholder text on all forms where the label is invisible for sighted readers. Thanks for fixing that too :)

I'm going to merge the PR, put the two home page blocks back, and see if I can see the problem you ran into :)

stpaultim commented 4 years ago

Hm, why were the two more important blocks moved? Was it a design problem?

The top region is used for breadcrumbs and search exclusively on all other pages. Adding the search block to that region would have 1) departed from the design on other pages 2) added a little more theming to the PR. My goal was the simplest possible PR that looked good.

This solutions was easy and seemed to look pretty good.

Alternatives:

  1. add another region for the search block - above the page title.
  2. Find a new space on the page for the search block on front page
  3. Do the extra theming/css changes to make the search block fit in the top region with everything.

None of these would be too hard and I'm happy to put more work into this if you think it would help.

My problems yesterday were exclusively GIT and config workflow related. I have that figured out.

Here is what happens with all three blocks in the top region, without ANY additional theming.

Backdrop_CMS_Forum___Backdrop_Forum

stpaultim commented 4 years ago

I could see a design that leaves all three in this block, but centers search bar between page title and extra text (search centered and right below Backdrop CMS Forum). That would not be hard.

jenlampton commented 4 years ago

Find a new space on the page for the search block on front page

I'm giving it ago right above the list of categories... not sure this is better, but will post a screenshot in a sec.

I don't want it above or between the two more important blocks because I want the first things people to know about this site when they get here are 1) this is the forum, and 2) this is how we behave. After that, they can search :)

stpaultim commented 4 years ago

Sounds good. I don't have strong feelings about the placement, beyond keeping it towards the top of the page. The spacing around the title and welcome message in my PR was a little off.

jenlampton commented 4 years ago

What about something like this?

Screen Shot 2019-11-18 at 11 07 03 AM
jenlampton commented 4 years ago

We're live! https://forum.backdropcms.org/ If anyone has any design suggestions on how to improve this, as I'm sure there are many, please open a new ticket :)

jenlampton commented 4 years ago

Also thank you @stpaultim for all your work on this issue and PR!