I want the ability to create vocabularies TTW

thanks for the discussion and suggestions

I have looked at each product mentioned and I installed ATVocabularyManger. Here is what I learned:

  1. my use case is for very easily creating a simple plone vocabulary (e.g. store locations) and seldom more that a dozen elements. Also, for that website only, no intent of sharing (or importing) in a common format (e.g. VDEX). I came about this need when creating Dex forms and need the ability to power a selection widget, but did not want to hard code values in the form.

  2. The vocab created must be available as data in a Dex form widget (other locations, not sure).

  3. I agree with dylan that looking at existing proudcts, modifying if needed,is better than lots of half baked ideas. thanks for that

  4. the VocabManger is very close to what I want, and will propose some chagnes. However, although P5 compatible I didn't see where it works in Dex. Does it??

  5. attached is rough mock up of what I would see. (Not shown would be ability to edit existing vocabs created via this tool)

  6. this one tool would allow admins to manage the very large vocabs you folks use and easily create small vocabs for data sources of that site.

Am I off the mark?

1 Like

I forgot to add a link to the online vdexeditor we wrote: https://github.com/starzel/vdexeditor

Very nice comparison of existing add-ons! ( https://github.com/collective/collective.importexport#comparison-to-other-plugins ) We need this for every add-on, but unfortunately the "Plone Packages" effort stalled years ago (i.e. create a site like https://www.djangopackages.com/ for Plone). It may be time to revisit that effort.

2 Likes

Well all we need is a wiki with a page per plugin type.

What about the SKOS format? It is quite popular now.

About collective.taxonomy, we forked it for a customer project : https://github.com/cedricmessiant/collective.taxonomy/
Most of the work done in this fork is about changing the tree editor by a ReactJS application to edit the taxonomy. We should make a pull request but unfortunately the javascripts are not internationalized and tested yet.

You may want to make it a branch of the collective/collective.taxonomy, create a PR from there marked as WIP including a todo-checklist. So others can jump on and help out.

3 Likes

Thanks for the thoughts.
I am still looking into this and will report back if/when I make progress

This should be part of the developer docs on best practices

I hired @vipod to look into AT VocabManager

he said there was a fork in Github that mostly worked in P5 , he just made minor change. I tested and can report it works fine in P5

However, it doesn't work with Dexterity, which limits is usefulness, at least for Site Admins who would build in Dex.

My understanding from vipod is this would be difficult to get it to work in Dex. Any comments or ideas?

Note: anyone interested in where the code is etc, please contact vipod. - I don't have it.

thanks.

since I am the initial author of ATVM I am interested in getting it to Plone 5. actually it i'd propose to just writer a new package based on vdex and dx. a migration should be straight forward. I sketched the idea multiple times in my head, its - using our current code base, including collective.vdexvocabulary - about two weeks effort if I would do it.

Hi, your product works great in P5 (with exception of Dex). in case you haven't seen it in P5, here is a dev site that has it workng
http://104.168.170.41:8090/www/portal_vocabularies/ login: admin/admin
(this is a site that my developer put up for me.)
If I understand you right, you only want to deal with vdex and not have the current option of "simple vocab". I've used that option to create several vocabs on the site, just to test. this is exactly what a site admin would need to create a vocab for their dex form. If I understand you right, this ability would be lost. I hope you wouldn't do that.
the only change needed to to have it Dex compatible (that is the vocab is usable with TTW dex CTs. Is this a big challenge? Can I help?

@rileydog you could fund the development work @jensens describes... that would be an awesome contribution to Plone!

@rileydog I'd like to start over with a very simple approach given the following base scenario:

I want/ my customers needs:

  1. a standardized format, to be exported and imported if needed
  2. multilingual vocabularies
  3. TTW editing of simple and tree vocabularies in Plone.

So let sketch me the base idea. But some code history first:
ATVM was written for Plone 2.1 and got extended with the help of lots of people. Today I'd no longer use content types to build up a list or tree to describe vocabularies. I also would not use the content translations to build up multilingual vocabularies.

How to implement it:

First we cover (1) and (2) above already with collective.vdexvocabulary. VDEX is in fact a very simple well defined XML format - simple if we skip the feature of references. Latter is rarely used and may be implemented later.

But c.vdexvocabulary does solve it on zcml level not on content level. Neither has it an editor. In c.vdexvocabulary vocabularies are registered with zcml. If we turn them into plone.resource based resources they can exist in FS and in ZODB. We change the registration part from zcml to registry.xml. Currently the ZCML directive registers a zope.schema.interfaces.IVocabularyFactory utility. We may turn this in a local component (which I personally dont like much, I'd investigatre here to find a better solution). We reuse the VdexTranslationDomain to handle translations.

Since then its easy to edit the xml ttw. With a control panel -also to create new vocabularies and a text field - maybe using ACE editor - its still editing XML and thats not that comfortable, but would work at first.

In a second step I'd write a JS editor for VDEX. This can be a simple one showing a tree at the left and a form for the entry at the right or something more complex, but since vdex is a tree of simple nodes key ->en: value, de:value, ... this is not that difficult, but needs some UI planning.

I'd not continue on c.vdexvocabulary but create a new package. c.vdexvocabulary is used in the wild and the code in it is not very consistent. Given one want to migrate from c.vdexvocabulary to the new package its easy because its just a vdex file to move around and some zcml to registry changes.

Reusing the treevocabulary code together with it's translation mechanism saves time and testing. It uses the imsvdex python package which is a bit aged but just works, at first I'd keep it as is.

Then we need the new registration and control panel.

Upon here we have a fully working addon. I'd say until I'd estimate roughly at 4-5 days plus 1 day fixing Plone bugs to be found while working on it.

The JS Editor for VDEX is now the next thing. This is difficult to estimate without a better concept. Very very roughly I estimate 1-2 days for UI/UX planning and 3-4 days for implementation.

Migration from ATVM:
Given one has important vocabularies in ATVM, even multilingual, the writing an exported to vdex is not complex. Given writing an exporter to CSV is even easier, vdexcsv may be used to convert.

Please, consider to use also SKOS because it is the new vocabulary/classifications standard and it is used a lot in various project. Most important international classifications are provided already in SKOS format.

@jensens you should really look at collective.taxonomy.

Testing it now for a multilinguall site and first impressions is that it t works. I can import a vdex with multiple languages, and they seem to follow the translations of the rest of the site.

I really like the automatic generated named vocabularies and behaviours, so it makes it very easy to use on dexterity content types and makes it easy to use for non developers.

Did you look at it?

@martior I had tried that, got lots of errors and site wouldn't start. I am running plone 5, not sure if I made that clear.

looking at https://pypi.python.org/pypi/collective.taxonomy/1.2.3 it is compatible with P4. Is there a P5 version anywhere?

Also, one thing I don't like is there is about a dozen of dependencies. Too many things to break. ATVocab doesn't have that. Just my preference to keep things as simple as possible. :slight_smile:

Like Cédric said in another thread, please take a look at what we did in our fork https://github.com/cedricmessiant/collective.taxonomy
We did a react based TTW tree editor and overlay to edit translations (to replace the poor jstree implementation). You can import/export a vdex file.
The app still need to be internationalized. We didn't have time to do that, so there is still no PR to the original repo.

3 Likes

thanks folks, I'll take a look at this in a few days.

Right, this site is still on plone4 with linguaplone but for this content type we use dexterity. @vincentfretin thanks for the tip, this site is hopefully getting plone 5 this year so that is very useful.