SitecoreUnicorn/Rainbow

Feature request: Name comment additional to ID values

Closed this issue · 1 comments

A serialized file contains a lot of ID's, sometimes it's not clear what that ID actually stands for, for example (this is a tree-list but it could be anything with ID's):
ID: "e391b526-d0c5-439d-803e-17512eae6222" Hint: Allowed Controls Type: TreelistEx Value: | {A21617EF-4786-46AE-A8EC-C0A5A10A74F9} {0F3395F7-5B5D-40BF-958F-AB738B5BCD55} {4ECF523A-03DF-4233-A73C-253C611B576B} {CF6F8563-D2DB-470F-94A8-46106BB449F8} {480D3D15-D70E-42AC-B0EF-4487FDB05D89}...

Now, when I merge a file like this using git, and multiple values have changed, I need to open-up Sitecore, enter the ID and look what item it's pointing to so I know what's going on.

It would be nice if the format would add comment-lines with a more human-friendly text that tells you what the ID actually stands for. This will help in resolving issues, and will save some time finding out what is what. For example:

ID: "e391b526-d0c5-439d-803e-17512eae6222" Hint: Allowed Controls Type: TreelistEx Value: | /* Rendering01 */ {A21617EF-4786-46AE-A8EC-C0A5A10A74F9} /* Rendering02 */ {0F3395F7-5B5D-40BF-958F-AB738B5BCD55} /* Rendering03 */ ...

I don't think this would be something I'd want to put in the core but I can see the appeal.

It would be relatively easy for you to implement it yourself by modifying the https://github.com/kamsar/Rainbow/blob/master/src/Rainbow/Formatting/FieldFormatters/MultilistFormatter.cs and changing the registration of that to your custom formatter with a config patch. You may need to reserialize or something depending on your implementation.