Re: svn: /web/php/trunk/ include/header.inc js/common.js js/jquery.autocomplete.js js/jquery.autocomplete.pack.js styles/structure.css
styles/theme.css
| From: | Paul Dragoonis | Date: | Thu, 30 Dec 2010 11:51:20 +0000 |
| Subject: | Re: svn: /web/php/trunk/ include/header.inc js/common.js js/jquery.autocomplete.js js/jquery.autocomplete.pack.js styles/structure.css styles/theme.css |
||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-10023@lists.php.net to get a copy of this message | ||
On Wed, Dec 29, 2010 at 7:30 PM, Stewart Lord <stewey@ambitious.ca> wrote:
> On 2010-12-29, at 12:47 AM, Hannes Magnusson wrote:
>
>> The generated index comes directly from the Docbook sources, so as
>> long as the src is correct, the capitalization will be correct.
>>
>> I did look into supporting variable search, constants, etc etc.
>>
>> array(
>> "refentry" => array(
>> array("strpos" => "function.strpos"),
>> ),
>> "phpdoc:varentry" => array(
>> array("$http_response_headers" =>
>> "reserved.variables.httpresponseheader"),
>> ),
>> "phpdoc:classref" => array(
>> array("DOMDocument" => "class.domdocument")
>> ),
>> "appendix" => array(
>> array("Userland Naming Guide" => "userlandnamgin.global")
>> ),
>> )
>> would be the structure of the searchIndex..
>
> What about something more like this:
>
> array(
> array("strpos", "function.strpos", "function"),
> array("DOMDocument", "class.domdocument", "class"),
> array("Userland Naming Guide", "userlandnamgin.global",
> "appendix")
> )
>
> I think this would give us the biggest bang-for-buck.
>
> It would allow the user to match a lot more stuff via the auto-complete (with minimal changes)
> and we could add a poor man's categorization by simply appending the type/category to the end
> of the entry when we display it in the drop-down, e.g.:
>
> strpos (function)
> DOMDocument (class)
> Userland Naming Guide (appendix)
>
> The parenthesized text could be greyed out.
>
>> Or provide multiple index files, one per type. Then we could decide
>> not to push examples, or callouts, or whatever types to the user by
>> simply commenting it out..
>
> I think this would add a fair bit of complexity and would require a rewrite of the current JS.
>
>> I didn't spend much time on it in javascript land after I figured out
>> it actually sorts the entire index everytime :P
>
> Ya, that seemed like the shortest way to get the desired effect. We will always have to scan
> through every entry in the index (not much of an index is it!), but it could be made more efficient
> by not sorting everything. Still, it seems pretty much instantaneous on my machine. JS is so damn
> fast these days!
>
>> Was more looking at what kind of data we can get for free from PhD
>> without needing specific runs.. Looks like we can extract prettymuch
>> whateverwe want in under a second while generating the docs.
>
> That's awesome!
>
> Cheers,
> Stew
> --
> PHP Webmaster List Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Hey Stewart,
The documentation dropdown looks really nice, but it's currently
broken in 2 parts.
First one is that you have to click twice on it, which i'm looking to fix.
Secondly, if you click the dropdown button about 5 times really
quickly the page completely screws up.
My prediction is that because you're using appendTo() every time you
click the button, this is a big DOM change, and the DOM gets confused
and backs out of what it's doing.
So i'm going to change the implementation so that there are 0 DOM
movement changes needed and just a show/hide of content, this will
allow for a snappier response and less DOM work.
Ping me an email back if you have started doing changes on the
Documentation dropdown since your last commit.
Cheers.
Paul.