-
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
Ability to configure Segmentation #7973
Conversation
(cherry picked from commit 43679c0b8a591ee9459b397ceb4ef0f9abcbc604)
(cherry picked from commit a97f8254f550b453ebd1cab91837da4f60f9aff6)
…feature/backoffice-segment-support-client # Conflicts: # src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html
…t-support-client' into v8/feature/AB4550-segments-ui # Conflicts: # src/Umbraco.Web.UI.Client/src/common/directives/components/editor/umbeditorcontentheader.directive.js # src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html
…long as a error is present. Plus avoid displaying field-errors, we only want to use property errors for this indication.
…ndication-in-variant-picker UI: Corrected validation indication in variant-picker
Peer reviewed on a very long call with @nielslyngsoe |
@nielslyngsoe Just a note on naming: aren't culture variants also part of the segmentation? So instead of 'Allow segmentation', it's actually more accurate (and consistent) to name this checkbox 'Allow vary by segment'? Umbraco-CMS/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml Lines 1666 to 1675 in c4456c5
|
Question for those involved with the segmentation feature: once this PR makes its way into a release, would you consider the underlying segmentation feature safe to use in production? I have a project that is ideally suited for segments (content localization), so I'm considering setting up a simple project-specific UI to enable their use, backed by code based off of SegmentTestController.cs. It would sure be a lot cleaner than the alternative I would have to use. |
@Zweben there are parts of the content workflow that aren't fully working with segments. Meaning that if you want to use the Umbraco UI for publishing your segments etc. you will be experiencing weirdness. |
Just a note based on my experience trying to get this to work as this seems to be missing from the PR above - you need the following 2 settings in web.config in appSettings section for this to work:
|
@Chris-N1 The The |
@ronaldbarendse OK - not sure what was happening then as I could not turn segmentation on at all for any document type/alias without that setting present. Possibly a bug? There's also this code in the SegmentTestController:
|
You can't enable segmentation from the UI yet (that's still experimental and behind a fixed flag in code), but only from the |
Is there a plan for when the rest of the UI for working with segmented content might be implemented? i.e. when this feature is no longer experimental but fully available. We're trying to determine whether to wait for this or to implement a different approach for now. |
There is no current plan to develop this into a full feature. It only here to enables packages to make segmented data. |
@nielslyngsoe Creating the segment names/content variants would indeed be something packages could enable, as segments could be different between nodes (e.g. for A/B testing, you can have different variants per node). However, the document type configuration UI is already available within Umbraco, just hidden behind a flag. This flag currently can't be changed, as it's retrieved from the following server variable: Line 20 in 6da85dd
But that's always set to
It would make sense to remove this flag (and always show the |
This PR is for merging the Segments UI into our Dev branch.
Description:
This PR makes Segments available.
When enabled, UI will appear for properties, making it possible to determine whether a property will vary by segments.
The creation of segments is as well done by code.
To enable UI for enabling segmentation for a DocumentType, the server-variable "showAllowSegmentationForDocumentTypes" can be set to true.
But the UI still contains no way to create Segments, to do so read the description about test endpoints.
UI Updates
When segmentation is enabled for a DocumentType, the option to allow a property to vary by segments because available in the DocType Editor:
In DocumentType Editor, properties now have a label for Culture varying and Segmentation:
Variant selector is updated to show segment variants. If both culture and segment variants are present the segment-variants are placed as children of the culture variants.
Save, Publish, Unpublish etc. Dialogs have been updated to only show relevant choices:
Test endpoints:
For testing purpose segmentation can be enabled by end-points:
In web.config you should make sure you have the following
<add key="Umbraco.TestData.Enabled" value="true"/>
in the appSettings.And you need to check that you have the Umbraco.TestData.dll
Otherwise, you can copy it from src\Umbraco.TestData\bin\Debug
To enable segments for a DocumentType call this endpoint:
http://localhost:8600/umbraco/surface/SegmentTest/EnableDocTypeSegments?alias=umbTestDataContent&propertyTypeAlias=desc
Creation of Segments can be done through this endpoint:
http://localhost:8600/umbraco/surface/SegmentTest/AddSegmentData?contentId=41366&propertyAlias=desc&value=hello%20world&segment=Test1
Test notes:
We need to test almost everything that deals with Variants.
Client-code for variants have been refactored to support an additional property to determine which variant to deal with.
This means that all editor parts dealing with variant content should be tested.
Known parts:
Content Editor
— Property Editors
— Variant Selector
— Save, publish, ... action dialogs
Content Apps