On #2148255: [meta] Make better D8 api.d.o landing page, linked to high-level overview topics, and put it in Core api.php files, we made a patch that included a stub Topic page for api.drupal.org (i.e., a @defgroup) titled:
Theme system and Render API
This can be found in file core/modules/system/core.api.php where it says
@defgroup theme_render
The documentation to go on this page needs to be written. The idea is:
a) Write a few paragraphs about the topic.
b) Link to more detailed documentation on
https://drupal.org/developing/api/8
c) If the more detailed documentation does not yet exist, create stub page(s), link to the stub pages, and add a note to this issue stating that the stub pages need to be filled out.
d) If the topic has related classes, interfaces, and functions -- appropriate for an overview -- add
@ingroup theme_render
to their documentation headers. That will make these classes etc. show up on the Topic page on api.drupal.org. Only include classes/functions that are appropriate for an overview page please!
For more info -- documentation standards for @defgroup/@ingroup:
https://drupal.org/coding-standards/docs#defgroup
Comment | File | Size | Author |
---|---|---|---|
#8 | 2216549-render-theme-docs-8.patch | 17.86 KB | jhodgdon |
#7 | interdiff.txt | 1.15 KB | jhodgdon |
#3 | 2216549-render-theme-docs-3.patch | 17.85 KB | jhodgdon |
Comments
Comment #1
jhodgdonComment #2
jhodgdonThis seems like the next topic to work on... taking it on!
Comment #3
jhodgdonHere's a first patch -- please review and provide constructive criticism, pointing out all the things I got wrong, omitted to mention, etc. Thanks!
Note that I updated both the new Theme and Render API overview topic, which is linked from the D8 api.drupal.org landing page, and the "Themeable" topic, which isn't (it needed some help).
Boy it would be nice if we had an automatically-generated list of documented render API elements and properties... sigh.
#1617948: [policy for now] New standard for documenting form/render elements and properties
Any hope of circling back on that one?
Comment #4
star-szrThanks @jhodgdon! I don't have time to review this right this minute but I'm tagging this issue so it shows up on http://drupaltwig.org, this looks like really important documentation to get in place for the theme system.
Comment #5
steveoliver CreditAttribution: steveoliver commentedExcellent work, @jhodgdon! Very helpful clarifications and grammar clean-ups. Technically, I see no issues. Otherwise:
Yes, the last three links need updates/review for Drupal 8.
Why the word "ideally"? Maybe "Drupal's theme system allows a theme to have nearly complete control over the appearance of the site,..." ?
The title of the second section seems a little too similar to the first. Instead of "Suggesting Alternate Hooks" maybe use the heading "Altering Theme Hook Suggestions" ?
Comment #6
steveoliver CreditAttribution: steveoliver commentedAdding Twig tag I accidentally removed with last comment.
Comment #7
jhodgdonThanks for the review! Addressed #5 points 2 and 3. Point 1 seems like you agree that the @todo needs to stay in there?
Comment #8
jhodgdonSlight reroll for clean apply.
Can someone review this patch so we can get this in? Please?
Comment #9
jhodgdonComment #10
steveoliver CreditAttribution: steveoliver commentedThanks, @jhodgdon.
Looking at those links again, I see all three pages are very tightly coupled to D7, and instead of rewriting them, I think new pages should be created for D8 and used in this patch (linked from the other pages where appropriate).
Comment #11
jhodgdonRewriting the pages on drupal.org is out of scope for this issue. Would it be OK to leave the links as they are for now, and if someone eventually adds a community documentation page that explains things better for D8, we can fix the link then? Right now, we have nothing on api.drupal.org about this at all... we cannot hold up this patch while we wait for full documentation to be written.
That is, in any case, why we have this note in the current patch:
Comment #12
steveoliver CreditAttribution: steveoliver commentedFair enough. Those links are as good as they get for now, and this patch is full of nothing but helpful clarifications and additions to our docs. RTBC.
Comment #13
jhodgdonThanks! Unassigning myself to avoid "I'm committing this" vs. "I worked on this" committer confusion.
Comment #14
webchickSorry for the delay on this, this looks really great.
Committed and pushed to 8.x. Thanks!
Comment #16
jhodgdonhttps://api.drupal.org/api/drupal/core!modules!system!core.api.php/group... there it is!