Plone 5 resource registries UI: very easy to screw up

Hi there,

as a consumer and integrator of Plone 5 functionality I tried (for the first time) to use the resource registries development mode for

In particular I tried to make changes to local.js and test them later.

The resource registry UI is very fragile and not very robust.

It it easy to mess it up with some custom JS code with the result that the UI only displays the options to remove the related compiled bundle files...this sucks.

In addition there is no straight forward way and easy way to update and test local resources (like the local.js file of the plone-legacy bundle in my case). You have to click on development mode -> develop Javascript...but wait...why is there no BUILD button? Obviously because the plone-legacy bundle does not include an build process? But how to update plone-legacy-compiled.js file?

The complete magic behind "Develop CSS/JS" buttons is also very fragile. For bundles other than plone-legacy these buttons can be toggled (from grey to orange and back)...but for the plone-legacy bundle the behavior is random. Sometimes the "Develop CSS" and "Develop JS" button appear being mutually exclusive..sometimes the UI just seems to hang....very hairy and not very robust.

Thoughts?

-aj

Can you provide an example of how you can ruin the UI? We need to try and make that as rock-solid as possible. The JS file that presents it should always run though. If someone ruins the resource registry bundle, there isn't much we can do about that though. FYI, you can manually edit all the settings in the configuration registry also.

legacy bundles are re-compiled after every change. When in develop mode, it just includes the resources directly. See https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/controlpanel/browser/resourceregistry.py#L220

This is similar to the behavior in previous plone where you'd have to re-save the registry in order to get it to re-build your js/css.

I haven't been able to reproduce the bugginess. If you can help me reproduce it, that'd be great.

@ ploneconf there were some issues, where people broke the resource registry ui just by including broken js - js which threw an error. the browser stops execution then. it was for sure the legacy bundle, but IIRC compiled ones too.
looks like, that all bundles are included for the resource registry page, where only the resource registry bundle should be active.

Broken JS or JS with unfilled dependency appear a common pattern to screw up the UI.
I tried to create a screen cast this morning but the behavior was random and erratic...will try to get a better idea about error situations later this week.

-aj

Alright, I'll also try and think of a better solution to this problem.

Perhaps we disable all other js on the page to make sure this isn't possible. This would mean; however, no toolbar would show.