sphinxcontrib-phpdomain icon indicating copy to clipboard operation
sphinxcontrib-phpdomain copied to clipboard

Improve UX with namespace

Open mvorisek opened this issue 1 year ago • 2 comments

Currently when NS is defined, it is prepended before every class name.

With a lot of classes, it is quite hard to visually locate the desired class (method, ...) quickly.

This is a feature request and I propose to render namespace in class name with lighter color like:

image

This feature request is only about the visual UX, anchors should remain fully qualified (as they are now).

Together with #56 fixed, this will help large projects to have NS defined to project's NS on top of each doc file.

mvorisek avatar Jul 15 '23 15:07 mvorisek

class declaration/directives names are already separated in HTML render and can be styled:

image

the problem is with methods (constants/methods) only

the NS is rendered with short class name in 1 <span class="sig-prename">


another alternative might be to render the namespace directive like class:

image

and then not render the NS before any class

this will save a lot of visual real estate

mvorisek avatar Jul 15 '23 17:07 mvorisek

another alternative might be to render the namespace directive like class: and then not render the NS before any class.

Not all projects that document namespaced classes include a namespace directive on the page. I can see the argument for skipping the namespace prefix on every method. Perhaps this could be a good place to add a configuration option to allow either the full namespace prefix (current behavior) or just the classname, or no prefix.

markstory avatar Jul 16 '23 04:07 markstory