Last modified: 2014-02-12 23:35:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32371, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30371 - Make a nice way of building HTML tables
Make a nice way of building HTML tables
Status: NEW
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-14 19:37 UTC by Sam Reed (reedy)
Modified: 2014-02-12 23:35 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2011-08-14 19:37:51 UTC
$wgOut->addHTML( Xml::openElement( 'table', array( 'class' => 'TablePager' ) ) );

		$wgOut->addHTML( '<thead>' );
		$wgOut->addHTML( '<tr>' );
		$wgOut->addHTML( '<th>' );

Things like that, just suck

Having a table object(or something)..

$table->openTable();

$table->addHeaderRow( array( 'foo', 'bar, 'baz' ) );

$table->openBody();

$table->addRow( array( 'lol', '1', '2' ) );
$table->addRow( array( 'zing', '3', '4' ) );

$table->closeBody();

$table->closeTable();


Or something, whatever, would be nicer...

Maybe some part of OutputPage or something?
Comment 1 Chad H. 2011-08-14 19:40:52 UTC
Ew not OutputPage, it could be used in lots of other places too. Make a TableBuilder class or something.
Comment 2 Krinkle 2011-08-14 20:40:57 UTC
We've got HTMLForm. Writing a HTMLTable class makes sense.
Comment 3 Quim Gil 2013-03-16 05:38:18 UTC
Is this still an interesting feature? What possibilities would it bring to, say, Wikipedia editors compared with the current options of wikitext tables + basic html tables?

I guess nobody is currently planning to work on this?
Comment 4 Quim Gil 2013-11-19 23:38:02 UTC
(In reply to comment #2)
> We've got HTMLForm. Writing a HTMLTable class makes sense.

Would this still be a good idea? Is this a task simple enough for a Google Code-in student?

https://www.mediawiki.org/wiki/Google_Code-In
Comment 5 Bartosz Dziewoński 2013-11-21 12:59:18 UTC
(In reply to comment #2)
> We've got HTMLForm. Writing a HTMLTable class makes sense.

Ugh, I'd say that not really. The class we're imagining here would probably be more akin to XmlSelect.

(In reply to comment #3)
> What possibilities would it bring to,
> say, Wikipedia editors compared with the current options of wikitext tables +
> basic html tables?

None, because it's not related. This is only about nicer methods of generating tables on PHP-side.

It should be simple enough for GCI, assuming that a) we want this and b) we have some use-cases.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links