[SF] Version 2.1: Modified syntax, popup forms, improved Special:CreateForm, etc.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[SF] Version 2.1: Modified syntax, popup forms, improved Special:CreateForm, etc.

Yaron Koren
Hi all,

Version 2.1 of Semantic Forms has been released. As you can guess from the
number, this is a fairly major new release. The many additions and changes
in this version include:

- The syntax for autocompletion was changed somewhat. Two new input types
were added: "text with autocomplete" and "textarea with autocomplete". These
are meant to replace the old "autocomplete" and "no autocomplete" as a way
to signify whether or not the input should have autocompletion - the
formerly standard "text" and "textarea" input types now indicate that no
autocompletion should happen. In addition to that, the parameter names
changed: instead of "autocomplete on...", it's "values from...", in the
manner of the other input types like dropdown, etc.

It should be noted that, where possible, handling was also kept for the old
syntax, to try to minimize the impact of the changeover. But the old syntax
is now officially deprecated, for what it's worth.

This changeover is part of a larger effort to make the syntax more standard,
and more input-type-based. Until now, the syntax was sort of haphazard, and
unpredictable: for instance, adding "values=" to a "text" input turned it
into a dropdown input. The system now works much more like SMW's #ask
queries, where one parameter (there, the format, and here, the input type)
dictates the allowed set of most of the other parameters.

- Tied in with that, the page Special:CreateForm now lets you set all the
parameters for each form field, with the group of parameters shown based on
the input type selected, in the manner of SMW's Special:Ask page.

- Also tied in with that, the parameters "values from property=" and "values
from namespace=" were added to the enumeration inputs (dropdown,
radiobutton, etc.); and the parameter "values=" was added to the
autocomplete inputs. So now all the "values..." options are available across
all the input types that support values; with the exception of "values from
url=", which is available only for autocomplete inputs.

- Also (somewhat) tied in with that, the "datetime with timezone" input type
was deprecated, replaced by a new parameter, "include timezone", for the
"datetime" input.

- You can now have forms show up in a popup window, which is a nice way of
keeping the focus on a central page - something people have been asking
about for a long time. This is by done by just adding the parameter "|popup"
into either #formlink or #forminput. Thanks to Stephan Gambke for this
addition.

- As part of this change, two new files were added to SF: SF_popupform.js
and SF_popupform.css.

- Stephan has also been added as an official co-author of Semantic Forms, in
recognition of his many contributions to SF, including the preview
functionality, the registration system for other extensions' input-type
Javascript functions, and now popup forms.

- For the "combobox" input type, the "existing values only" parameter was
added, which lets you set the combobox to only allow values that were
pre-set, instead of typing in any value - essentially, it lets a combobox
function as a dropdown. (By the way, if anyone can think of a parameter name
for this that's shorter than "existing values only", but is still
understandable, please let me know. :) )

- Handling of "show on select" for the 'checkbox' and 'checkboxes' input
types was fixed for Internet Explorer.

- Parsing of the form definition was fixed to work with MediaWiki 1.18, and
improved in general, with help from Tim Starling.

- Validation of numbers was improved to allow for numbers in scientific
notation, thanks to an anonymous commenter.

- The loading of jQuery was improved in Special:RunQuery, again thanks to
Stephan.

- Encoded ampersands within the "query string=" parameter in #forminput
(they can be encoded as either "%26" or "&") are now passed on correctly
to the form.

- Handling was added for the new-ish MediaWiki
setting $wgCapitalLinkOverrides, which was added in MW 1.16.

- There were various other improvements to the PHP and Javascript code,
including some fixes for greater compatibility with MediaWiki 1.18.

As always, you can read more, and download the new version, here:

http://www.mediawiki.org/wiki/Extension:Semantic_Forms

-Yaron
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: [SF] Version 2.1: Modified syntax, popup forms, improved Special:CreateForm, etc.

Neill Mitchell
This is great stuff! Thanks guys!

The "values from property=" is very welcome :)

Re. jQuery was improved in Special:RunQuery. Does this fix the IE back
button issue?
https://bugzilla.wikimedia.org/show_bug.cgi?id=27497

Cheers
Neill.


On 07/03/11 21:31, Yaron Koren wrote:

> Hi all,
>
> Version 2.1 of Semantic Forms has been released. As you can guess from the
> number, this is a fairly major new release. The many additions and changes
> in this version include:
>
> - The syntax for autocompletion was changed somewhat. Two new input types
> were added: "text with autocomplete" and "textarea with autocomplete". These
> are meant to replace the old "autocomplete" and "no autocomplete" as a way
> to signify whether or not the input should have autocompletion - the
> formerly standard "text" and "textarea" input types now indicate that no
> autocompletion should happen. In addition to that, the parameter names
> changed: instead of "autocomplete on...", it's "values from...", in the
> manner of the other input types like dropdown, etc.
>
> It should be noted that, where possible, handling was also kept for the old
> syntax, to try to minimize the impact of the changeover. But the old syntax
> is now officially deprecated, for what it's worth.
>
> This changeover is part of a larger effort to make the syntax more standard,
> and more input-type-based. Until now, the syntax was sort of haphazard, and
> unpredictable: for instance, adding "values=" to a "text" input turned it
> into a dropdown input. The system now works much more like SMW's #ask
> queries, where one parameter (there, the format, and here, the input type)
> dictates the allowed set of most of the other parameters.
>
> - Tied in with that, the page Special:CreateForm now lets you set all the
> parameters for each form field, with the group of parameters shown based on
> the input type selected, in the manner of SMW's Special:Ask page.
>
> - Also tied in with that, the parameters "values from property=" and "values
> from namespace=" were added to the enumeration inputs (dropdown,
> radiobutton, etc.); and the parameter "values=" was added to the
> autocomplete inputs. So now all the "values..." options are available across
> all the input types that support values; with the exception of "values from
> url=", which is available only for autocomplete inputs.
>
> - Also (somewhat) tied in with that, the "datetime with timezone" input type
> was deprecated, replaced by a new parameter, "include timezone", for the
> "datetime" input.
>
> - You can now have forms show up in a popup window, which is a nice way of
> keeping the focus on a central page - something people have been asking
> about for a long time. This is by done by just adding the parameter "|popup"
> into either #formlink or #forminput. Thanks to Stephan Gambke for this
> addition.
>
> - As part of this change, two new files were added to SF: SF_popupform.js
> and SF_popupform.css.
>
> - Stephan has also been added as an official co-author of Semantic Forms, in
> recognition of his many contributions to SF, including the preview
> functionality, the registration system for other extensions' input-type
> Javascript functions, and now popup forms.
>
> - For the "combobox" input type, the "existing values only" parameter was
> added, which lets you set the combobox to only allow values that were
> pre-set, instead of typing in any value - essentially, it lets a combobox
> function as a dropdown. (By the way, if anyone can think of a parameter name
> for this that's shorter than "existing values only", but is still
> understandable, please let me know. :) )
>
> - Handling of "show on select" for the 'checkbox' and 'checkboxes' input
> types was fixed for Internet Explorer.
>
> - Parsing of the form definition was fixed to work with MediaWiki 1.18, and
> improved in general, with help from Tim Starling.
>
> - Validation of numbers was improved to allow for numbers in scientific
> notation, thanks to an anonymous commenter.
>
> - The loading of jQuery was improved in Special:RunQuery, again thanks to
> Stephan.
>
> - Encoded ampersands within the "query string=" parameter in #forminput
> (they can be encoded as either "%26" or "&") are now passed on correctly
> to the form.
>
> - Handling was added for the new-ish MediaWiki
> setting $wgCapitalLinkOverrides, which was added in MW 1.16.
>
> - There were various other improvements to the PHP and Javascript code,
> including some fixes for greater compatibility with MediaWiki 1.18.
>
> As always, you can read more, and download the new version, here:
>
> http://www.mediawiki.org/wiki/Extension:Semantic_Forms
>
> -Yaron
> ------------------------------------------------------------------------------
> What You Don't Know About Data Connectivity CAN Hurt You
> This paper provides an overview of data connectivity, details
> its effect on application quality, and explores various alternative
> solutions. http://p.sf.net/sfu/progress-d2d
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: [SF] Version 2.1: Modified syntax, popup forms, improved Special:CreateForm, etc.

Stephan Gambke
Hi Neill,

Am 08.03.2011 18:24, schrieb Neill Mitchell:
> Re. jQuery was improved in Special:RunQuery. Does this fix the IE back
> button issue?
> https://bugzilla.wikimedia.org/show_bug.cgi?id=27497

If it was then not intentionally. I guess, the only way to find out is
to try.

Stephan

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: [SF] Version 2.1: Modified syntax, popup forms, improved Special:CreateForm, etc.

Neill Mitchell
Sure, I'll get one of my IE users to test. They will be very pleased if
it has solved it.

Cheers
Neill.

On 08/03/11 19:01, Stephan Gambke wrote:

> Hi Neill,
>
> Am 08.03.2011 18:24, schrieb Neill Mitchell:
>> Re. jQuery was improved in Special:RunQuery. Does this fix the IE back
>> button issue?
>> https://bugzilla.wikimedia.org/show_bug.cgi?id=27497
> If it was then not intentionally. I guess, the only way to find out is
> to try.
>
> Stephan
>

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: [SF] Version 2.1: Modified syntax, popup forms, improved Special:CreateForm, etc.

Neill Mitchell
Unfortunately with SF 2.1 my Special:RunQuery now throws an error:

Fatal error: Call to a member function getNamespace() on a non-object in
/home/webapps/parentvoice_dev/extensions/SemanticMediaWiki/includes/SMW_ParserExtensions.php
on line 34

Fine with 2.0.9.

I'm running MW 1.16.2 and SMW 1.5.6

Any ideas?

Thanks
Neill.


On 08/03/11 19:42, Neill Mitchell wrote:

> Sure, I'll get one of my IE users to test. They will be very pleased if
> it has solved it.
>
> Cheers
> Neill.
>
> On 08/03/11 19:01, Stephan Gambke wrote:
>> Hi Neill,
>>
>> Am 08.03.2011 18:24, schrieb Neill Mitchell:
>>> Re. jQuery was improved in Special:RunQuery. Does this fix the IE back
>>> button issue?
>>> https://bugzilla.wikimedia.org/show_bug.cgi?id=27497
>> If it was then not intentionally. I guess, the only way to find out is
>> to try.
>>
>> Stephan
>>
> ------------------------------------------------------------------------------
> What You Don't Know About Data Connectivity CAN Hurt You
> This paper provides an overview of data connectivity, details
> its effect on application quality, and explores various alternative
> solutions. http://p.sf.net/sfu/progress-d2d
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: [SF] Version 2.1: Modified syntax, popup forms, improved Special:CreateForm, etc.

Jeroen De Dauw-2
Hey,

I just had a look at the SMW code, and although I'm not familiar with the SF
code involved (and the changes to it), I'd guess SF is now using the parser
on this special page, in a way that no title is set for it. Probably SMW
should do a better check if it's set or not.

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil.
--
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: [SF] Version 2.1: Modified syntax, popup forms, improved Special:CreateForm, etc.

Stephan Gambke
In reply to this post by Neill Mitchell
Am 08.03.2011 21:02, schrieb Neill Mitchell:
> Unfortunately with SF 2.1 my Special:RunQuery now throws an error:
>
> Fatal error: Call to a member function getNamespace() on a non-object in
> /home/webapps/parentvoice_dev/extensions/SemanticMediaWiki/includes/SMW_ParserExtensions.php
> on line 34

Ok, we found the problem.

Summary for the list:
As Jeroen pointed out, there were changes in the way SF uses the parser.
Alas this has the effect of forms not being cached any more, even if
$sfgCacheFormDefinitions is set to true. Worse, data cached while still
using SF 2.0.9 will trigger the fatal error Neill experienced.

Easy workaround: Set $sfgCacheFormDefinitions to false. This is the
default, so if you never cared about it, you don't have to care about it
now.

Cheers,
Stephan

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user