Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 3.0
-
Fix Version/s: None
-
Component/s: Help Application, XWiki Enterprise Documents
-
Labels:None
-
keywords:Syntax,Guide, ux, usability
-
Similar issues:
XE-839Add XWiki Syntax 2.1 Link specifications to Syntax Guide XE-854Add XWiki Syntax 2.0/2.1 Images specifications to Syntax Guide XE-835Improvement for Syntax guide XE-392Add a Getting Started guide to XWiki Enterprise XE-1153Link to an Anchor in a page does not work in XWiki Syntax 2.1 XE-576Modify email links in the syntax guide to conform to accessibility guidelines XE-472Convert the Sandbox space to XWiki 2.0 syntax XE-1117Add a getting started guide on XWiki Enterprise home page XE-15Ampersand in XWiki news disables RSS feeds because of invalid XML syntax XE-344Align XWiki Syntax documentation on xwiki.org with the Syntax Help
Description
In the last few weeks I built a new Syntax Guide following the third suggestion of Ecaterina Valica (see: http://incubator.myxwiki.org/xwiki/bin/view/Improvements/SyntaxExperiments3 ). This one is based on the new 3.0 Admin app that has been created by... Sergiu, IIRC.
You will find the Guide I built in the attached .xar file. I would just like to point a couple of things about the code.
- Every section displayed in the guide is placed on a single document that should ideally be named something like XWikiSyntaxNewSection
- Every section page should have the following outline:
- Level 1 heading: Holds the name of the category in which the section is displayed (will be retrieved from first section to be added to a category)
- Level 2 heading: Holds the name of the section
- Level 5 headings: One heading/section for each version of the syntax information to be displayed. Heading must be the appropriate version number (e.g. "===== 2.0 =====")
- The XWikiSyntaxClass holds the following information and has to be attached to every section page:
- category: The 0-based number of the category in which the section should be displayed.
- section: The 0-based number at which the section should be displayed within the category.
- minSyntaxVersion: The first syntax version for which syntax information is available (if the selected version is smaller than this value the section will be hidden)
- maxSyntaxVersion: The last syntax version for which syntax information is available (if the selected version is greater than this value the last available version will be displayed)
- In order to display the version numbering according to the current selection despite actually displaying section of previous version (see maxSyntaxVersion) the version number should be replaced as follows:
2.0 -> {{velocity}}$crtSyntaxVer{{/velocity}}
While content and section/category names can be translated by just translating the syntax pages the following three ApplicationRessources will have to be added:
xe.syntax.syntaxpage.title=XWiki Syntax Guide
xe.syntax.syntaxtitle=XWiki Syntax {0}
xe.syntax.syntaxall=All
See the attached xar package for the sources to the entire guide. Content-wise it is roughly what has been in the latest revision of the "old" Syntax Guide.
1) You need to add
$xwiki.ssx.use("XWiki.XWikiSyntax")
for the style to be applied. After community validation we can add #change-context style to colibri.css instead of duplicating the code from administration.
2) There are two #document-info. This is not good from a validation point of view and also because if you'd want to hide the page title from CSS and leave the generated title you can't because they are using the same ids. Same for #hierarchy.
3) All <table style="width:100%"> need to be <table style="width:99%"> in order to be on the safe side on all browsers. We can have this styling from CSS too. Also "Warning: <table> lacks "summary" attribute" for all the tables.
4) I don't like that you used h5 headers. WCAG is broken, because headers are not consecutive, also there is no semantic value added, also you hide them from CSS so it's not a matter of styling either. The validation will show you "Warning: <h5> anchor "H2.0" already defined" so you shouldn't use ids too. The solution IMO is to have .div with classes.