Add UML class Diagrams to api.drupal.org

Created on 7 January 2014, over 10 years ago
Updated 14 May 2024, about 2 months ago

Updated: Comment #N

Problem/Motivation

On api.drupal.org, we have pages that show Classes and Interfaces.

It might be useful to provide UML class diagrams, in addition to the current information on those pages. Community input is needed to decide if we should do this, and some details about how to do it.

Proposed resolution

Questions to be resolved -- we need input from the community on #1-#5 now, to decide how to proceed:

1. Do people in the Drupal community feel that UML diagrams would be an important and useful addition to class pages on api.drupal.org?

2. Should the UML diagrams be embedded directly into the class pages, or should there be a link with the UML diagram on a separate page (possibly a thumbnail image as a link), or a fieldset-hidden area? Note that for some classes, the UML diagrams are quite large.

3. If the UML diagram is embedded, where should it be (at the top? below the main class documentation? ???).

4. Accessibility:
- Do we need to have any further accessibility information added to the SVG files generated by the Graph API module? See http://www.w3.org/TR/SVG-access/ and http://blog.paciellogroup.com/2013/12/using-aria-enhance-svg-accessibility/
- Does the placement of the UML diagram impact users with screen readers accessing the class page?
- Reference on accessibility testing: https://drupal.org/node/464496#images

5. Usability:
- Can the class/method names embedded in the SVG files be made into links within the api.drupal.org site (the site for the links should probably be configurable, plus the project/branch names as they are in the API module itself)?
- Are there any other usability features we need to have in the SVG files, such as zooming (for large diagrams)?

6. Technical details:

a. How/when will the class diagrams be generated and where will they be stored? How long does it take to generate them? [Need to define the deliverables from the Graph API: SVGs? thumbnails? etc.]
==> See comment #34 for commands to generate SVG files

b. How will the system be efficient at detecting updated code and generating new diagrams for classes that need them (if a class or one of its dependencies has changed)? [Note: the latest 7.x-dev version of API module has a hook hook_api_updated(), documented in api.api.php, which may be useful if this module is integrated with the API module.]

c. Will this run in a Drupal 7 environment via cron or queue system (or stand-alone scripts would be fine)?

==> Looks like at the moment they are stand-alone scripts, see comment #34.

d. Can they be generated for multiple projects/branches (e.g., Views 7.x, Drupal Core 8.x, etc.?) with inheritance across projects (e.g., a Views add-on module would inherit from Views, which inherits from Core)?

e. Can they work with the way the API module and api.drupal.org are currently storing the source code for parsing (each project/branch in a separate directory outside the Drupal 7 root)?

f. How will the output SVG files be integrated into the API module (which generates api.drupal.org)?

==> Probably a hook in the API module that would allow other modules to add information to pages, and a "glue" module that would implement the hook to find the SVG diagram file and add it to the class/interface pages. The SVG files are currently output to a directory with the same directory structure as the branch/project being indexed by the API module, so they can be located there.

g. When will this functionality be added to the Graph API module? Currently, the referenced issue has not been finalized (doesn't even have a posted patch).

===> I'm not sure we're actually using the Graph API module any more?

h. Is the Graph API module OK to add to api.drupal.org (infrastructure/security reviews) (assuming we even need to have it on api.drupal.org)? Right now it doesn't even have a full release. What other outside code needs to be reviewed as well?

7. Updates to server/software that would be needed:
- Will need to install Graphiz version (at least ??? see comment #29) http://www.graphviz.org/

Remaining tasks

See Proposed Resolution for now. Still in the planning stages.

User interface changes

api.drupal.org class/interface pages will have UML diagrams.

API changes

The API module will probably have a new hook to add information to pages.

✨ Feature request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands clemens.tolboom Groningen, πŸ‡³πŸ‡±/πŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ͺπŸ‡ΈSpain fjgarlin

    Some of the libraries or sites mentioned here no longer exist or have not been updated in a number of years, same as this issue. It feels like the demand for it faded or lost momentum.

    The new site is up and running in Drupal 10.

    I am closing this issue as outdated.

Production build 0.69.0 2024