[xwiki-devs] OfficeImporter interface enhancements: space & page input
Hi devs, I have been working on two small enhancements for officeimporter interface: 1. Use a drop-down list for target space input field. This list contains all existing spaces + an option to create a new space. 2. Suggest the target page name based on the input file name. To implement these two features I used bit of javascript which I embedded in the XWiki.OfficeImporter page (inside <script> tags). I didn't bother using JSX because this javascript fragment is really small. Is this ok? In the first feature, the user can select one of existing spaces. If he selects the [New Space] option, a javascript un-hides a text field into which the user can type in the new space name. Question; should I worry about browsers with javascript disabled? Any hints about how to handle such a scenario? :) The second feature calculates the target page name based on the input file name and updates the "Target page" text field. If the user does not like the auto-generated page name, he can adjust the value in "Target page" text field manually. For an example, if the input file name is "My Word Document.doc" the target page name will be "My Word Document". This calculation + update is also done in javascript. Please let me know what you think, I didn't commit these features because I am not sure if my approach is ok. Thanks. - Asiri
Hi Asiri, On Mon, May 25, 2009 at 5:16 PM, Asiri Rathnayake < [email protected]> wrote:
Hi devs,
I have been working on two small enhancements for officeimporter interface:
Cool :-) 1. Use a drop-down list for target space input field. This list contains all
existing spaces + an option to create a new space.
2. Suggest the target page name based on the input file name.
Great. Both seem fine to me. A potential issue will arise when / if a wiki has a lot of spaces. You could maybe add a check and if the wiki has more than 50 spaces replace the select box with a text input with autosuggest, or make autosuggest the default.
To implement these two features I used bit of javascript which I embedded in the XWiki.OfficeImporter page (inside <script> tags). I didn't bother using JSX because this javascript fragment is really small. Is this ok?
In the first feature, the user can select one of existing spaces. If he selects the [New Space] option, a javascript un-hides a text field into which the user can type in the new space name. Question; should I worry about browsers with javascript disabled? Any hints about how to handle such a scenario? :)
You can add a layer: 1. Default state: text input is shown, space selector is hidden 2. When loading the page, a JS command switches both inputs (text input is now hidden and space selector is shown) 3. When selecting "New space", a JS command switches the text input to show it This way if JS is disabled only the text input is shown and if JS is available your current behavior keeps working. The second feature calculates the target page name based on the input file
name and updates the "Target page" text field. If the user does not like the auto-generated page name, he can adjust the value in "Target page" text field manually. For an example, if the input file name is "My Word Document.doc" the target page name will be "My Word Document". This calculation + update is also done in javascript.
This sounds ok to me. If JS is disabled it will keep working as it currently does which is fine too. Please let me know what you think, I didn't commit these features because I
am not sure if my approach is ok.
Can you make them available on incubator.myxwiki.org for review? Thanks, Guillaume
Thanks.
- Asiri _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Lerouge Product Manager - XWiki Skype ID : wikibc http://guillaumelerouge.com/
Hi Guillaume, On Mon, May 25, 2009 at 8:58 PM, Guillaume Lerouge <[email protected]>wrote:
Great. Both seem fine to me. A potential issue will arise when / if a wiki has a lot of spaces. You could maybe add a check and if the wiki has more than 50 spaces replace the select box with a text input with autosuggest, or make autosuggest the default.
I will work on this little later, first I need to fix js-disabled case :)
To implement these two features I used bit of javascript which I embedded in the XWiki.OfficeImporter page (inside <script> tags). I didn't bother using JSX because this javascript fragment is really small. Is this ok?
In the first feature, the user can select one of existing spaces. If he selects the [New Space] option, a javascript un-hides a text field into which the user can type in the new space name. Question; should I worry about browsers with javascript disabled? Any hints about how to handle such a scenario? :)
You can add a layer:
1. Default state: text input is shown, space selector is hidden 2. When loading the page, a JS command switches both inputs (text input is now hidden and space selector is shown) 3. When selecting "New space", a JS command switches the text input to show it
This way if JS is disabled only the text input is shown and if JS is available your current behavior keeps working.
Cool, will do that :) Can you make them available on incubator.myxwiki.org for review?
http://incubator.myxwiki.org/xwiki/bin/view/XWiki/OfficeImporter This is really out-dated and I don't think we have an active openoffice server deployed at myxwiki.org. But anyways an openoffice server is not required for officeimporter application UI demos. U don't have admin rights for incubator.myxwiki.org, can you give me admin rights so that i can update the application? :) Thanks. - Asiri
On Tue, May 26, 2009 at 9:47 AM, Asiri Rathnayake < [email protected]> wrote:
Hi Guillaume,
On Mon, May 25, 2009 at 8:58 PM, Guillaume Lerouge <[email protected]>wrote:
Great. Both seem fine to me. A potential issue will arise when / if a wiki has a lot of spaces. You could maybe add a check and if the wiki has more than 50 spaces replace the select box with a text input with autosuggest, or make autosuggest the default.
I will work on this little later, first I need to fix js-disabled case :)
To implement these two features I used bit of javascript which I embedded in the XWiki.OfficeImporter page (inside <script> tags). I didn't bother using JSX because this javascript fragment is really small. Is this ok?
In the first feature, the user can select one of existing spaces. If he selects the [New Space] option, a javascript un-hides a text field into which the user can type in the new space name. Question; should I worry about browsers with javascript disabled? Any hints about how to handle such a scenario? :)
You can add a layer:
1. Default state: text input is shown, space selector is hidden 2. When loading the page, a JS command switches both inputs (text input is now hidden and space selector is shown) 3. When selecting "New space", a JS command switches the text input to show it
This way if JS is disabled only the text input is shown and if JS is available your current behavior keeps working.
Cool, will do that :)
Can you make them available on incubator.myxwiki.org for review?
http://incubator.myxwiki.org/xwiki/bin/view/XWiki/OfficeImporter
This is really out-dated and I don't think we have an active openoffice server deployed at myxwiki.org. But anyways an openoffice server is not required for officeimporter application UI demos.
U don't have admin rights for incubator.myxwiki.org, can you give me admin rights so that i can update the application? :)
Correction: "I don't have admin rights...."
Thanks.
- Asiri
Hi again, 1. Use a drop-down list for target space input field. This list contains all
existing spaces + an option to create a new space.
2. Suggest the target page name based on the input file name.
Great. Both seem fine to me. A potential issue will arise when / if a wiki has a lot of spaces. You could maybe add a check and if the wiki has more than 50 spaces replace the select box with a text input with autosuggest, or make autosuggest the default.
Ok, I think we need to decide on this first. Should we use an auto-suggest box by default or shall we stick with the drop-down list? I don't think we should have a combination of both (drop down if < 50 otherwise auto-suggest) because this is not consistent with other UIs in the wiki. I think we should go with auto-suggest and dump the drop-down list. WDYT? Please reply asap so that I can start working :) Thanks. - Asiri
Hi Asiri, Asiri Rathnayake wrote:
Hi again,
1. Use a drop-down list for target space input field. This list contains all
existing spaces + an option to create a new space.
2. Suggest the target page name based on the input file name.
Great. Both seem fine to me. A potential issue will arise when / if a wiki has a lot of spaces. You could maybe add a check and if the wiki has more than 50 spaces replace the select box with a text input with autosuggest, or make autosuggest the default.
Ok, I think we need to decide on this first. Should we use an auto-suggest box by default or shall we stick with the drop-down list?
I don't think we should have a combination of both (drop down if < 50 otherwise auto-suggest) because this is not consistent with other UIs in the wiki. I think we should go with auto-suggest and dump the drop-down list. WDYT?
+1 for using only the auto-suggest. Thanks, Marius
Please reply asap so that I can start working :)
Thanks.
- Asiri _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi, On Tue, May 26, 2009 at 8:35 AM, Marius Dumitru Florea < [email protected]> wrote:
Hi Asiri,
Asiri Rathnayake wrote:
Hi again,
1. Use a drop-down list for target space input field. This list contains all
existing spaces + an option to create a new space.
2. Suggest the target page name based on the input file name.
Great. Both seem fine to me. A potential issue will arise when / if a wiki has a lot of spaces. You could maybe add a check and if the wiki has more than 50 spaces replace the select box with a text input with autosuggest, or make autosuggest the default.
Ok, I think we need to decide on this first. Should we use an auto-suggest box by default or shall we stick with the drop-down list?
I don't think we should have a combination of both (drop down if < 50 otherwise auto-suggest) because this is not consistent with other UIs in the wiki. I think we should go with auto-suggest and dump the drop-down list. WDYT?
+1 for using only the auto-suggest.
+1 for the autosuggest too as it's the default tool used all around XWiki right now. Guillaume PS: you now have admin rights on incubator.myxwiki.org ;-)
Thanks, Marius
Please reply asap so that I can start working :)
Thanks.
- Asiri _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Lerouge Product Manager - XWiki Skype ID : wikibc http://guillaumelerouge.com/
Hi, PS: you now have admin rights on incubator.myxwiki.org ;-) http://incubator.myxwiki.org/xwiki/bin/view/XWiki/OfficeImporter (drop-down approach) Would be great if we can get an openoffice server there as well ;) - Asiri
participants (3)
-
Asiri Rathnayake -
Guillaume Lerouge -
Marius Dumitru Florea