-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V8/feature/ab4550 segments ui variant picker #7676
V8/feature/ab4550 segments ui variant picker #7676
Conversation
…for all cases of culture/segment properties
…riants are saved/published
…//github.com/umbraco/Umbraco-CMS into v8/feature/AB4550-segments-ui-variant-picker
…//github.com/umbraco/Umbraco-CMS into v8/feature/AB4550-segments-ui-variant-picker
…//github.com/umbraco/Umbraco-CMS into v8/feature/AB4550-segments-ui-variant-picker
…o vary by segment
…//github.com/umbraco/Umbraco-CMS into v8/feature/AB4550-segments-ui-variant-picker
…iants and/or somehow open multiple. It is not possible to break out of _.each using a return statement, it simply returns that current function but _.each will continue calling the others after that.
During save/publish, Umbraco first deletes all property data of a specific version and then adds property values again. However, any segments that were created but had an empty value would not be added again which meant the segments were entirely gone afterwards.
…when there are no segments at all. This makes sure that even if there is no property data for the default segment in the database but only for some segments, the default segment will still be returned here.
…//github.com/umbraco/Umbraco-CMS into v8/feature/AB4550-segments-ui-variant-picker
Looking at your changes in src/Umbraco.Web/Editors/ContentController.cs, I start thinking that does not handle Segments since the code seems to only deal with Culture. Is that correctly understood? I'm trying to conclude whether we need to revisit this part later? |
Yes, looking at that code we probably also need some |
Thanks for the clarification, I have noted that. |
5a5291d
into
umbraco:v8/feature/AB4550-segments-ui-variant-picker
Hi @nielslyngsoe,
I added some additional commits to fix a few things. The C# changes will probably have to reviewed by someone else at some point, but perhaps that is better to do when we feel it's good enough and can be checked. I now simply fix stuff I run into and sometimes it has to be changed again later (like the
GetSegments()
method).New changes now:
GetSegments()
updated (again) to always return the default segment (null
). I ran into a case where there was no data yet for the default segment but there was data for other segments and in that case the default segment was not returned from theGetSegments()
method, meaning in the Umbraco frontend you could no longer edit the default segment at all.requestSplitView
function to prevent looping through all variants after variant has been foundnull
.null
value is not relevant so is skipped. However, for segments this means the whole segment is removed because we only have the property data to know which segments exists. So when I want to create a new empty segment I just write an empty value to some property but Umbraco was removing old segments when saving a new one (i.e., if I create segmentA
, thenB
, thenC
all withnull
or""
values, only segmentC
would be present after the last save/publish).This item has been added to our backlog AB#5131