Extension:TableEdit2

This is a tentative specification for the new version of the extension TableEdit. Eventually this will get moved to a sub-page and the extension details/installation/notes will go on this page. Please feel free to edit as you see fit.

=Introduction= This document is meant to be a software requirement specification for tableEdit(2).

Contact Info
TableEdit was originally written in 2006 by Jim Hu at Texas A&M University for use on EcoliWiki.net. Since then it has undergone quite a bit of change, and needs to be rewritten. Daniel Renfro worked on it over the years, and is undertaking a massive rewrite. (And is looking for help!)

Purpose(s)
Wiki markup can be challenging. Tables are one of the harder things for new users. TableEdit provides a simple table creation and editing system. TableEdit 2.0 should provide users of Mediawiki software a way to edit tables intuitively using the GUI instead of using markup. It should look and behave in a manner consistent with common applications and current web technologies; to use buzzwords, Web 2.0-ish.

TableEdit replaces &lt;newTableEdit/&gt; tags in wikitext with a "Create Table Here" link. Following this link goes to a Special page that creates HTML comment-delimited tables The content is controlled by an external MySQL database, but the tables are saved back to the wiki in normal wikitext surrounded by HTML comments with the id number of the table in the database. Users can
 * Insert rows
 * Append columns
 * Change styles for tables, heading rows, and rows
 * Use templates to provide abstraction of table headings, behavior, etc.
 * Upload/Download entire tables.

This page provides a detailed explanation of most things TableEdit-v2.0+. If you need further assistance, contact [mailto:bluecurio@gmail.com Daniel Renfro], or [mailto:jimhu@tamu.edu Jim Hu]. There is also a page on Mediawiki specifically about TableEdit.

Scope

 * software
 * All Mediawiki software installations.


 * timeframe
 * working prototype by 01/2012
 * first release 03/2012

Definitions

 * tableEdit
 * the software extension to Mediawiki


 * box
 * the data representation of a table

Constraints, Assumptions and Dependencies

 * depends on Mediawiki's ResourceLoader
 * depends on jQuery extension Datatables
 * or Mediawiki Extension Datatables
 * depends on MySQL

=Specific Requirements=

Database structure
TableEdit currently supports only MySQL databases, and does so badly. Version 2 needs to make use of the MW syntax for SQL files, to support custom table prefixes.

The database tables need to be renamed into something shorter: old name                    new name ext_TableEdit_box           tE_box ext_TableEdit_row           tE_row N/A                       tE_field ext_TableEdit_box_metadata  tE_meta_box ext_TableEdit_row_metadata  tE_meta_row ext_TableEdit_relations     tE_relation

Some necessary changes:
 * The page_name from tE_box should be removed because page_uid already handles this information.
 * tE_row gets a new field, rev_id, which is a foreign key to the revision table.
 * The entire table tE_field needs to be created to avoid having to split/join the row_data each time.
 * tE_relation needs to be simplified to only hold the necessary field_id; or redo this completely.

Key features
=Old Old Old to-dos=
 * documentation
 * api modules
 * ajax</tt> should call the api.php like in ExtendedCategoryPage


 * caption, attributes
 * new SQL file
 * integrate into view, model
 * finish tEio_IFALT</tt>
 * links/URLS should get made into absolute paths upon export
 * metadata SQL change:
 * add a user_id field to the metadata...it makes sense to see which user made this save
 * TableEditLinks code
 * loading into tables -- tE should run the column_rules and handle exceptions intellegently to avoid data that doesn't conform to the column rule.
 * handle the case when a table gets copied to a new page.
 * styles for the messages/notes/etc
 * add a history stack
 * back/undo
 * add history-aware buttons like BACK and REVERT
 * optionally hide the table in the page
 * update the export/importers
 * change anything that relies on page_name, use page_uid
 * rewrite all of the tE templates
 * finish this documentation
 * hook into rebuildall.php or provide a script to update to tE2
 * or for internal conistency checkig
 * make it work in the extensions/ directory (patch for EW)
 * fix the class heirarchy use decorator and MVC
 * integrate the TableMarkerUpper script into tE
 * row deletion
 * hook into the preview (to show a preview of a new/existing box)
 * add the edit buttons to the top of the edit view
 * type=1, export, wikitext
 * add support for captions/cols/rowspans
 * add box_style, heading_style for non-templated tables
 * write an Install.php for tE2
 * fix the metadata loading/saving
 * deleting an entire table
 * when you copy a table from one page to another, tE should recognize the change in page_uid values and throw a question asking:
 * Did you mean to do this or was there an error?
 * conflict detection
 * relational foreign tables
 * add admin stuff
 * revert using wikitext
 * row-level history
 * install.php
 * create database tables
 * upgrade existing database tables
 * create Mediawiki:TableEdit.js and Mediawiki:TableEdit.css
 * run tests, check for global vars in LocalSettings that we need
 * parse out captions, table/heading attributes

Example templates
Everything to the left of the light blue line below is included in the template page. It is broken up into pieces only for readability. This is a TableEdit table template.

Qualifier qualifier Flags that modify the interpretation of an annotation. select NOT Contributes to       Contributes to        Colocalizes with Obsolete GO term Under review Deprecated

GO ID     go_id A unique number associated with each GO term. text

GO term name go_term The name of the GO term. go_term_lookup

Reference(s) refs One or more unique identifiers for a single source cited as an authority for the attribution of the GO ID to this gene product. This may be a literature reference or a database record. The syntax is DB:accession_number. textarea

Evidence Code evidence see GO evidence code documentation. select IDA: Inferred from Direct Assay IPI: Inferred from Physical Interaction IMP: Inferred from Mutant Phenotype IGI: Inferred from Genetic Interaction IEP: Inferred from Expression Pattern ISS: Inferred from Sequence or Structural Similarity ISO: Inferred from Sequence Orthology ISA: Inferred from Sequence Alignment ISM: Inferred from Sequence Model IGC: Inferred from Genomic Context RCA: inferred from Reviewed Computational Analysis TAS: Traceable Author Statement NAS: Non-traceable Author Statement IC: Inferred by Curator ND: No biological Data available IEA: Inferred from Electronic Annotation

with/from with This field is used to hold an additional identifier for annotations using certain evidence codes (IC, IEA, IGI, IPI, ISS). For example, it can identify another gene product to which the annotated gene product is similar (ISS) or interacts with (IPI). go_annotation_with

Aspect aspect Refers to the namespace or ontology to which the GO ID (column 5) belongs; one of P (biological process), F (molecular function) or C (cellular component) display

Notes notes Free text area for user notes. (Not included in the monthly submital to GO.) textarea

Status status Informs the user which is remaining of the three needed fields. display

1

Column-Rules
When a user edits a row in a table, it is nice to style the form that they fill out the way you want. Maybe you want them to select a single value from a list of values - the "select" format. The column rules in TableEdit-v2.0 do just this. In the table's template