Problem/Motivation

When clicking through the config translation, suddenly, certain config types suggest to "Manage fields | form display | display". Additionally, "Manage fields" is the default value instead of "Translate". This confuses users. The primary/sole purpose of this UI is to "Translate".

Proposed resolution

Remove the "Manage *" links in the config translation UI.
(Make sure the alteration of the links from the entity / field UI does not apply for config translation.)

Remaining tasks

Add tests.

User interface changes

BEFORE:

AFTER:

API changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

miro_dietiker’s picture

Providing a screenshot.

accidental entity / field ui links

penyaskito’s picture

Attached patch reorders them, so "Translate" is the first one (and default) if it exists.
I'm wondering anyway if we should remove the others, as we don't want users to lose focus of what are they doing at the moment.

Status: Needs review » Needs work

The last submitted patch, 2: 2462907-config_translation-translate-operation-3.patch, failed testing.

Status: Needs work » Needs review
miro_dietiker’s picture

Confirming that Translate is the first item with this patch. Thx!

Gábor Hojtsy’s picture

Status: Needs review » Needs work

Can we remove the rest of the items instead? We worked pretty hard to remove them and this appears because it alters them in... Not good IMHO :/ Its confusing because other things don't have their other operations.

penyaskito’s picture

If there is a translate operation, remove the others.

Gábor Hojtsy’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: -Needs usability review, -Needs screenshots +Needs tests
FileSize
66.87 KB

Tested this manually. Looks good.

Needs tests. Updated issue summary. I don't think this needs usability review, it does what the rest of these screens do.

Gábor Hojtsy’s picture

BTW also found #2506793: Config translation shows search field below table while reviewing this. Should be easy to fix I hope :)

tstoeckler’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
FileSize
1.75 KB
2.61 KB

We already have code to do this, but it operates too early so that the dynamic operations from field UI are still added afterwards. See attached patch.

tstoeckler’s picture

Ahh ConigTranslationOverviewTest doesn't enable field_ui module, that's why the test-only patch doesn't fail. Not sure whether we want to accept the performance cost of enabling it, just for this test. Hmm...

penyaskito’s picture

That test already enables views_ui... I don't think is such an impact.

Gábor Hojtsy’s picture

Status: Needs review » Needs work

Yeah I an not concerned of needing to enable field_ui :)

tstoeckler’s picture

Status: Needs work » Needs review
FileSize
5.19 KB
6.04 KB

So I was wrong: just enabling field_ui doesn't cut it, because the config_test entity type does not have the bundle_of property.

So in order to properly test this, I added a entity_test_operation module that provides a test entity operation unconditionally. In order do that I also had to fix the API documentation.

This time the test-only patch should actually fail.

The last submitted patch, 14: 2462907-14--test-only.patch, failed testing.

Gábor Hojtsy’s picture

Status: Needs review » Needs work

Looks good except:

  1. +++ b/core/modules/config_translation/src/Tests/ConfigTranslationOverviewTest.php
    @@ -86,6 +103,15 @@ public function testMapperListPage() {
    +      // Make sure there is only a single 'Translate' operation for each
    +      // dropbutton, either.
    

    Either?

  2. +++ b/core/modules/system/tests/modules/entity_test_operation/entity_test_operation.info.yml
    @@ -0,0 +1,6 @@
    +name: 'Entity Operation Test'
    +type: module
    +description: 'Provides a test operation to entities.'
    +package: Testing
    +version: VERSION
    +core: 8.x
    

    Should be hidden: true, no?

tstoeckler’s picture

1. Ahhh I had seen that and then forgot. You eagle-eye! ;-P Will fix later

2. Our test modules no longer have hidden: true because they are not discovered anyway, unless you set $settings['extension_discovery_scan_tests'] = TRUE; explicitly in which case it's useful if they show up in the UI (we then collapse the Testing details element by default so it's not such a nuisance). So that should be fine.

tstoeckler’s picture

Status: Needs work » Needs review
FileSize
799 bytes
6.03 KB

Here we go.

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Yay, thanks! I grepped for hidden: true in test modules, and we still have that around quite a bit, but the reason I needed to grep in the first place was I was unsure :D

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 18: 2462907-18.patch, failed testing.

Gábor Hojtsy’s picture

Fails seem to be unrelated:

Segmentation fault
FATAL Drupal\views\Tests\RenderCacheIntegrationTest: test runner returned a non-zero error code (139).

Status: Needs work » Needs review

Gábor Hojtsy queued 18: 2462907-18.patch for re-testing.

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Nice test coverage and docs improvements. This issue addresses a normal bug and is allowed per https://www.drupal.org/core/beta-changes. Committed 88a73d8 and pushed to 8.0.x. Thanks!

  • alexpott committed 88a73d8 on 8.0.x
    Issue #2462907 by tstoeckler, penyaskito, Gábor Hojtsy, miro_dietiker:...
Gábor Hojtsy’s picture

Issue tags: -sprint

Superb, thanks!

Status: Fixed » Closed (fixed)

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