Problem/Motivation

The goal here is to move remove button inside the collapsible button with other actions, and to move edit outside of it. There are multiple reasons for this:

  • X icon is mostly used as a "cancel" action and using it here as a delete can be misleading;
  • After clicking on "Edit" paragraph, it makes sense that the "Edit" icon is in focus, and that other icons are inside collapsible menu.

Now that #2829316: Implement "duplicate paragraphs" feature is committed, we should proceed to work on the changes on the collapsible button. Screenshot will be added.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drobnjak created an issue. See original summary.

toncic’s picture

Assigned: Unassigned » toncic
toncic’s picture

I did some changes and there is a screenshot how is looking now.

drobnjak’s picture

Status: Needs review » Needs work
  1. +++ b/src/Plugin/Field/FieldWidget/ParagraphsWidget.php
    @@ -380,37 +380,39 @@ class ParagraphsWidget extends WidgetBase {
    +        if ($item_mode!= 'edit') {
    

    Space missing.

  2. +++ b/src/Plugin/Field/FieldWidget/ParagraphsWidget.php
    @@ -380,37 +380,39 @@ class ParagraphsWidget extends WidgetBase {
    +          $button_access = $paragraphs_entity->access('delete') && !$this->isTranslating;
    

    This line shouldn't be in if statement.

drobnjak’s picture

+++ b/css/paragraphs.widget.css
@@ -92,32 +92,9 @@
+  .js .paragraphs-edit-button-container .js .paragraphs-edit-button-container

We shouldn't remove height and width properties here. Also here we are targeting button with the parent container, not container itself.

toncic’s picture

Did small changes from previous comments.

Status: Needs review » Needs work

The last submitted patch, 6: collapsible_menu_ux-2850026-6.patch, failed testing.

toncic’s picture

Fixing test failing.

toncic’s picture

When I was checking previous patch I noticed that I am adding remove button twice. I changed that, and now is looking much better.

drobnjak’s picture

Status: Needs review » Reviewed & tested by the community

Applied patch and tested. Works as it is defined in the issue. I will add follow-ups for this.

miro_dietiker’s picture

Status: Reviewed & tested by the community » Needs work

I can't see the Duplicate button anymore ... Strange, i also can't see it without this change...
The issue was committed before! :-!

  • miro_dietiker committed 4edcb72 on 8.x-1.x authored by toncic
    Issue #2850026 by toncic, drobnjak: Collapsible menu UX changes for "...
miro_dietiker’s picture

OK, i checked wrong widget.

Committed as a small step.

Still, i'm confused why i still can only duplicate a paragraph when closed. When i switched to edit, the action is gone. Needs an update or follow-up. Close when created.

drobnjak’s picture

Status: Needs work » Fixed

Duplicate issue is still on "Needs work". Follow-ups will be added there. Closing this issue.

drobnjak’s picture

Adding "duplicate" feature follow-up.

Status: Fixed » Closed (fixed)

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