Announcing Ambidexterity: TTW views, defaults, validators and vocabularies for Dexterity

Just uploaded to PyPI: collective.ambidexterity, 1.0b1.

Ambidexterity provides through-the-web editing of views, defaults, validators and vocabularies for Dexterity content types.

Once installed, you may use Ambidexterityto add view templates for all Dexterity content types. View templates are standard Plone page templates using TAL for dynamic content.

Default, validator and vocabulary scripts may be added for all Dexterity content types that you have created through-the-web. You may not add default, validator or vocabulary scripts for content types that have been set up via Python packages. (Exception: if the content-type's fields are definedd in a model source attribute of the FTI, you may add Ambidexterity scripts.)

Default, validator and vocabulary scripts are much like the Scripts (Python) that may be added via the Zope Management Interface. They will execute in a Restricted Python environment with the privileges of the logged-in user. Limited imports are available.

Restricted Python provides a safety net for programmers who don't know the details of the Zope/Plone security model. If you are running up against the limitations of Restricted Python, you should consider migrating your Ambidexterity code to a Python package. It is important that you understand that the safety net is not perfect: it is not adequate to protect your site from coding by an untrusted user. Only highly trusted users should be allowed to use the Ambidexterity editor. It is by default restricted to site managers.

Lots still to do. Contributors welcome. Look in the collective.

Test coverage: pretty good for the nuts and bolts.
The user interface is currently completely untested.
If you're up-to-date on robot testing, your assistance would be appreciated.

Docs: Currently rudimentary, but probably adequate for many knowledgeable users.

i18n: Undeveloped.

Accessibility: Undeveloped.


the source code is not in the collective, but here:

Sure it is:

I've removed the old gitlab repo to prevent future confusion.

1 Like

I really like the direction of this project. I think it will make explaining content types and views much easier to new developers and users.

I'm doing some testing of your product. I think this would be very useful. I'm not a programmer; however, I am fairly experienced Plone user and would be willing to do user testing if that will help.

Here's what I've tried.
First, I was able to succesfully make very simple edits to an existing view of Plone product. So I know the basic installation is working.

Here is where I a having trouble:

  1. I created a junk dex type "test" with one pulldown added. (export included in upload)
  2. i went to ambidex and under the 'test' type, the pulldown was listed (very nice) . i changed the default from None to Wayne. saved changes
  3. tried to create new instance of content type, got the error (included)
  4. removing the changes i made in ambidex removes the error.

here is a link to the files and notes:!Av77gzI-0ns9iFm20-dDgGxyeckp
am i misunderstanding how to use your product?

I appreciate the work you're doing for Plone and would like to support you and this product if I can help

You've found a bug! Will fix!

thanks @smcmahon

Please let me know when the new version comes out, I'll continue user testing. Let me know if there is some specific thinks you want me to test.

1 Like

1.0b2 is now uploaded and should fix the problem.

I updated to 1.0b2. (I verified during buildout)

now when I create a new Dex type, it does show at all in the pull-down for Ambidex , as it had before

Sounds like some of the AJAX responses (from the package) may need no-cache headers.

Does a page refresh fix it?

Oh, IE11 in particular is nasty with caching ajax responsive. :frowning: . It actively deceives you in its developer tools by suggesting a 304 not modified has been done when it actually serves ajax responses out of its localcache, a normal refresh doesn't help. Every other browser will not cache in absence of cache headers, IE thinks it can and does.

See✓&q=no-cache&type= for some sprinkled no-cache headers.

Uggh. Thanks, Fred!

rileydog: b3 uploaded to PyPI. Give it a try and see if it fixes the problem.

Hi, OK, it works.

I only understand how to use the view. the other require script which right now I don't work with. To programmers the need for a script to set defaults I'm sure make sense. I thought I would either be able to simply replace 'None" with a value. for the vocabulary, I thought I could give a path to an existing vocab. Both are likely naive because I'm a user, not programmer.

However, I have had many times where I wanted to use a defined vocabulary and/or define a default value for a pulldown. Each time, I need a programmer. I'd love to see this tool help out towards that.

One suggestion for future release:
When a view is updated, it updates existing instances of the CT. Although this may be obvious to most people (outside of me while I was testing), consider having a pop up of some kind when any changes are made to existing CT and let user know existing types will be updated.

Just a thought. I think The view portion of the product is pretty clear.