Closed (fixed)
Project:
Paragraphs
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Aug 2017 at 13:43 UTC
Updated:
6 Sep 2017 at 09:00 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #2
pivica commentedComment #3
pivica commentedComment #4
miro_dietikerSo yeah, here some facts from my side:
The fundamental wrong design of the core drop button is that it has always the first action as the default action. Sometimes this simply makes no sense.
I agree, for maximum flexibility we can merge all the action buttons into one. Actions alter code can then easily alter all buttons.
I remember, Bootstrap has button groups that contains multiple actions. We could simply list all default actions in their sequence outside the "..." and then the rest after clicking on "...".
Making collapse a default action after edit seems a good idea. I even think that button could be primary color. But i also think that some related logic could vary based on e.g. if autocollapse mode is on and default mode is closed (or edit)...
Putting to major as expand / collapse is our primary editor interaction workflow. We should create something smooth and awesome straight forward.
Comment #5
pivica commentedComment #6
pivica commentedHere is a first patch, lots of things done but they are all kinda related and also connected with CSS changes that I am doing for #2868225: UI for mobile devices is not looking nice.
Changelog:
Here are a couple of screenshots that show refactored paragraphs_actions element and support for actions and dropdown_actions:
Collapse all example:

Edit all example:

Comment #8
pivica commentedWe need a change in paragraphs_collection/paragraphs_library because of hook name and structure change. Here is a patch #2903793-2: Paragraphs hook_paragraph_widget_dropbutton_alter() name change..
Comment #9
pivica commentedFixed test.
Comment #10
miro_dietikerHm we have many implementations of that hook... would it be compatible with old data if we keep its name unchanged?
If we need to add aome new structure, we could be nice and still trigger the old and care about its return data... declare it deprecated and then continue with the new one. Then we delete it when the time is right. Is this acceptable from temporary code complexity?
Comment #11
berdirThe structure is different, so not sure if that would make sense.
This is part of the experimental widget, and we've already made a bunch of changes like changing the nesting level that broke all those alter hooks anyway, one more isn't going to make a big difference now.
Comment #13
miro_dietikerOK committed. Great progress.
I would prefer to name $widget_actions in the hook just $actions.