Problem/Motivation

Sometimes we need different amount of paragraphs per language.

Proposed resolution

Instead of making the paragraphs field translatable, we could implement a Plugin, that makes it possible to restrict the visibility of the paragraph for each enabled language.

Remaining tasks

Create the plugin.

CommentFileSizeAuthor
#76 new_plugin_visibility-2846682-76.patch16.21 KBVladimirMarko
#76 interdiff-2846682-73-76.txt2.22 KBVladimirMarko
#76 new_plugin_visibility-2846682-76-test.patch5.36 KBVladimirMarko
#73 new_plugin_visibility-2846682-73.patch16.34 KBVladimirMarko
#73 interdiff-2846682-67-73.txt1.81 KBVladimirMarko
#68 new_plugin_visibility-2846682-67.patch16.28 KBVladimirMarko
#68 interdiff-2846682-66-67.txt525 bytesVladimirMarko
#66 new_plugin_visibility-2846682-66.patch16.79 KBVladimirMarko
#66 interdiff-2846682-61-66.txt5.44 KBVladimirMarko
#66 new_plugin_visibility-2846682-66-test-only.patch5.43 KBVladimirMarko
#61 new_plugin_visibility-2846682-61.patch15.04 KBVladimirMarko
#61 interdiff-2846682-57-61.txt549 bytesVladimirMarko
#57 new_plugin_visibility-2846682-57.patch15 KBVladimirMarko
#51 new_plugin_visibility-2846682-51.patch14.96 KBVladimirMarko
#51 interdiff-2846682-47-51.txt3.42 KBVladimirMarko
#51 new_plugin_visibility-2846682-51-test-only.patch4.8 KBVladimirMarko
#47 new_plugin_visibility-2846682-47.patch15.66 KBVladimirMarko
#47 interdiff-2846682-43-47.txt498 bytesVladimirMarko
#47 new_plugin_visibility-2846682-47-test-only.patch4.8 KBVladimirMarko
#43 new_plugin_visibility-2846682-43.patch15.63 KBVladimirMarko
#43 interdiff-2846682-37-43.txt9.34 KBVladimirMarko
#43 new_plugin_visibility-2846682-43-test-only.patch4.76 KBVladimirMarko
#43 Select2 nonsense.png16.4 KBVladimirMarko
#37 new_plugin_visibility-2846682-37.patch15.47 KBprimsi
#35 new_plugin_visibility-2846682-35.patch15.4 KBVladimirMarko
#35 interdiff-2846682-29-35.txt3.75 KBVladimirMarko
#35 new_plugin_visibility-2846682-35-test-only.patch4.76 KBVladimirMarko
#32 Chrome trouble.png51.49 KBVladimirMarko
#32 new_plugin_visibility-2846682-32.patch15.63 KBVladimirMarko
#32 interdiff-2846682-29-32.txt3.75 KBVladimirMarko
#32 new_plugin_visibility-2846682-32-test-only.patch4.76 KBVladimirMarko
#30 new_plugin_visibility-2846682-29.patch15.78 KBVladimirMarko
#30 interdiff-2846682-24-29.txt7.11 KBVladimirMarko
#30 new_plugin_visibility-2846682-29-test-only.patch4.76 KBVladimirMarko
#24 new_plugin_visibility-2846682-24.patch16.5 KBVladimirMarko
#24 interdiff-2846682-19-24.txt13.01 KBVladimirMarko
#24 new_plugin_visibility-2846682-24-test-only.patch4.76 KBVladimirMarko
#19 new_plugin_visibility-2846682-19.patch14.95 KBVladimirMarko
#19 interdiff-2846682-12-19.txt10.57 KBVladimirMarko
#19 new_plugin_visibility-2846682-19-test-only.patch4.72 KBVladimirMarko
#12 new_plugin_visibility-2846682-12.patch7.61 KBthenchev
#12 interdiff-2846682-12.txt685 bytesthenchev
#10 new_plugin_visibility-2846682-10.patch7.61 KBthenchev
#8 2017-01-27-162512_3520x1080_scrot.png23.36 KBthenchev
#8 2.png19.29 KBthenchev
#8 1.png12.37 KBthenchev

Comments

megadesk3000 created an issue. See original summary.

thenchev’s picture

Looked at this, this morning. Not sure how complex this can get but here are some ideas. *Not tested*

1. In the global configuration choose what languages should be allowed. Multi select widget.

2. Expose the allowed languages in behavior form so user can select on what languages this paragraph should be visible on. Multi select or maybe check boxes?

3. In view restrict access to the paragraph with #access when the current language doesn't match the user selected ones.

megadesk3000’s picture

Already started implementing it. Will provide a first draft as soon as i find time.

primsi’s picture

It would be great if you could post the wip patch here given that the specifics are still a bit foggy :)

miro_dietiker’s picture

@dencev
1) Drupal maintains a site language list as configuration. All languages defined there will be relevant. We don't need additional configuration.

2) Defining this logic is the challenging part...
The default is to show all languages in Drupal. It would be better to select the ones that hide it. But negative checkboxes are a UX antipattern.
Compared the problem with the core proposal for block visibility: #2284687: Redesign UI for better management of block visibility

We think we should output
- A fieldset "Visibility per language" from the plugin
- A checkbox with 3 values: - Always - / Hide on / Show on
- A Select2 box that allows a user to easily pick some of the languages defined. This control is hidden if the checkbox before is on "- Always -"
The Select2 library is not yet used in core. We could also start with checkboxes only.

berdir’s picture

Languages
[ ] DE
[ ] FR
[ ] EN
Select languages to limit visibility. Visible for all languages if none are selected.

Not very fancy, but that's IMHO the standard pattern, and you can either implement that as a plugin or simply as a normal entity reference field to languages. If plugin, you could also include a switch to "Check to exclude" vs "Check to show", that's also sometimes helpful if only a few languages should be shown.

And then a bit of hook_entity_access().

miro_dietiker’s picture

It's likely you want to enable this behavior on many paragraph types if you need it... And the proposal above tried to find a way to not clutter the UI with checkboxes when you have many languages.

thenchev’s picture

StatusFileSize
new12.37 KB
new19.29 KB
new23.36 KB

I have some working example but need to do some injections, coding standards, remove some hardcoded values...

Went with select2 route. Made a plugin. On one image is the selection of languages, I'm displaying all languages but have optgroup in select to first show languages that are enabled on the website followed by all the others that are defined in drupal. Not sure about that, I can remove it if its not useful.

thenchev’s picture

Or do we want to skip select2 untill in core?

thenchev’s picture

Status: Active » Needs review
StatusFileSize
new7.61 KB

Here is first draft, needs test, will cover that if the approach looks ok.

miro_dietiker’s picture

Status: Needs review » Needs work

IMHO we should convert the radio selection to a drop down. We want to see as few elements as possible in the UI.
Then the dashed notation is OK. (We typically don't use such a notation with radio boxes.)

thenchev’s picture

Status: Needs work » Needs review
StatusFileSize
new685 bytes
new7.61 KB

Quick update: changes radios to select.

miro_dietiker’s picture

Status: Needs review » Needs work

A UI update needs updated screenshots.

  1. +++ b/src/Plugin/paragraphs/Behavior/ParagraphsLanguagePlugin.php
    @@ -0,0 +1,153 @@
    +    foreach ($this->languageManager->getStandardLanguageList() as $id => $name) {
    

    No. We don't need to do language discovery.

    We just need to list the INSTALLED languages. Content can only exist in these languages.

  2. +++ b/src/Plugin/paragraphs/Behavior/ParagraphsLanguagePlugin.php
    @@ -0,0 +1,153 @@
    +    if ($visibility == 'always') {
    +      return $build;
    

    We can also exit if visibility isn't set at all.

  3. +++ b/src/Plugin/paragraphs/Behavior/ParagraphsLanguagePlugin.php
    @@ -0,0 +1,153 @@
    +    if ($visibility == 'show') {
    ...
    +    if ($visibility == 'hide') {
    

    Comment what we do with this logic here.

  4. +++ b/src/Plugin/paragraphs/Behavior/ParagraphsLanguagePlugin.php
    @@ -0,0 +1,153 @@
    +        foreach (Element::children($build) as $children) {
    +          $build[$children]['#access'] = FALSE;
    

    Why on child level and not on current build level?

Also, Zero documentation, Zero test coverage, Zero examples.

Tests are always critical for new functionality.
Definition of done is also to have demo extended with every plugin and a feasible example.

miro_dietiker’s picture

This plugin will need to provide a summary for the collapsed display.
Such as "Hide on German" or "Show on French".

hoebekewim’s picture

I have some usability remarks about this solution:

If I understand correctly, this will force us to create all paragraphs inside a field. Then selecting which paragraph should be shown in which language.
If you do this, you will get a huge list of items per field on large websites (think about international websites that have a lot of languages), making the node edit form unusable. Even with 2 languages it would already become messy.

A node that is created in a certain language should not contain content from another language, unless the field is set as a non-translatable field, making the content be shared among the created language variants, and making it non-language dependent field.
Also think about the people that use this module as a page builder, the overview will completely be lost.

Further we also have to take into account that international websites a lot of times require a user to only be able to manage the content for a certain language.
By using this approach, this becomes impossible.

Further, this solution does not follow the default Drupal workflow for fields.
I suggest to reconsider the usage of the "Users may translate this field" checkbox on a field to localize a paragraph. This is the most logic solution in the eyes of Drupal best practice.

miro_dietiker’s picture

@hoebekewim Thank you for your feedback!

IMHO Your inputs are not related to the use case we are addressing with this plugin.

This plugin is not intended to create content that highly varies per language.
It primarily is to suppress a paragraph for a certain language, for use cases where things overlap to >90%.
In these cases, managing separate entities in separate UI contexts leads to disconnect and losing overview.

BTW if you really need content that varies highly (such as in commerce and regionalization) you can always create multiple nodes and limit their visibility by region. Then you have your wanted independent management.

I'm not rejecting the original requirement: The translatable ERR field still makes sense, but it's a huge leap in UX and user awareness. We currently still need to define the next leap in the experimental Widget UX. Once we are there, we can investigate more about multingual UX.

This plugin is just one option more to approach the problem.
We should possibly explain the use case in its description and even put a warning.

VladimirMarko’s picture

Assigned: Unassigned » VladimirMarko
miro_dietiker’s picture

Let's get this done with the fixes in #13

The plugin should only be available if the system has more than one language enabled.
Let's create a follow-up to make the demo multilingual and add a nice use-case for this plugin.
But we will need a mulilingual test for the plugin as part of this issue.

VladimirMarko’s picture

StatusFileSize
new4.72 KB
new10.57 KB
new14.95 KB

Progress thus far.

Everything except for the demo works.

Will move all demo content into paragraphs_collection_demo_install and make use of isApplicable tomorrow.

miro_dietiker’s picture

Status: Needs work » Needs review

The last submitted patch, 19: new_plugin_visibility-2846682-19-test-only.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 19: new_plugin_visibility-2846682-19.patch, failed testing.

VladimirMarko’s picture

Discussed with Miro.

  1. +++ b/src/Plugin/paragraphs/Behavior/ParagraphsLanguagePlugin.php
    @@ -0,0 +1,150 @@
    +      '#description' => $this->t('Select a language.'),
    
    +++ b/js/language.js
    @@ -0,0 +1,18 @@
    +      $(".paragraphs-collection-language-visibility-languages").select2();
    

    initialise placeholder with jquery from #description and hide the original description. Example from select2:

    $('select').select2({
      placeholder: 'Select an option'
    });
    
  2. +++ b/modules/paragraphs_collection_demo/paragraphs_collection_demo.install
    @@ -101,6 +101,13 @@ function paragraphs_collection_demo_install() {
    +  $language_paragraph = Paragraph::create([
    

    // @todo incomplete.
    Should be on a separate line.

  3. +++ b/modules/paragraphs_collection_demo/paragraphs_collection_demo.install
    @@ -101,6 +101,13 @@ function paragraphs_collection_demo_install() {
    +  ]); // @TODO
    +  $grid_paragraph->setBehaviorSettings('language', []);  // @TODO
    

    Write @todo on separate line and describe what to do.

  4. +++ b/src/Plugin/paragraphs/Behavior/ParagraphsLanguagePlugin.php
    @@ -0,0 +1,150 @@
    +      '#description' => $this->t('Choose to always show paragraph or to hide or show for specific languages.'),
    

    Drop this description.

  5. +++ b/src/Plugin/paragraphs/Behavior/ParagraphsLanguagePlugin.php
    @@ -0,0 +1,150 @@
    +        foreach (Element::children($build) as $children) {
    ...
    +        }
    ...
    +        foreach (Element::children($build) as $children) {
    +          $build[$children]['#access'] = FALSE;
    +        }
    

    Set a variable and check that. Loop once to set the access.

VladimirMarko’s picture

Status: Needs work » Needs review
StatusFileSize
new4.76 KB
new13.01 KB
new16.5 KB

Progress for today.

Some JS improvements.

Demo still needs more work.
I don't see how to activate a behavior plugin for a paragraphs type from paragraphs_collection_demo_install. I would like some feedback on that, @Berdir.

The last submitted patch, 24: new_plugin_visibility-2846682-24-test-only.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 24: new_plugin_visibility-2846682-24.patch, failed testing.

primsi’s picture

Do you mean how to enable a certain behavior on a specific paragraph?

$grid_paragraph->setBehaviorSettings('grid_layout', ['layout' => 'paragraphs_two_column']);

And save it.

berdir’s picture

That's configuring one that is enabled. Enabling one is on the paragraph type.

You can see how that's done in \Drupal\paragraphs\Form\ParagraphsTypeForm::save(). get the behavior plugin, set at least the enabled key in configuration, save the paragraph type. That's it.

miro_dietiker’s picture

Discussed JS implementation and it seems we were on the wrong path.
We can simply set a static placeholder text in the select2() initialisation...

We should not use JS to show / hide things. We have states for this.
Also, we should not set width in JS initialisation. We should always try to do this with CSS.

+++ b/modules/paragraphs_collection_demo/config/install/paragraphs.paragraphs_type.language.yml
@@ -0,0 +1,14 @@
+label: Language

An own type for "language" is a bad example. You better enable the Language plugin on the normal text paragraph type or some other demo type.

VladimirMarko’s picture

Status: Needs work » Needs review
StatusFileSize
new4.76 KB
new7.11 KB
new15.78 KB

The demo works now.

Added a README.txt to document how to set up the needed Select2 library.

miro_dietiker’s picture

Status: Needs review » Needs work

See my comment above.

VladimirMarko’s picture

Status: Needs work » Needs review
StatusFileSize
new4.76 KB
new3.75 KB
new15.63 KB
new51.49 KB

Replaced the JavaScript with CSS, as requested.

Looks pretty and works fine on Firefox.

Doesn't work well on Chrome as the screenshot show.
Specifically, if the paragraph is saved with visibility at "- Always visible -", the edit form is loaded with the language selection hidden. This confuses the "smart" Select2 JS which sets the input element width by the style attribute to a default (style="width: 100px;").

The last submitted patch, 32: new_plugin_visibility-2846682-32-test-only.patch, failed testing.

primsi’s picture

Status: Needs review » Needs work

This needs a re-roll first.

VladimirMarko’s picture

Status: Needs work » Needs review
StatusFileSize
new4.76 KB
new3.75 KB
new15.4 KB

@Primsi: Here you go.

The last submitted patch, 35: new_plugin_visibility-2846682-35-test-only.patch, failed testing.

primsi’s picture

StatusFileSize
new15.47 KB

This needed another reroll. Also some additional feedback:

  1. +++ b/README.txt
    @@ -0,0 +1,16 @@
    +   paragraphs_collection.libraries.yml file. (A leading "/" denotes the root of
    +   your Drupal installation folder.)
    +
    + * For the Slider plugin see https://www.drupal.org/node/2836082.
    

    We have an issue for the readme file, that will add the missing information. As for select2 I would prefer to have the instructions here (where to download it and where to put it).

  2. +++ b/config/schema/paragraphs_collection.schema.yml
    @@ -21,3 +21,18 @@ paragraphs.behavior.settings.grid_layout:
    +      mapping:
    +        languages:
    +          type: sequence
    +          label: 'Languages'
    

    If those are language codes, core normally uses langcode (pl. langcodes).

  3. +++ b/paragraphs_collection.libraries.yml
    @@ -7,3 +7,26 @@ grid_layout:
    +  js:
    +    /libraries/select2/dist/js/select2.full.min.js: {}
    +  css:
    +    component:
    +      /libraries/select2/dist/css/select2.min.css: {}
    

    Please add a follow up to provide a hook_library_info alter. See https://github.com/drupal-media/dropzonejs/blob/8.x-1.x/dropzonejs.modul...

  4. +++ b/src/Plugin/paragraphs/Behavior/ParagraphsLanguagePlugin.php
    @@ -0,0 +1,149 @@
    + *   label = @Translation("Language"),
    

    Is "Language" descriptive enough? Maybe "Visibility per language"?

  5. +++ b/src/Plugin/paragraphs/Behavior/ParagraphsLanguagePlugin.php
    @@ -0,0 +1,149 @@
    +        'always' => $this->t('- Always visible -'),
    +        'hide' => $this->t('Hide for'),
    +        'show' => $this->t('Show for'),
    

    We could make visibility values constants.

  6. +++ b/src/Plugin/paragraphs/Behavior/ParagraphsLanguagePlugin.php
    @@ -0,0 +1,149 @@
    +        'id' => ['paragraphs-behavior-language-visibility-behavior-form-visibility-' . $paragraph->id()],
    ...
    +        'class' => ['paragraphs-behavior-language-visibility-behavior-form-languages'],
    ...
    +    $form['container']['#attributes']['class'] = 'paragraphs-behavior-language-visibility-behavior-form';
    

    Is there a reason for this ids and classes to be that long?

Status: Needs review » Needs work

The last submitted patch, 37: new_plugin_visibility-2846682-37.patch, failed testing.

primsi’s picture

Obviously already needs another :S

miro_dietiker’s picture

Component: User interface » Multilingual
toncic’s picture

Assigned: VladimirMarko » toncic

I will take care of this.

VladimirMarko’s picture

Assigned: toncic » VladimirMarko

I have time for this now again and @toncic doesn't. Taking over.

I would still like some feedback on the issue with Chrome and Select2.

VladimirMarko’s picture

Implemented the changes @Primsi asked for.

The Select2 select box width is still wrong. Upon further inspection, it doesn't in any browser. I don't think this is doable without JavaScript.

VladimirMarko’s picture

Status: Needs work » Needs review

The last submitted patch, 43: new_plugin_visibility-2846682-43-test-only.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 43: new_plugin_visibility-2846682-43.patch, failed testing.

VladimirMarko’s picture

VladimirMarko’s picture

Status: Needs work » Needs review

The last submitted patch, 47: new_plugin_visibility-2846682-47-test-only.patch, failed testing.

miro_dietiker’s picture

Status: Needs review » Needs work
  1. +++ b/src/Plugin/paragraphs/Behavior/ParagraphsLanguagePlugin.php
    @@ -0,0 +1,165 @@
    +  const ALWAYS_VISIBLE = 'always';
    ...
    +  const HIDE_FOR_SELECTED = 'hide';
    ...
    +  const SHOW_FOR_SELECTED = 'show';
    

    This indirection is not needed in a script language like PHP where you can use strings for values. For instance, it makes debugging harder: i always need to lookup the const to understand what string value in the stacktrace means what const.

  2. +++ b/src/Tests/ParagraphsLanguagePluginTest.php
    @@ -0,0 +1,104 @@
    +      $paragraphs_field . '[0][behavior_plugins][language][container][visibility]' => 'hide',
    ...
    +      $paragraphs_field . '[0][behavior_plugins][language][container][visibility]' => 'show',
    

    See, we are simply using 'hide', 'show' string states.

VladimirMarko’s picture

Status: Needs work » Needs review
StatusFileSize
new4.8 KB
new3.42 KB
new14.96 KB

Alright. Deleted the constants again.

Also, there is now a follow-up issue for the Select2 select box width problem: #2859251: Visibility per language Plugin: Select2 select box has a wrong width

The last submitted patch, 51: new_plugin_visibility-2846682-51-test-only.patch, failed testing.

miro_dietiker’s picture

Combining this plugin with other plugins like Accordeon or fixed grid results in a severe problem.
The position of each paragraph defines its role - this allows us to flatten the hierarchy and improve the UX. We thought it's a good idea.
Conditionally removing an item results in a shift, making the editing user unaware of the situation or even validation wrong (we wanted to validate child count in grid and accordeon).

There are two possibilities:
a) The plugin is considered incompatible with plugins that have fixed functional / layout expectation based on delta positions.
b) We will never do the delta based role approach (and change how grid, accordeon works!)
c) In situation where deltas impact the child role, only allow special rules with a fallback and offer a special container for this behavior. Example: A personalised special case always has the default fallback. A language specific paragraph in a grid needs to define an unspecific fallback...

Fun stuff to resolve. :-)

badrange’s picture

Based on miro_dietiker's coment in #53 it doesn't seem like it is a good idea to start using this patch in a real project right now.

Any idea about timeframe? Can we expect this approach to be pursued further?

miro_dietiker’s picture

Priority: Normal » Major

@badrange Any funding of features such as this plugin would help to provide any timeframes.
We are only projecting timeframes if features are directly funded by projects.

Still prioritising up, because multilingual requirements are recently discussed more.

Status: Needs review » Needs work

The last submitted patch, 51: new_plugin_visibility-2846682-51.patch, failed testing.

VladimirMarko’s picture

StatusFileSize
new15 KB

Re-roll.

primsi’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 57: new_plugin_visibility-2846682-57.patch, failed testing. View results

primsi’s picture

What if we limit the applicability of this plugin to just a certain set of paragraph types in config for now?

VladimirMarko’s picture

Status: Needs work » Needs review
StatusFileSize
new549 bytes
new15.04 KB

Fixed the test. (There is a new permission required for editing behavior settings.)

miro_dietiker’s picture

So we should document in the layout plugin that it fits very well to row containers and individual content paragraph types. But if the parent is a container that applies to children semantic roles based on delta, it doesn't fit. We can't avoid this as we don't know which paragraph type acts like that.

Containers with a grid layout with fixed child modulo count do not fit. "Equal distributed" layouts would be ok.

We tried to avoid this pitfall for other applications such as an accordion where we added a accordion item with title and body child field instead of (odd/even) delta roles. It is a level of nesting more, but it is easier to apply constrains to limit what is allowed as title and UX is also better.

Lets get this in and then create a follow-up to avoid wrong selections by the user with better validation for the special cases.

primsi’s picture

Status: Needs review » Needs work

Ok, let's update README

miro_dietiker’s picture

Don't forget to update the plugin description, so people are aware of the limitations in the plugin UI.

VladimirMarko’s picture

I have tested this with children of a Grid paragraphs type and I haven't seen any problems with any layout - whether fixed row length or "equal columns". There was just a hole in place of the invisible paragraph in each case.

VladimirMarko’s picture

Status: Needs work » Needs review
StatusFileSize
new5.43 KB
new5.44 KB
new16.79 KB

Stopped loading the Select2 library, if it doesn't exist.
Disabled the behavior form for sites with only one language and added test coverage for that.
Updated README.md and the plugin's description.

The last submitted patch, 66: new_plugin_visibility-2846682-66-test-only.patch, failed testing. View results

VladimirMarko’s picture

StatusFileSize
new525 bytes
new16.28 KB
miro_dietiker’s picture

There was just a hole in place of the invisible paragraph in each case.

And that's the problem. It's conceptually incompatible. It breaks layout expectations and it is misleading to the user.
Thus the recommendation is to NOT use per-language-visibility plugin in combination with a grid layout that has a fixed child count expectation. And that's what we need to document in the plugin description.

Status: Needs review » Needs work

The last submitted patch, 68: new_plugin_visibility-2846682-67.patch, failed testing. View results

primsi’s picture

This needs the sort of fix that we did here: #2887748: Update tests with the recent changes

miro_dietiker’s picture

This plugin highly demands for the tristate issue. It leads to clutter of all Paragraphs and likely slow-down of the Paragraphs UI due to the large amount of UI elements it outputs (and then hides).

VladimirMarko’s picture

Status: Needs work » Needs review
StatusFileSize
new1.81 KB
new16.34 KB

Fixed the tests analogously to #2887748: Update tests with the recent changes.

Status: Needs review » Needs work

The last submitted patch, 73: new_plugin_visibility-2846682-73.patch, failed testing. View results

primsi’s picture

+++ b/src/Tests/ParagraphsLanguagePluginTest.php
@@ -62,7 +62,7 @@ class ParagraphsLanguagePluginTest extends ParagraphsExperimentalTestBase {
+    $this->drupalPostFormSave(NULL, $edit, t('Save and publish'), t('Save'), $edit + ['status[value]' => TRUE]);

Berdir pointed out there, that adding published status is not necessary, because it defaults to that.

VladimirMarko’s picture

Status: Needs work » Postponed
Issue tags: +8.3
StatusFileSize
new5.36 KB
new2.22 KB
new16.21 KB

Fixed the tests. And cleaned them up a little bit.

Before we test this again, let's wait until #2855309: Create ParagraphsTestBaseTrait. reverts the API changes it introduced by expanding the list of required parameters for some functions.

VladimirMarko’s picture

Status: Postponed » Needs review
primsi’s picture

miro_dietiker’s picture

Status: Needs review » Needs work
VladimirMarko’s picture

Status: Needs work » Needs review

It's passing the tests now.

miro_dietiker’s picture

Ok to get this in as is. But we need a new parent meta issue that cares about improving the multilingual UI.
That will be improved summary, published translation status fields, filtering elements on output, filtering on the translate tab and many more. We will need to create a special round of mock-ups also to design the resulting UX goals and sync with the old "translatable err field" wishes.

And to avoid the ui overload/clutter, we really need to have the tristate thing and should promote it.

  • Primsi committed b91020a on 8.x-1.x authored by VladimirMarko
    Issue #2846682 by VladimirMarko, Denchev, Primsi, miro_dietiker, Berdir...
primsi’s picture

Status: Needs review » Needs work

Committed. Thanks. Leaving open until the follow ups from #18 #37 and #62 are created

miro_dietiker’s picture

The new META issue is lacking any reference.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.