Closed (fixed)
Project:
Paragraphs Collection
Version:
8.x-1.x-dev
Component:
Style
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2019 at 14:42 UTC
Updated:
11 Feb 2019 at 19:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
johnchqueComment #3
johnchqueThis should work. :)
Comment #5
johnchqueUsing the new short label in the summary now.
Comment #6
johnchqueWait no, this is not working properly.
Comment #7
johnchqueOK, the previous patch was not working because the first time that we loaded the styles we loaded them with either the label or the context label but not both. Now we have both and I added some methods for working with these. :)
Comment #8
johnchqueRemoving changes in demo.
Comment #9
johnchqueSo we can avoid displaying the Style in the behavior form if we have a context label for a group. :)
Comment #10
johnchqueOk, adding some comments and refactoring some lines. :)
Comment #11
johnchqueWe need to update the usage of this method.
Comment #12
johnchqueUpdating Style to be only lowercase. :)
Comment #14
johnchqueFixing tests. :)
Comment #15
berdirHm, not sure about the key. Maybe widget_label?
this means you're doing the work twice, use an if/else instead.
hm, above you call it $title, here $group and the key/method is label. I'd use $label in both.
Having to duplicate this logic if trying multiple labels makes me sad, but it's tricky as above we have it combined with " style" and here we don't. But actually, that is kind of strange, as the shortened label here without style suffix possibly not enough context.
Wondering if we should just drop the style sufffix completely and simply add it to the group labels where we want to have it. Downside is that we would have a bit of duplication then in places like the style overview. Or we would alternatively add " style" also here, then we could do getGroupWidgetLabel() that would return the widget_label or fallback to "$label style"?
Or you could just do a isset($groups[$group_id]) ;)
Comment #16
johnchqueAddressed all comments above.
About 3. I decided to include the style suffix straight in the method getGroupWidgetLabel becuase I believe that we should keep consistent the labels between widget modes. :)
Comment #18
johnchqueThis should fix the test. Thanks @Berdir. :)
Comment #20
berdirThanks. Committed.