Hi Jun,
Looking better and better :)
Here are some extra pointers based on your video:
1) Instead of 'Edit' or 'Reply To Comment' buttons in the comment editor,
use the standard Save command for an editor and mark the editor window as
dirty when it needs saving. Warn the user of an unsaved/modified editor when
trying to close it, etc.
1.1) On the same note, I notice that the RCP that you are running does not
have the button toolbar. Maybe we should have some common sense buttons like
save/save As, undo, cut/copy/paste and maybe some other too.
2) When adding/removing an attachment/comment/page/etc., the general rule
should be to refresh as little as possible. So you should refresh just the
Attachments/Comments section of the current page and not all the current
page's sections (or even worst, the whole navigator). Even better, you could
(based on the internal notifications) just add(or remove) the new elements
to the UI instead of refreshing everything. All of this minimizes the
trafic, reduces waiting time, does not confuse the user and generally helps
performance :) Remember that this is a general good practice, but if you
have time issues, you could have the first versions just refreshing small
sections instead of doing individual manipulations.
3) Just like you did for comments or annotations by displaying the author
(first property), you can do the same for general objects, when grouped
under their class name. You can just show "[objectNumber]
firstPropertyValue". The XWiki object editor treats things a bit more
customized [1], preferring the first property matching the pattern "*name*"
or "*title*", if not, the first String property and, if that fails too, the
first non-TextArea property. (note: the current implementation is a bit
buggy and takes the last String or non-TextArea property instead. See [2]
for the correct version.)
On the other hand, all this "nice" information (first property value) can
cause a heavy load on the server since it involves retrieving every single
object and getting it's property value. In the object editor, all this info
is easily obtained by a database query, but in REST we have to do a lot of
queries to get the same data. So if we have 1000 comments on a page or 1000
objects of a specific class, if we try to list them, we will make 1001
requests instead of just 1. Even if this is asynchronous and the user can do
something else while the objects are retrieved, the benefit might not be
worth it.
The debate here is whether to display the first property value for
everything like comments, annotations and generic objects (for a better user
experience in low-page-load conditions) or for nothing at all (because of
the performance overkill).
4) You might want 'Download Attachment' and 'Update Attachment' to be the
first actions for an attachment and 'Delete' to be the last. Otherwise, you
risk pressing delete unwillingly. It is a general best practice to put
destructive actions towards the end of the actions list and main/most used
actions towards the top.
5) Minor note: Highlighted Text property of XWikiComments class is not used
AFAIK. It's ok to leave it there in case we start using it, but just so you
know, I don`t know any place where it is actually used. Maybe it's a step
towards merging annotations with comments, but that's another topic of
discussion :)
Thanks,
Eduard
-----------
References:
[1]
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwi…
[2]
https://github.com/xwiki/xwiki-platform/pull/15/files
On Thu, Jul 14, 2011 at 10:04 AM, Vincent Massol <vincent(a)massol.net> wrote:
Hi Jun,
On Jul 14, 2011, at 6:14 AM, Jun Han wrote:
Dear all,
I put another short demo for the work I have done.
The URL is
http://youtu.be/L9UCoa4N8hE
Wow this is really cool! Well done!
I'm now eager to start using XEclipse again :)
Is there a version I could test (for my mac)?
Thanks
-Vincent
The major work includes:
1. grouping various page objects together, e.g., attachment, comment,
class, object (annotation and customized class objects) and tags
2. comment resource
get comment list and property, create a new comment, reply to an
existing comment, (currently, deleting a comment is not supported in
REST API yet)
3. attachment resource
get attachments and their property, upload a new attachment, update
an existing attachment, and remove attachments
I am now working on creation and edition of tag, object property and
page via REST API.
Best regards
Jun Han
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs