Problem/Motivation

Currently, "abort" is the default job action.

I need to open the drop button to click manage to access the job detail.

Proposed resolution

Make manage the default.
Abort is a rare case.

User interface changes

Default drop button value is "manage" instead of current "abort".

Comments

miro_dietiker created an issue. See original summary.

edurenye’s picture

Status: Active » Needs review
StatusFileSize
new1.37 KB

Done.

edurenye’s picture

Issue summary: View changes
StatusFileSize
new11.72 KB

Providing screenshots.

Status: Needs review » Needs work

The last submitted patch, 2: set_manage_as_default-2577211-2.patch, failed testing.

The last submitted patch, 2: set_manage_as_default-2577211-2.patch, failed testing.

juanse254’s picture

Issue tags: +Needs tests

we need tests for this.

edurenye’s picture

Status: Needs work » Needs review
StatusFileSize
new719 bytes
new2.07 KB

Added test and rebased.

The last submitted patch, 7: set_manage_as_default-2577211-7-test_only.patch, failed testing.

The last submitted patch, 7: set_manage_as_default-2577211-7-test_only.patch, failed testing.

miro_dietiker’s picture

+++ b/src/Entity/ListBuilder/JobListBuilder.php
@@ -20,6 +20,12 @@ class JobListBuilder extends EntityListBuilder {
+        'title' => t('abort'),

@@ -32,12 +38,6 @@ class JobListBuilder extends EntityListBuilder {
         'title' => t('manage'),
...
-        'title' => t('abort'),

I'm a little confused about this.
We are depending on the fact that the last item added is the default? No weights or why is this inverse order from what i expected?

edurenye’s picture

juanse254’s picture

Status: Needs review » Reviewed & tested by the community

Tests are passing and this was manually tested. Seems to work fine setting to RTBC.

miro_dietiker’s picture

I was just asking questions about why this sequence change was needed in #7. I didn't ask to change the implementation.
If weights are not needed, we are usually trying to avoid them.

edurenye’s picture

I tried, and was working, works in both ways.
If the 7 is better, then commit that one if there is nothing wrong with that patch.

miro_dietiker’s picture

berdir’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs tests

I definitely prefer explicit weights.

If weights are not needed, we are usually trying to avoid them.

I've heard that the first time. Using weights in form arrays and operations is a good thing. Among other things, it allows you to prepare for someone wanting to alter your module and you can have space in your form elements (e.g., 5, 10, 15, ..). It's very annoying to try and inject a form element into a form that is not prepared for that.

Committed.

  • Berdir committed f111d5a on 8.x-1.x authored by edurenye
    Issue #2577211 by edurenye: Set manage as default job action
    

Status: Fixed » Closed (fixed)

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