[GSOC Update 4][Design] RedPen Integration

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GSOC Update 4][Design] RedPen Integration

deshengchuan
Good day to all.
First, a quick update on the current status of the redpen extension:
It is now renamed as Content Checker, in consideration of implementing other document checking technology in the future. Also content checker's results are currently shown as logs, and the messages are split into warnings and errors. Also, during automatic validation of a document on save, if an error exists, the save is canceled.

Next, I am in the middle of adding most of the available validators from redpen as a configurable setting. However there are validator settings that require a dictionary i.e. Invalid words, suggested words and expressions. To this end, I plan to reformat the application homepage, to add a select field before the user enters into the text input fields, indicating whether the entry for invalid words or for suggested words and expressions.
Further, I have been looking for a way to extract the live table data within Java, but have been unable to. Is there a way to do it?

Lastly, as the number of validation settings pile up, I plan to reformat the UI of the configurable class of my app to one that is tabbed, like the WYSIWYG configurable class in the administration wiki, to achieve a cleaner look.

I would greatly appreciate any comments on the above implementation plans, thanks!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GSOC Update 4][Design] RedPen Integration

vmassol
Administrator
Hi Desheng,

> On 5 Jul 2017, at 06:32, deshengchuan <[hidden email]> wrote:
>
> Good day to all.
> First, a quick update on the current status of the redpen extension:
> It is now renamed as Content Checker, in consideration of implementing other
> document checking technology in the future. Also content checker's results
> are currently shown as logs, and the messages are split into warnings and
> errors. Also, during automatic validation of a document on save, if an error
> exists, the save is canceled.

Sounds good for now. How do you configure if a check is a warning or an error?

> Next, I am in the middle of adding most of the available validators from
> redpen as a configurable setting. However there are validator settings that
> require a dictionary i.e. Invalid words, suggested words and expressions. To
> this end, I plan to reformat the application homepage,

Could you show us a screenshot of the current home page?

Also, is it possible to try the application right now? Can I build it and install it in my wiki? Is it going to work?

> to add a select field
> before the user enters into the text input fields, indicating whether the
> entry for invalid words or for suggested words and expressions.

Not quite clear what you mean. A mockup or screenshot on the design page would be great.

> Further, I have been looking for a way to extract the live table data within
> Java, but have been unable to. Is there a way to do it?

You’ve use AWM to create the app? If so you should instead use the manual way as for the FAQ app tutorial here: http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial/FAQTutorialManual

If you follow this tutorial you should be able to answer your question I think.

To query xobject data you should use the QueryManager (see http://extensions.xwiki.org/xwiki/bin/view/Extension/Query%20Module#HFromJavacomponents).

> Lastly, as the number of validation settings pile up, I plan to reformat the
> UI of the configurable class of my app to one that is tabbed, like the
> WYSIWYG configurable class in the administration wiki, to achieve a cleaner
> look.

In order to help you it would be much nicer if you could show some screenshots/mockups of what you have and what you’d like to have so that we can provide feedback. If you do it and show it after it’s done then you might need to fully redo it if it doesn’t go in the right direction so I feel it could save you time if you could show something.

People also usually are more inclined to provide feedback when they see visually the things.

> I would greatly appreciate any comments on the above implementation plans,
> thanks!

I haven’t checked the code yet after my comments (I think there are still some comments I’ve mentioned that don’t have an answer; I remember asking you for an example of a setting since I believe a List is not the right format).

Globally looking good! Now we need to validate the code base so far (I’m a bit worried on the configuration aspect since it was completely off initially - you were not using the xwiki configuration mechanism). Will check now.

Thanks!
-Vincent

>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/GSOC-Update-4-Design-RedPen-Integration-tp7604291.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GSOC Update 4][Design] RedPen Integration

vmassol
Administrator
Hi again,

Just checked the maven build and found several issues that I’ve fixed.

Also noticed there’s no functional tests at all.

Could you please focus on having at least the infrastructure ready with a simple test that simply goes to the home page of the RedPen app for ex? You can check https://github.com/xwiki-contrib/application-faq/tree/master/application-faq-test as an example; it’ll be very very similar.

See also http://dev.xwiki.org/xwiki/bin/view/Community/Testing#HFunctionalTesting

Thanks
-Vincent

> On 6 Jul 2017, at 17:46, Vincent Massol <[hidden email]> wrote:
>
> Hi Desheng,
>
>> On 5 Jul 2017, at 06:32, deshengchuan <[hidden email]> wrote:
>>
>> Good day to all.
>> First, a quick update on the current status of the redpen extension:
>> It is now renamed as Content Checker, in consideration of implementing other
>> document checking technology in the future. Also content checker's results
>> are currently shown as logs, and the messages are split into warnings and
>> errors. Also, during automatic validation of a document on save, if an error
>> exists, the save is canceled.
>
> Sounds good for now. How do you configure if a check is a warning or an error?
>
>> Next, I am in the middle of adding most of the available validators from
>> redpen as a configurable setting. However there are validator settings that
>> require a dictionary i.e. Invalid words, suggested words and expressions. To
>> this end, I plan to reformat the application homepage,
>
> Could you show us a screenshot of the current home page?
>
> Also, is it possible to try the application right now? Can I build it and install it in my wiki? Is it going to work?
>
>> to add a select field
>> before the user enters into the text input fields, indicating whether the
>> entry for invalid words or for suggested words and expressions.
>
> Not quite clear what you mean. A mockup or screenshot on the design page would be great.
>
>> Further, I have been looking for a way to extract the live table data within
>> Java, but have been unable to. Is there a way to do it?
>
> You’ve use AWM to create the app? If so you should instead use the manual way as for the FAQ app tutorial here: http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial/FAQTutorialManual
>
> If you follow this tutorial you should be able to answer your question I think.
>
> To query xobject data you should use the QueryManager (see http://extensions.xwiki.org/xwiki/bin/view/Extension/Query%20Module#HFromJavacomponents).
>
>> Lastly, as the number of validation settings pile up, I plan to reformat the
>> UI of the configurable class of my app to one that is tabbed, like the
>> WYSIWYG configurable class in the administration wiki, to achieve a cleaner
>> look.
>
> In order to help you it would be much nicer if you could show some screenshots/mockups of what you have and what you’d like to have so that we can provide feedback. If you do it and show it after it’s done then you might need to fully redo it if it doesn’t go in the right direction so I feel it could save you time if you could show something.
>
> People also usually are more inclined to provide feedback when they see visually the things.
>
>> I would greatly appreciate any comments on the above implementation plans,
>> thanks!
>
> I haven’t checked the code yet after my comments (I think there are still some comments I’ve mentioned that don’t have an answer; I remember asking you for an example of a setting since I believe a List is not the right format).
>
> Globally looking good! Now we need to validate the code base so far (I’m a bit worried on the configuration aspect since it was completely off initially - you were not using the xwiki configuration mechanism). Will check now.
>
> Thanks!
> -Vincent
>
>>
>>
>>
>> --
>> View this message in context: http://xwiki.475771.n2.nabble.com/GSOC-Update-4-Design-RedPen-Integration-tp7604291.html
>> Sent from the XWiki- Dev mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GSOC Update 4][Design] RedPen Integration

deshengchuan
In reply to this post by vmassol
Sounds good for now. How do you configure if a check is a warning or an error?
I'm using a primitive way now actually. I just retrieve the type of validator from the error (which is in string), check it against an array of validators that are errors. Relevant code snippets are here: https://pastebin.com/4HQukUzU. I would appreciate any suggestions to make this code more elegant.


Also, is it possible to try the application right now? Can I build it and install it in my wiki? Is it going to work?
I am really sorry for delaying this, but it was working a couple days back until I added another bunch of code into it. I will get it working before this weekend.


Not quite clear what you mean. A mockup or screenshot on the design page would be great.
I will make mockup and screenshots asap. Meanwhile, my current application homepage still remains unchanged, accessible at http://http://design.xwiki.org/xwiki/bin/download/Proposal/RedPenIntegration/App_home.PNG.

You’ve use AWM to create the app? If so you should instead use the manual way as for the FAQ app tutorial here:
Yeah I actually used AWM. Will use the manual way to create it.

I haven’t checked the code yet after my comments (I think there are still some comments I’ve mentioned that don’t have an answer; I remember asking you for an example of a setting since I believe a List is not the right format).
Oops I must have missed them out. Sorry about that! I replied your latest github comment; I am unclear towards the nature of the example (do you request a code, screenshot etc)

Just checked the maven build and found several issues that I’ve fixed.

Also noticed there’s no functional tests at all.
Ok will work on the functional tests asap as well. Thank you for the guidance and the fixes, appreciate it very much :)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GSOC Update 4][Design] RedPen Integration

vmassol
Administrator

> On 6 Jul 2017, at 19:09, deshengchuan <[hidden email]> wrote:
>
>
>> Sounds good for now. How do you configure if a check is a warning or an
>> error?
>
> I'm using a primitive way now actually. I just retrieve the type of
> validator from the error (which is in string), check it against an array of
> validators that are errors. Relevant code snippets are here:
> https://pastebin.com/4HQukUzU <http://https://pastebin.com/4HQukUzU>  . I
> would appreciate any suggestions to make this code more elegant.

Ok so it’s hardcoded and thus static ATM.

A simple solution is simply to introduce a configuration API in the CheckerConfiguration interface:

Map<String, SeverityLevel> getSeverityLevels()

Note that in xwiki.properties it’ll be defined as:

redpen.severityLevels = SuccessiveWord = warning
redpen.severityLevels = DoubleNegative = error


>
>> Also, is it possible to try the application right now? Can I build it and
>> install it in my wiki? Is it going to work?
>
> I am really sorry for delaying this, but it was working a couple days back
> until I added another bunch of code into it. I will get it working before
> this weekend.

ok thanks

>
>> Not quite clear what you mean. A mockup or screenshot on the design page
>> would be great.
>
> I will make mockup and screenshots asap. Meanwhile, my current application
> homepage still remains unchanged, accessible at
> http://http://design.xwiki.org/xwiki/bin/download/Proposal/RedPenIntegration/App_home.PNG
> <http://http://design.xwiki.org/xwiki/bin/download/Proposal/RedPenIntegration/App_home.PNG>
> .

ok I’ve checked it and I don’t really understand why you have an app home page + an Admin UI page. Aren’t they both about admin configuration of RedPen? Why not a single place?

>
>> You’ve use AWM to create the app? If so you should instead use the manual
>> way as for the FAQ app tutorial here:
>
> Yeah I actually used AWM. Will use the manual way to create it.
>
>
>> I haven’t checked the code yet after my comments (I think there are still
>> some comments I’ve mentioned that don’t have an answer; I remember asking
>> you for an example of a setting since I believe a List is not the right
>> format).
>
> Oops I must have missed them out. Sorry about that! I replied your latest
> github comment; I am unclear towards the nature of the example (do you
> request a code, screenshot etc)
>
>
>> Just checked the maven build and found several issues that I’ve fixed.
>>
>> Also noticed there’s no functional tests at all.
>
> Ok will work on the functional tests asap as well. Thank you for the
> guidance and the fixes, appreciate it very much :)

Thanks
-Vincent
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/GSOC-Update-4-Design-RedPen-Integration-tp7604291p7604311.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GSOC Update 4][Design] RedPen Integration

deshengchuan
This post was updated on .
Hi, sorry for the late reply.

Ok so it’s hardcoded and thus static ATM.

A simple solution is simply to introduce a configuration API in the CheckerConfiguration interface:

Map<String, SeverityLevel> getSeverityLevels()

Note that in xwiki.properties it’ll be defined as:

redpen.severityLevels = SuccessiveWord = warning
redpen.severityLevels = DoubleNegative = error
Alright will work on this. Just to confirm with you, this means I would have to instantiate another configurationsource object to obtain the data, this one being xwikicfg configurationsource, right?

ok I’ve checked it and I don’t really understand why you have an app home page + an Admin UI page. Aren’t they both about admin configuration of RedPen? Why not a single place?
Hmmm.. I have been thinking about this design for a while. I feel that this home page is essentially dictionary of entries of invalid or less-than-perfect entries, which means it is going to store plenty of data, all of which is best displayed in a livetable macro for easy review and editing. Hence, I think there should be a separate section in the admin UI dedicated to showing the entries of the dictionary.

I have updated the UI accordingly in the proposal, please feel free to take a look. For quick reference, the "Dictionary" part is as follows: http://design.xwiki.org/xwiki/bin/download/Proposal/RedPenIntegration/updated_admin_ui.PNG
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GSOC Update 4][Design] RedPen Integration

vmassol
Administrator

> On 11 Jul 2017, at 17:17, deshengchuan <[hidden email]> wrote:
>
> Hi, sorry for the late reply.
>
>
>> Ok so it’s hardcoded and thus static ATM.
>>
>> A simple solution is simply to introduce a configuration API in the
>> CheckerConfiguration interface:
>>
>> Map
>> &lt;
>> String, SeverityLevel
>> &gt;
>> getSeverityLevels()
>>
>> Note that in xwiki.properties it’ll be defined as:
>>
>> redpen.severityLevels = SuccessiveWord = warning
>> redpen.severityLevels = DoubleNegative = error
>> …
>
> Alright will work on this. Just to confirm with you, this means I would have
> to instantiate another configurationsource object to obtain the data, this
> one being xwikicfg configurationsource, right?

In XWiki you don’t instantiate component: instead you ask to be injected, using @inject. In this case you ask to be injected a Configuration Source. You’re probably already doing that.

So there should be nothing to do if you use the “default” ConfigurationSource for example because it’ll fall back on other sources, including the “xwikiproperties” ConfigurationSource.

>
>> ok I’ve checked it and I don’t really understand why you have an app home
>> page + an Admin UI page. Aren’t they both about admin configuration of
>> RedPen? Why not a single place?
>
> Hmmm.. I have been thinking about this design for a while. I feel that this
> home page is essentially dictionary of entries of invalid or
> less-than-perfect entries, which means it is going to store plenty of data,
> all of which is best displayed in a livetable macro for easy review and
> editing. Hence, I think there should be a separate section in the admin UI
> dedicated to showing the entries of the dictionary.
>
> I have updated the UI accordingly in the proposal, please feel free to take
> a look. For quick reference, the "Dictionary" part is as follows:
> http://design.xwiki.org/xwiki/bin/download/Proposal/RedPenIntegration/updated_admin_ui_2.PNG
> <http://design.xwiki.org/xwiki/bin/download/Proposal/RedPenIntegration/updated_admin_ui_2.PNG>  

Cool, that looks nice (the two tabs!). Note that you seem to be missing some translation in the screenshot but that’s a detail.

Thanks
-Vincent

>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/GSOC-Update-4-Design-RedPen-Integration-tp7604291p7604345.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GSOC Update 4][Design] RedPen Integration

vmassol
Administrator

> On 11 Jul 2017, at 18:59, Vincent Massol <[hidden email]> wrote:
>
>>
>> On 11 Jul 2017, at 17:17, deshengchuan <[hidden email]> wrote:
>>
>> Hi, sorry for the late reply.
>>
>>
>>> Ok so it’s hardcoded and thus static ATM.
>>>
>>> A simple solution is simply to introduce a configuration API in the
>>> CheckerConfiguration interface:
>>>
>>> Map
>>> &lt;
>>> String, SeverityLevel
>>> &gt;
>>> getSeverityLevels()
>>>
>>> Note that in xwiki.properties it’ll be defined as:
>>>
>>> redpen.severityLevels = SuccessiveWord = warning
>>> redpen.severityLevels = DoubleNegative = error
>>> …
>>
>> Alright will work on this. Just to confirm with you, this means I would have
>> to instantiate another configurationsource object to obtain the data, this
>> one being xwikicfg configurationsource, right?
>
> In XWiki you don’t instantiate component: instead you ask to be injected, using @inject. In this case you ask to be injected a Configuration Source. You’re probably already doing that.
>
> So there should be nothing to do if you use the “default” ConfigurationSource for example because it’ll fall back on other sources, including the “xwikiproperties” ConfigurationSource.

Note that you can find some more information here:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Configuration%20Module

Thanks
-Vincent

>
>>
>>> ok I’ve checked it and I don’t really understand why you have an app home
>>> page + an Admin UI page. Aren’t they both about admin configuration of
>>> RedPen? Why not a single place?
>>
>> Hmmm.. I have been thinking about this design for a while. I feel that this
>> home page is essentially dictionary of entries of invalid or
>> less-than-perfect entries, which means it is going to store plenty of data,
>> all of which is best displayed in a livetable macro for easy review and
>> editing. Hence, I think there should be a separate section in the admin UI
>> dedicated to showing the entries of the dictionary.
>>
>> I have updated the UI accordingly in the proposal, please feel free to take
>> a look. For quick reference, the "Dictionary" part is as follows:
>> http://design.xwiki.org/xwiki/bin/download/Proposal/RedPenIntegration/updated_admin_ui_2.PNG
>> <http://design.xwiki.org/xwiki/bin/download/Proposal/RedPenIntegration/updated_admin_ui_2.PNG>  
>
> Cool, that looks nice (the two tabs!). Note that you seem to be missing some translation in the screenshot but that’s a detail.
>
> Thanks
> -Vincent
>
>>
>> --
>> View this message in context: http://xwiki.475771.n2.nabble.com/GSOC-Update-4-Design-RedPen-Integration-tp7604291p7604345.html
>> Sent from the XWiki- Dev mailing list archive at Nabble.com.

Loading...