Problem/Motivation
I was just in a convo thread with someone who had gotten pretty frustrated trying to write a render array for the first time. They pointed at the the Render API overview at https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.... doesn't link to list of elements at https://api.drupal.org/api/drupal/elements/9.3.x, which is a good observation.
Proposed resolution
Update the Render elements section of theme.api.php to include such a link.
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 3236269-nr-bot.txt | 690 bytes | needs-review-queue-bot |
Issue fork drupal-3236269
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3236269-render-api-overview
changes, plain diff MR !1206
Comments
Comment #3
heni_deepak commented@mandclu Recently, I worked with some features related to custom forms. According to the API reference, I need to share this link (https://api.drupal.org/api/drupal/elements/9.3.x) separately with my team to explain the API process of the respective area.
It would be perfect here to add the link in the right place.
Comment #4
mandclu commentedComment #5
quietone commented@mandclu, thanks for the patch to improve the docs.
I reckon this is a task not a feature request. And shouldn't this use @link instead of the URL?
Comment #6
mandclu commentedThanks for the feedback. I've added a commit to the MR with your suggestion.
Comment #7
eojthebraveI think we can improve this by using the 'listing_page_element' @defgroup as the link target here instead of the full URL. So something like
@link listing_page_element Elements link @endlink. This would allow the link to work on any site displaying the API docs not just api.drupal.org.Comment #12
itmaybejj commented(never mind; that was fixed and not as related as I thought)
Comment #13
itmaybejj commentedComment #14
quietone commentedUpdated the MR.
Comment #15
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #16
quietone commentedNo, it passes all tests.
Comment #17
smustgrave commentedChange seems straight forward enough.
Comment #23
nod_Committed and pushed d241b6cb53 to 11.x and d3d8ab00bf to 11.0.x and 49f6e5eeff to 10.4.x and 986ae33d4b to 10.3.x. Thanks!