php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #51728 Website feedback: Tooltips for functions in the php.net function reference
Submitted: 2010-05-03 20:19 UTC Modified: 2021-08-08 04:22 UTC
Votes:18
Avg. Score:3.0 ± 0.0
Reproduced:0 of 2 (0.0%)
From: xandrani at googlemail dot com Assigned: cmb (profile)
Status: No Feedback Package: Doc Build problem
PHP Version: Irrelevant OS: All
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: xandrani at googlemail dot com
New email:
PHP Version: OS:

 

 [2010-05-03 20:19 UTC] xandrani at googlemail dot com
Description:
------------
The functions are listed on the lefthand side of the web page in the php.net function reference.  For example at (http://php.net/manual/en/function.in-array.php) you will see a list of functions on the left.

It would be superb if when hovering over one of these function names a tooltip would appear showing the short description of the function.

e.g. hovering over 'array_fill' would give the tooltip: "array_fill — Fill an array with values"

Thanks :D



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-03 20:56 UTC] xandrani at googlemail dot com
Actually just had another thought on this.

There are actually two bits of information I want to know when hovering over a function (this would happen on ANY function that happens to be a link).

1) A short summary of what the function does (as previous comment)... i.e. 'array_fill' would give the tooltip: "array_fill — Fill an array with values"
2) The function definition, i.e. "bool in_array  (  mixed $needle  ,  array $haystack  [,  bool $strict  ] )"

I'm sure you are aware that you can get large tooltips WITHOUT using javascript.  Just in case you wanted to make a non-javascript based tooltip for maximum compatibility. i.e. I don't think the HTML 'title' tag will be a solution for us.

The whole tooltip for in_array() therefore, might be:

"
SUMMARY: array_fill — Fill an array with values

DEFINITION:
bool in_array
(
   mixed $needle,
   array $haystack
   [,bool $strict]
)
"

I think I would faint with excitement if this was ever implemented... sorry for being so geeky lol ;)
 [2010-05-05 21:20 UTC] bjori@php.net
I don't think adding the protoline into to tooltip would be such a good idea.
It will probably just be constantly in your way when mousing over items (plus, its 
a bit complicated to extract and order that info.. :).

Having the tooltip for the TOC and seealso would be awesome however.
Unsure if we can do it with _every_ instance of the function names.. well, except 
if we pre-load a function information like we are planning on for the new search 
feature...
 [2010-05-05 21:58 UTC] xandrani at googlemail dot com
> I don't think adding the protoline into to tooltip would be such a good idea.

Actually now you mention it that is true.  Although maybe make it an option in user preferences?  As it would be quite easy to implement.

My problem is that I'm slightly forgetful with the order of arguments, so I continually look up to see if in_array() for example has the 'haystack' first or second etc.  so the protoline would be good for me, but I can understand annoying for others.

Or maybe (and this is more difficult), if someone hovers over a function for 3 seconds then the first tooltip comes up (just the short function description), however if they hover for 6-7 seconds then the protoline comes up?

Hmmm not sure.  Maybe the user preferences idea is better ;)

> new search feature...

Speaking of new search features, you know when you type in to Google it comes up with auto-suggestions?  That would be awesome for PHP search...  Apologies for asking for too much... I'm greedy like that ;)
 [2010-05-05 22:58 UTC] philip@php.net
A couple quick notes:

Regarding remembering order:
- http://php.net/manual/en/faq.using.php#faq.using.parameterorder :)

Now, I wonder if a mega drop down somewhere would help with this. Something that 
only showed the prototype of functions for an extension. See the following for 
an example mega drop down (hover over Documentation):

- http://prototype.php.net/

Which, coincidentally, also has search improvements. There was talk of adding 
additional information to the results (as opposed to just function name) but I 
forget where that went. Likely there will be two forms: a quick search (via 
navbar), and an "advanced" search that can do/show much more information. All 
ideas (and code) welcome :)
 [2021-07-30 11:47 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-07-30 11:47 UTC] cmb@php.net
Hmm, no more feedback for more than ten years suggests that these
improvements may not be necessary anymore, since IDE support is
better now.  Or am I wrong, and someone would still some of the
improvements?
 [2021-08-08 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC