Problem/Motivation

Translator Information wrapper open by default when we did not import a file yet, as we did not import a file yet, we will want to do it and it will be one click less for the user.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

edurenye created an issue. See original summary.

berdir’s picture

Translator info should always be open I think if displayed. The only thing we could think about is have it closed by default when the job is finished. But there's usually not a lot of information in there, so I wouldn't worry about that. It's possibly not even collapsible in 7.x but detail elements always are?

edurenye’s picture

Title: Translator Information wrapper open by default when we did not import a file yet » Translator Information wrapper open by default when the job is not finished

Ok, let's do that then, open by default and closed just if the status is finished.

miro_dietiker’s picture

When doing my most recent presentation, i realised a completed job looks strange when editing. You only see collapsed elements.
I'm not so sure about this practice. Whatever i did, i needed to click on a collapsed item...

edurenye’s picture

Status: Active » Needs review
StatusFileSize
new465 bytes

Done.

berdir’s picture

I don't think that's what miro said? (He said its strange that everything is closed for completed jobs, you keep it like that).

As discussed, I think we should keep this always open or even switch to a non-collapsible fieldset for some cases. Not sure. But definitely always open. Also the job items and messages IMHO.

berdir’s picture

Status: Needs review » Needs work
edurenye’s picture

Status: Needs work » Needs review
StatusFileSize
new1.09 KB
new1.14 KB

Ok, I thought that it was for a followup.
Done.

berdir’s picture

+++ b/src/Form/JobForm.php
@@ -315,7 +315,7 @@ class JobForm extends TmgmtFormBase {
         '#title' => t('Translator information'),
-        '#open' => FALSE,
+        '#open' => TRUE,
         '#weight' => 20,

@@ -338,7 +338,7 @@ class JobForm extends TmgmtFormBase {
         '#title' => $view->storage->label(),
-        '#open' => FALSE,
+        '#open' => TRUE,

Possibly those two should stay closed for new jobs. That's the one place where especially messages aren't interesting as there are none yet.

edurenye’s picture

If is a new Job the "Translator information" will not be shown at all, so no need to close it.
For Messages I think it also needs an empty message as now there's nothing there.

berdir’s picture

Status: Needs review » Needs work
+++ b/src/Form/JobForm.php
@@ -182,7 +182,7 @@ class JobForm extends TmgmtFormBase {
         '#title' => t('Job items'),
-        '#open' => $job->getState() == Job::STATE_ACTIVE,
+        '#open' => TRUE,
         '#weight' => 10,

The idea is that job items are only shown for active jobs.

edurenye’s picture

Status: Needs work » Needs review
StatusFileSize
new2.13 KB
new522 bytes

Reverted this change then.

berdir’s picture

Status: Needs review » Fixed

Note that even configuration changes like this is something that we need to consider update functions. Existing sites will not get them automatically.

In this case, I can live with existing installations not having that, so committed. it would be different if it would be critical functionality.

  • Berdir committed f730864 on 8.x-1.x authored by edurenye
    Issue #2650298 by edurenye: Translator Information wrapper open by...

Status: Fixed » Closed (fixed)

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