GUI standard » History » Version 5

Max Milbers, 10/19/2011 11:15 AM

1 1 Max Milbers
h1. GUI standard
2 1 Max Milbers
3 1 Max Milbers
Here follows a list of best practices when working develop a virtuemart view.
4 1 Max Milbers
5 1 Max Milbers
h2. Using javascript
6 1 Max Milbers
7 1 Max Milbers
Administrators should have js enabled. We can expect that administrators have js enabled. Therefore the backend can have features that only reachable with js.
8 1 Max Milbers
9 1 Max Milbers
But the shoppers are sometimes afraid to use js and dont trust a shop that is only working with js. So the whole frontend should be workable without js. This does not mean that every feature for comfort must be accessible without js, but the base functions.
10 1 Max Milbers
11 1 Max Milbers
h2. Use of of JText and hardcoded formats and simular
12 1 Max Milbers
13 1 Max Milbers
@echo JText::_('VM_FILES_LIST_THUMBNAIL_IMG').": ";@
14 1 Max Milbers
This is very bad and mustn't done. The ":" is hardcoded in the code. The right solution here is to write
15 1 Max Milbers
16 1 Max Milbers
17 5 Max Milbers
and to add the colon and space to the language file.
18 5 Max Milbers
19 5 Max Milbers
h2. Reference to functions in explanations
20 5 Max Milbers
21 5 Max Milbers
Use in explanation always the sprintf function to use the real label of the button and do not use some meta expression for it. For an exampel look on the view updatesmigration (Tools & Migration) in BE.
22 5 Max Milbers
23 5 Max Milbers
Before we had a text like "Please enable the dangerous tools in the config". But the option is named "Enable database Update tools". The new text shows "To use these tools fully, you must check 'Enable database Update tools' in the Configuration panel." There is additionally a link added directly to the option, this is also a prefered behaviour.
24 1 Max Milbers
25 1 Max Milbers
h2. Clicking cancel
26 1 Max Milbers
27 1 Max Milbers
When the user clicks cancel, the user is taken back from the editing screen to the page listing. No cancellation message will be shown.
28 1 Max Milbers
29 1 Max Milbers
h2. Delete button on row
30 1 Max Milbers
31 1 Max Milbers
The page listings should not contain a delete button per row. A single delete button needs to be placed in the toolbar.
32 1 Max Milbers
33 1 Max Milbers
h2. Database ID numbers
34 1 Max Milbers
35 1 Max Milbers
The page listings should not contain a database ID number.
36 1 Max Milbers
37 1 Max Milbers
h2. Sortable columns
38 1 Max Milbers
39 1 Max Milbers
A column should, where possible be made sortable by clicking on the column header.
40 1 Max Milbers
41 1 Max Milbers
h2. List order fields
42 1 Max Milbers
43 1 Max Milbers
A list order field should for new entries be disabled and shown the text string containing: "New items default to the last place. Ordering can be changed after this item is saved." For existing entries, the List order dropdown will be shown, this will allow the user to choose where to place the item.
44 3 Max Milbers
45 3 Max Milbers
h2. Hiding of layouts for the joomla view chooser
46 4 Max Milbers
47 3 Max Milbers
It is important that there is always the default layout visible in the chooser. In other case layouts used for overrides, makes it impossible to choose the default layout.