silverstripe / silverstripe-framework

Silverstripe Framework, the MVC framework that powers Silverstripe CMS
https://www.silverstripe.org
BSD 3-Clause "New" or "Revised" License
719 stars 820 forks source link

ENH UI updated for versioned objects and all its relations #11101

Closed sabina-talipova closed 1 month ago

sabina-talipova commented 6 months ago

Description

These changes add additional checking for the presence of changes in child classes (which have the Versioned extension) and if these changes exist, then the “MODIFIED” badge will be added to the name of the object. In my opinion, this is the only suitable badge, since there are several points that make the use of other badges difficult. For example, if the object itself has several child objects and these objects have different states, for example, one has the “DRAFT” state, and the other has the “ARCHIVED” state.

Parent issue

sabina-talipova commented 6 months ago

So there is already a versioned badge, and this PR is adding a new one?

We need this check in case when parent DataObject has Versioned extension and has current status DRAFT or any other status than in child / grandchild objects, since this badge will be provided in Versioned extension. In another cases, I assume we should add this badge only if parent object doesn't have Versioned extension, but child / grandchild objects does.

Is the original status badge wrong?

We have the original status badge only if parent object has Versioned extension.

Where is the code for the original status badge. Would it make sense to move this code there, or at least deprecate the old code since it's presumably wrong?

All status badges are part of Versioned extension. So the main problem that require these changes it's if the parent object in the relations doesn't have Versioned extension

michalkleiner commented 6 months ago

Wouldn't it be confusing if the parent object doesn't have Versioned extension and would still show Modified? Perhaps we need another label when it's just the children?

GuySartorelli commented 1 month ago

Closing - we can reference this PR if we decide to go forward with this work in the future, pending the spike.