On 07/12/2011 06:44 AM, 许凌志(Jamesxu) wrote:
On Sun, Jul 10, 2011 at 7:10 PM, Marius Dumitru
Florea<
mariusdumitru.florea(a)xwiki.com> wrote:
> Hi James,
>
> On 07/04/2011 11:11 AM, 许凌志(Jamesxu) wrote:
>> Hi, thanks for Marius' help ,last week, I have done the following work:
>> (1). Implemented the function that logs a message in the firebug console
>> whenever the caret is after [[
>> (2). Implement the function that requests the list of wiki pages
>> matching some prefix user input. BUT, don't actually query the database,
>> instead simply return a dummy list from the wiki page.
>> (3). Implement the function that displays the list of wiki pages where
>> the caret is, and integrated it with the SuggestionBox I have already
>> implemented.
>>
>> Here is the plan for next week:
>> I will focus on fixing bugs and improving what I have and to make suer
>> by the end of the week the link suggest should work very good. Include
>> (1). Display the suggestion box in right place and at the right time.
>> (2). Close suggestion box in custom, and also when some other keys typed
>> like "esc" "right" and "left"
>> (3). Test to make sure the prototype for link suggestion runs very well.
>
> I tested your prototype and here are some of the issues I've found:
>
> * A JavaScript exception is thrown when you type if the suggest box has
> not been displayed at least once
>
There is no exceptions thrown in the situation you
said. Could you give me
the content of the exceptions?
Reload the page, focus the text area and press the left/right arrow key.
I get "this.suggestionBox is null" in onKeyUp because obviously
this.suggestionBox isn't initialized when you test:
...
if(!this.suggestionBox.isDestroyed()) {
...
>
> * The close icon is useless, remove it.
>
I think it is useful for users who want to remove the
suggestion box by
themselves especially in the situation that some unexcepted exception
occured
They have the Esc key for this and you must make sure there are no
(un)expected exceptions.
* The suggestion box doesn't update its position. If you trigger the
suggest box and then write a long text (try multiple lines) the suggest
box doesn't move.
Yes, it is a problem, I will refine it in this week
>
> * left/right keys should keep the suggest box open and filter the list
> of suggestions
>
> * Ctrl+Space doesn't work after you close the suggest box by clicking
> outside of it.
>
I think it might not be caused by the suggestion box,
I test it in
http://www.xwiki.org/xwiki/bin/edit/Main/Support
What do you mean you tested on
http://www.xwiki.org/xwiki/bin/edit/Main/Support ? Did you install the
auto-complete feature on xwiki.org? I doubt it. Anyway, Main.Support is
not a page for testing. You have the
playground.xwiki.org if you really
need a place to test.
, when you clicking outside of the textarea,
Ctrl+Space doesn't work
either.
That's not what I said. Of course Ctrl+Space doesn't work if the text
area is not focused. So trigger the suggest box, click outside the text
area (the suggest box should be closed now), click inside the text area
after [[ and type Ctrl+Space. It should open the suggest box, but it
doesn't.
>
> * Trigger the suggest box, move the mouse over it then type the Tab key
> multiple times. The text area looses the focus but the suggest box is
> not closed.
>
Strange, it is ok when I test, type tab key many
times, and the suggestion
box was closed.
Do you have local changes? I can reproduce it all the time. Is the
"Version summary" focused after you press Tab key twice? Are you sure
the mouse is over the suggest box?
>
> * The suggest box is triggered by the Delete key.
>
When Delete key is pressed, it will not send the
search request to the
server to get the suggestions, but in my design I keep the suggestion open
when delete key is pressed, do you think I should close it?
That's not what I said. If you have this text:
before [[link
and move the caret after 'link' then press the Delete key, the suggest
box will be opened. This is not the expected behaviour.
* The suggest box is not closed by typing ]].
It is will implemented in this week
* The suggest box is not closed by deleting [[.
yes, it is a problem, I will refine it this week
* Ctrl+Space should be ignored if the suggest box is already displayed
yes, it is true, I will refine it this week
* You don't take into account Undo/Redo operations nor the paste event.
Yes, I will consider it later.
>
> * The suggest box should be displayed were there is space. If the caret
> is close to the bottom of the window and the suggest box doesn't fit
> below the caret then it should be displayed above. Same with left/right.
>
Ok, I will consider it, but I think it is not a
critical problem, because
the suggestion box is not so big, so I think it is ok if it overflows the
editor area a bit
Indeed it's not critical, but it's nice to have it at the end.
Thanks,
Marius
For the next week I think you should:
(1) retrieve real suggestions using REST
(2) generate the link syntax when a suggestion is selected
(3) fix some of the issues I've listed above
Thanks,
Marius
--
Best wishes,
许凌志(Jame Xu)
MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University
Department of Computer Science and Technology, Xi’an Jiaotong University
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs