php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #66861 Color sidebars <li>s for deprecation/new/...
Submitted: 2014-03-09 13:23 UTC Modified: 2019-06-01 06:41 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: eldmannen+php at gmail dot com Assigned: sobak (profile)
Status: Closed Package: Website problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2014-03-09 13:23 UTC] eldmannen+php at gmail dot com
Description:
------------
On the manual there is a sidebar containing a list of functions.
As can be seen on http://www.php.net/manual/en/function.session-regenerate-id.php

The sidebar is <aside> element with the 'layout-menu' class.

I think it would be helpful and increase awarity of deprecated functions by showing a deprecation indicator (dimmed color, red color, or icon, or something) on the <li>/function entries that are deprecated.

Expected result:
----------------
http://i.imgur.com/78PwTak.png


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-03-10 01:10 UTC] bjori@php.net
-Summary: Show deprecation indicator on the sidebar +Summary: Color sidebars <li>s for deprecation/new/...
 [2014-03-10 01:10 UTC] bjori@php.net
Interesting idea.
In your screenshot I feel the different colors actually makes you want to click it more, rather then serve as a warning.
Which means.. How about adding alight green color for new functions? :)
For deprecated/removed .. maybe light fadeout transparency? Or will that just be confusing and make you wanna check it out? :)
 [2014-03-10 12:59 UTC] eldmannen+php at gmail dot com
Was just a mockup.
Yeah, the deprecated colors could be changed from black to gray to decrease their visibility.

New functions could also be highlighted in green as you say to better make people aware of them.
 [2014-03-13 16:58 UTC] levim@php.net
Why don't we just append or prepend the word deprecated? I guess that is language-specific, though. I vote no on changing color for deprecated functions because honestly you are more likely to click on the items that don't match. We could make it a bit transparent or something, but that treatment to the comments hasn't been well received.
 [2015-01-03 12:22 UTC] jacob@php.net
I quite like the idea of showing deprecation warnings on old methods however I am not sure how this could be achieved design wise - would like to see some ideas or designs on approaches. :)
 [2015-01-03 14:53 UTC] eldmannen+php at gmail dot com
Another mockup. Here we move all the deprecated functions into a separate section.

http://i.imgur.com/EH1d9ew.png
 [2015-01-06 16:17 UTC] bjori@php.net
I think its an excellent idea.
Might not be trivial to implement though
 [2015-01-06 16:39 UTC] cmbecker69 at gmx dot de
It seems to me that it would be a good start if all deprecated
functions would be marked with a respective CSS class. That would
allow for some kind of highlighting (could be even done with a
custom stylesheet), and easy sectioning via JS (better than
nothing :)).
 [2015-01-06 18:11 UTC] aharvey@php.net
That's the non-trivial bit. :)

Bjori (and others), any thoughts? phd: namespaced attribute on the linked function. element? Additional attribute in the versions.xml entry for the function (eg <function name='foo' from='PHP 5' deprecated-in='PHP 7' />)? Something else?

I think I'm leaning towards the versions.xml idea at first blush, but I don't know if we want to start overloading that sidecar file with extra metadata.
 [2015-01-06 18:23 UTC] bjori@php.net
Didn't we at some point use <refsect1 role="soft-deprecation-notice"> ?
http://git.php.net/?p=phd.git;a=commit;h=ed1d8c1f21d3a070b38275815453476741375626

We could add something similar, role="really-deprecated" and .. mh.
Maybe we'd need to update the indexer then to so we can populate $toc properly....

This isn't something I have timefor anytime soon :/

Maybe its easier to inject this to versions.xml? but it'll still need to be added to $toc I think
 [2015-03-06 09:22 UTC] sobak@php.net
-Assigned To: +Assigned To: sobak
 [2019-06-01 06:41 UTC] sobak@php.net
-Status: Assigned +Status: Closed
 [2019-06-01 06:41 UTC] sobak@php.net
The requested feature has been implemented and deployed to production (a while back, actually). Thanks for the idea!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 14:01:28 2024 UTC