Redesign of dlang.org

Aleksandar Ruzicic via Digitalmars-d digitalmars-d at puremagic.com
Sat Apr 19 14:57:40 PDT 2014


On Saturday, 19 April 2014 at 21:44:20 UTC, Nick Sabalausky wrote:
> On 4/19/2014 6:56 AM, Aleksandar Ruzicic wrote:
>> Ok here's a mockup of search concept I would like to implement:
>>
>> http://krcko.net/dlang.org/dlang-search-concept.png
>>
>> Search suggestions feature would surely require JavaScript but 
>> IMHO it
>> would be a really nice enhancement.
>>
>
> I don't know anything about the specific search-suggestion 
> engines, but as far as looks I (mostly) really like it. Only 
> two comments:
>
> - There should be some visual indication of the search box 
> besides the text itself. It *looks* nice as you have it, but 
> practically speaking it'd be a bit awkward to not be able to 
> see the box itself.

OK, I'll work on a design more, I'll also try to have real 
designers involved to help me with these UX stuff.

> - A *lot* of search boxes on the internet these days bake the 
> "Enter search term here" (or whatever) text into the HTML, 
> forcing non-JS users to delete the text before they're able to 
> enter their search term. That's bad UX. Instead, the "Enter 
> search term here" text should be *added* via JS and left blank 
> in the raw HTML. That's a trivial way to ensure it works great 
> for both JS and non-JS users.

Nowdays there is something called placeholder attribute[1] on 
input elements that servers just for that purpose (text goes away 
as soon as you start typing) and there is no JS needed for that 
as it is supported by all major browsers. But I like to add 
fallback (that works even without JS, but better with JS) for 
that on old browsers which don't support that feature.


[1] 
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Forms_in_HTML#The_placeholder_attribute


More information about the Digitalmars-d mailing list