Quote from: BobRay at Dec 05, 2008, 12:05 AM
Custom property sets are a *very* cool feature and I can see a lot of uses for them. I’m still trying to get my head around how it would work for the less tech-savvy user and how the user will modify those properties.
I think the answer lies in a visual MODx Content Tag editor. Available to content-related text areas or even as a plugin to the rich-text editors, this could simplify life for everyone. We could have type-ahead support for available Elements that even know the default properties for placing inline, and the same would go for PropertySets; they could be selected by name and even provide access to view the property values in the set.
Of course, it’s just data, so how we present it in a manager theme is ultimately up to that theme.
Quote from: BobRay at Dec 05, 2008, 12:05 AM
For snippets, will there be a Custom Properties tab next to the current Properties tab with it’s own grid? Will I (as a developer) be duplicating properties so they’ll appear on both the default and the custom tab? Will users be moving or duplicating properties from one tab to the other when they want to modify them? If there are tabs and they have different properties, how will the user know where to look for a property? If properties are duplicated on both tabs, will users modify the wrong one and wonder why it got overwritten later? What if a developer needs to rename a property?
Having a standalone PropertySet editor (grid of PropertySets that opens up a Set editor), as well as access to it from a tab in each Element, or integrated into the default properties tab somehow is how I envisioned it.
PropertySets can exist in and of themselves. They are made available or accessible to an Element via a link table, so a single PropertySet can be related to multiple Elements, even of different classes (i.e. modChunk, modTemplateVar, modSnippet, modPlugin, etc.). Users would want to be able to create a new PropertySet from an Element’s Default Properties and modify it from there, or simply select from existing PropertySets and be able to view/edit the set, duplicate it, etc.
Quote from: BobRay at Dec 05, 2008, 12:05 AM
I don’t mean to be difficult, but I still don’t see the down side to my original idea of letting developers preserve the current settings in the properties grid on update other than that it’s not how we’re used to thinking about default properties. It think it could be done with a validator-type resolver that would just serialize the properties and save them for restoration later in the build...
That technique (using a validator to capture existing default property values to merge into the object) would still be useful for managing default properties on upgrade in ways specific to a component, I just know that the more common scenario will be users with 15 configurations of a reusable element that could easily be managed as PropertySets and remain undisturbed regardless of default property changes. Two different problems really, but the solution makes it less urgent for default property preservation in most cases, make upgrades smoother, and will help reinforce the idea that editing default properties of an element can be useful to both developers AND to all site managers to make site-wide default changes to all instances of an element.