Things to Remember
Generic
cleanup todo, check stuff in highlevel overview that is considered done with at the beginning of the entry
- work daily, update diary daily
- ALWAYS do a clean changeset
- make sure you change only some specific stuff, make sure you change all of it
- run py.test | less in toplevel dir
- while tests are running review changeset: hg diff, hg st, read line by line, think
- until happy, commit.
- no premature optimization or caching, first get the stuff into good shape!
- please look with pylint on your modified files. You don't need to fix everything what it tells but it gives good hints why the code won't work
Notes
http://jinja.pocoo.org/2/documentation/templates#template-inheritance
a url is something like http://server/path?foo=bar&bar=baz (and it needs |e when used in html)
a link is something like <a href="url|e">bla</a>
- use url_for(endpoint, param=value, ...) to create URLs
- url_for('static', filename="...") for static stuff (see existing code)
- url_for('frontend.show_item', item_name=item_name) for show item url
- escape URLs in HTML
- Page/PageEditor classes are deprecated, get rid of any usage of them / their instances
- use theme class instance as the way to pass data into the template (method, attribute, (cached_)property)
- actions should also have their own templates (rendering everything, not just the content part)
- navibar: (MAYBE) found a way to unable "add quicklink" if the page is already in navibar
- navibar - we need link/transclusion markup micro converter there
write html5, xml variant! like <foo /> or <foo>...</foo>
- add this to your wiki config to be able to test interwiki stuff (and remove it from here after adding to e.g. wikiconfig_local.py):
from os import path # following assumes that the wiki config resides in the toplevel dir of the repo shared_intermap_files = [path.join(path.dirname(__file__), 'contrib', 'interwiki', 'intermap.txt'), ]
TODO
now
- css - remove everything that is not used currently
- css rewrite:
- make a cleaner, better structured css
- reuse some colour and style
- implement 2 simple alternate style sheets to demonstrate their usage as sub-styles
- e.g. slightly different colours, other fonts / sizes
- (btw, this was a feature that had support code in old theme, which you removed)
for example, see http://css-tricks.com/examples/AlternateStyleSheets/
- use jquery instead of body-onload stuff we have (so different JS does not conflict on body-onload)
- implement and document a way a wiki admin can add this stuff via wikiconfig:
- overriding / slightly modifying a template
- own css (overriding parts of main css)
- own javascript (with document-ready load behaviour)
update a docs/CHANGES.jinja2-theming
Note: you have to be available for coding until the final evals deadline to fix issues we find.
afterwards
- separate views/action with mediawiki looking (tab scheme)
implement tests: http://hg.hatta-wiki.org/hatta-dev/file/tip/tests/test_parser.py
High-Level Overview of TODO
transform MoinMoin.theme code so it uses jinja2 templates
feeding data to template
- (in progress) creating well-formed hierarchical templates
- dealing with different kinds of icons/images (reorganize them cleanly, naming scheme?, standard names? which names can be changed, which not?)
- theme imgs (RC, what else?)
- needed by specific templates
- extension images
- content imgs (e.g smileys, annotation box images)
- (in progress) dealing with stylesheets (reorganize them cleanly)
- theme
- sub-themes (basically same theme, but e.g. different colours, light/dark, big/small)
needed by specific templates (e.g. the html editing template needs ckeditor.css loaded in head)
admin configurable
- wiki user (see user profile)
- extension styles
- content styles
rename all MoinMoin's internal class names and ids, add "moin-" prefix
- dealing with javascript
- use jQuery everywhere (in progress)
- needed by theme
needed by specific templates (e.g. the html editing template needs ckeditor.js loaded in head)
admin-configurable (view multiconfig.py and external_scripts)
- extensions
- needed by content
- managing init hooks (like e.g. body onload)
- cleanup view/controller code, use templates here also (get rid of embedded html)
plugin system ( no plan yet )
- tests
- documentation
- write tutorials explaining how to build a theme
Feature Requests
- The split between Editbar items and More Actions is not optimal for many wikis - make this configurable (admin or user configurable?)
- For a wiki, one way to accomplish this is to have a configurable list in the desired sequence for (editbar items + more actions) and a configurable number to split between editbar and more actions (first 5 go to editbar, rest go to more actions).