API page: http://api.drupal.org/api/drupal/developer%21topics%21forms_api_referenc...
Enter a descriptive title (above) relating to Form API Reference, then describe the problem you have found:
I am using Firefox 10 on Windows 7. The FAPI documentation page has become very wide due to the Form Controls table at the top of the page. As a result the page is wider than the standard template width and also is wider than many displays. This renders the page difficult to use because one must scroll horizontally to read the documentation above and below the Form Controls table. Suggest reformatting that table or altering the page such that the Form Controls table may be extra wide but the remaining documentation on the page conforms to template width. Ideally all content would fit within template width.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | documentation-fapisimple-1466578-3.patch | 1.41 KB | onelittleant |
Comments
Comment #1
jhodgdonMoving to project where this file lives.
I'm not sure we'll fix it though. This page is nearly impossible to edit and we're hoping to replace it with
#100680: [meta] Make API module generate Form API documentation
Comment #2
joachim commentedI'm no CSS expert, but could the table be forced to have a horizontal scrollbar?
I agree that this makes that page really painful to read.
Comment #3
onelittleant commentedIs there any way that I can play with it in a sandbox? It's such an important page, being the FAPI reference and also now a major component of the documentation for the Render API. FYI, it's now a bit confusing to be directed to the FormAPI docs for Render API information. Perhaps we should consider merging the form and render documentation as relates to elements as they are very much one and the same now.
P.S. Just read #100680: [meta] Make API module generate Form API documentation... or at least some of it. Just thinking there may be a shorter term CSS/jQuery solution that would at least make the current page more usable before #100680: [meta] Make API module generate Form API documentation gets sorted out.
Comment #4
jhodgdonIf you want to set up a site like api.drupal.org, you need the API module (and there is doc linked there on how to set it up):
http://drupal.org/project/api
And to play with the FAPI page, that is in the Documentation project's git repository
http://drupal.org/project/documentation
Comment #5
onelittleant commentedThat was an educational experience getting API to generate. Thanks for the direction. d.o has some custom javascript that expands the content column width specifically when large tables exist in the content. This keeps content from overflowing over the sidebar. This patch simply wraps everything else on the page, not the tables, in divs with a max-width style of 960 px. this ensures that whlie the tables may get very wide, the other paragraphs and content on the page will never go over 960.
Drawback here is that this may affect API sites that have no real width limitation, unlike d.o.
Comment #6
jhodgdonThat seems like a reasonable approach.
Comment #7
jn2 commentedThis really improves readability. The patch in #5 did not apply, so I edited the file directly. Onelittleant still gets credit for the patch.
Fixed for both D7 and D8.
Comment #8
jhodgdonThanks jn2 for this and other recent fixes!! :)