U4-11219 - Wire up new APIs for Variant names

Created by Shannon Deminick 16 Apr 2018, 09:19:31 Updated by Robert Copilau 23 Apr 2018, 09:10:19

Is required for: U4-11128

Subtask of: U4-11114

We need to wire up the new APIs for the variant names into :

  • The main tree language drop down
  • The content picker language drop down
  • The language drop down in the content editor

1 Attachments

Comments

Shannon Deminick 20 Apr 2018, 06:15:36

PR is here: https://github.com/umbraco/Umbraco-CMS/pull/2598

Out of scope: Wiring up the publish states in the language drop down menu when editing content, this will need to come after http://issues.umbraco.org/issue/U4-11250

This does:

  • Adds an option to the Document Type editor under "Permissions" to enable varying by culture, the default is to not allow this which is what we have today
  • Updates the EntityRepository to be able to lookup all culture variant names in the same request when using the EntityRepository.GetByQuery method when passing in the umbraco object type.
  • Updates the EntityRepository to be able to lookup all culture variant names in the same request when using the EntityRepository.Get method when passing in the umbraco object type.

This doesn't update the EntityRepository to be able to have this functionality for Paging! Paging with regards to this 1:M lookup will have it's own challenges if we need it. This doesn't update the UI to allow/disallow property types to be varied or not varied, this will be something else we need to cater for soon.

To test:

  • Create a doc type, turn on varying by culture, make sure it has a content picker
  • Create a few languages
  • Create some documents of this type and fill out all languages
  • Toggle the language selector in the main tree, notice that the names displayed are the culture specific ones
  • In a content picker toggle the language selector and notice that the names displayed are the culture specific ones
  • Create a doc type that doesn't have varying by culture turned on
  • Create some documents of this type
  • Notice that their names remain the same when switching languages


Robert Copilau 20 Apr 2018, 10:33:09

Hey @Shandem I get a "Variation CultureNeutral is invalid for property type x" error when I try to create a document.

I commented out the code that throws the error to allow me to test the rest and everything works fine, except for that error. I am guessing that is fine since the focus of this PR is variants names and the CP was there to show that the language dropdown works.


Shannon Deminick 23 Apr 2018, 03:41:40

@robertcopilau did you "turn on varying by culture" on the new doc type you created? (I'll re-test)


Robert Copilau 23 Apr 2018, 05:59:51

Yes @Shandem, I made sure it was on.


Robert Copilau 23 Apr 2018, 09:07:58

Moving to fixed as the base functionality works, the error above was due to the X property not having "varying by culture" on as the UI option for it is not currently present.

@Shandem did I understand the above correctly?


Priority: Normal

Type: Task

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 8.0.0

Due in version: 8.0.0

Sprint: Sprint 83

Story Points: 1

Cycle: