-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EZP-30386: [Online Editor] Custom Buttons #943
EZP-30386: [Online Editor] Custom Buttons #943
Conversation
@lserwatka added a mention about deprecation of this feature in 3.x |
@SerheyDolgushev thank you, we will ship it in 2.5.1. |
*/ | ||
protected function getExtraButtons(): array | ||
{ | ||
if (isset($this->alloyEditorConfiguration['extra_buttons'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer need to use if(isset(...))
condition because there is shorthand notation:
return $this->alloyEditorConfiguration['extra_buttons'] ?? [];
* The alternative and more flexible solution will be introduced. | ||
* So you will need to update Online Editor Extra Buttons as part of eZ Platform 3.x upgrade. | ||
* | ||
* @return array Custom plugins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose return value is a button configuration, not Custom plugins.
* This will be deprecated in eZ Platform 3.x. | ||
* The alternative and more flexible solution will be introduced. | ||
* So you will need to update Online Editor Extra Buttons as part of eZ Platform 3.x upgrade. | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deprecated
would be nice.
* @return array Custom plugins | ||
*/ | ||
protected function getExtraButtons(): array | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trigger_error(
"", // reasons for deprecation here
E_USER_DEPRECATED
);
It's nice to have deprecations visible in logs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank for contribution, nice improvement.
In 2.5 we need to add compiled files for the BC reasons. Could you regenerate the AlloyEditor?
@@ -117,6 +117,12 @@ export default class EzConfigBase { | |||
}; | |||
} | |||
|
|||
addExtraButtons(extraButtons = []) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extraButtons
is an object so extraButtons = {}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -44,4 +45,20 @@ protected function getExtraPlugins(): array | |||
|
|||
return []; | |||
} | |||
|
|||
/** | |||
* This will be deprecated in eZ Platform 3.x. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be removed in eZ Platform 3.0
would be more accurate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the message in 68aab50
@Nattfarinn your change request is in 68aab50 |
@dew326 and @Nattfarinn please let me know if some other changes are required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
Tool version : PHP CS Fixer 2.7.1 Sandy Pool by Fabien Potencier and Dariusz Ruminski diff --git a/src/lib/UI/Config/Provider/FieldType/RichText/AlloyEditor.php b/src/lib/UI/Config/Provider/FieldType/RichText/AlloyEditor.php
index 90e08ee..a0ae440 100644
--- a/src/lib/UI/Config/Provider/FieldType/RichText/AlloyEditor.php
+++ b/src/lib/UI/Config/Provider/FieldType/RichText/AlloyEditor.php
@@ -50,7 +50,7 @@ class AlloyEditor implements ProviderInterface
*/
protected function getExtraButtons(): array
{
- trigger_error(
+ @trigger_error(
'"ezrichtext.alloy_editor.extra_buttons" is deprecated since v2.5.1. There will be new and more flexible solution to manage buttons in Online Editor in 3.0.0',
E_USER_DEPRECATED
); |
…m with multiple translations (#950) Squashed commit of the following: commit 4d0b02f Author: Dawid Parafiński <[email protected]> Date: Tue Apr 9 16:03:39 2019 +0200 EZP-29694: missed cs fixer from another PR commit d3bdc5f Author: Dawid Parafiński <[email protected]> Date: Tue Apr 9 10:34:34 2019 +0200 EZP-29694: refactor js commit a1fc745 Author: Dawid Parafiński <[email protected]> Date: Tue Apr 9 10:34:13 2019 +0200 EZP-29694: fix & add unit tests commit d80d379 Author: Dawid Parafiński <[email protected]> Date: Mon Apr 8 12:59:56 2019 +0200 EZP-29694: Draft conflict does not work as expected for a content item with multiple translations commit f4f0ac5 Merge: 336cbfe 05be271 Author: Marek Nocon <[email protected]> Date: Wed Apr 10 14:05:46 2019 +0200 Merge branch '1.4' commit 05be271 Merge: 014fda3 45c212c Author: Łukasz Serwatka <[email protected]> Date: Wed Apr 10 13:36:57 2019 +0200 Merge pull request #955 from mnocon/add-fixer-job Add php-cs-fixer Travis job commit 336cbfe Merge: b56f590 f1141d3 Author: Łukasz Serwatka <[email protected]> Date: Wed Apr 10 13:34:09 2019 +0200 Merge pull request #957 from ezsystems/EZEE-2736 EZEE-2736 [Travis][Behat] Non-deterministic errors in Form- and Page-Builders commit f1141d3 Author: m-tyrala <[email protected]> Date: Wed Apr 10 11:23:00 2019 +0200 EZEE-2736 [Travis][Behat] Non-deterministic errors in Form- and Page-Builders commit b56f590 Merge: bb13a5a 5cb56bf Author: Łukasz Serwatka <[email protected]> Date: Wed Apr 10 09:47:40 2019 +0200 Merge pull request #948 from ezsystems/EZP-30399-lang-attribute-on-html-element-is-incorrect EZP-30399: Fix lang attribute on <html> element commit 45c212c Author: Marek Nocon <[email protected]> Date: Wed Apr 10 09:35:12 2019 +0200 Add CS job commit bb13a5a Merge: bc9a340 7565cfb Author: Łukasz Serwatka <[email protected]> Date: Tue Apr 9 14:53:54 2019 +0200 Merge pull request #954 from ezsystems/EZP-30425-content-view-is-shrunk-slip-during-merge-up EZP-30425: Content view is shrunk - Remove redundant div added during merge-up commit 7565cfb Author: Jakub Brzegowski <[email protected]> Date: Tue Apr 9 14:51:32 2019 +0200 EZP-30425: Remove redundant div added during merge-up commit bc9a340 Merge: 4b692a6 014fda3 Author: Jakub Brzegowski <[email protected]> Date: Tue Apr 9 12:43:27 2019 +0200 Merge remote-tracking branch 'origin/1.4' commit 014fda3 Author: Jakub <[email protected]> Date: Tue Apr 9 12:01:53 2019 +0200 EZEE-2749: Fix text overflow and table breaking interface in Notifications popup table (#951) commit 4b692a6 Merge: f022bb9 c3a63c2 Author: Dariusz Szut <[email protected]> Date: Mon Apr 8 15:52:22 2019 +0200 Merge remote-tracking branch 'origin/1.4' commit c3a63c2 Author: dew326 <[email protected]> Date: Mon Apr 8 15:49:11 2019 +0200 EZP-29963: In rich text editor, inline style in table triggers a javascript error (#949) * EZP-29963: In rich text editor, inline style in table triggers a javascript error * compiled AE commit f022bb9 Merge: b9e4329 02c8e00 Author: kzawada <[email protected]> Date: Mon Apr 8 15:18:12 2019 +0200 Merge branch '1.4' commit 02c8e00 Merge: cab605d 3d57889 Author: Łukasz Serwatka <[email protected]> Date: Mon Apr 8 15:11:54 2019 +0200 Merge pull request #944 from katarzynazawada/EZEE-2747-copy-subtree EZEE-2747 Implement minimal test coverage for Copy subtree commit cab605d Author: Dawid Parafiński <[email protected]> Date: Mon Apr 8 14:24:13 2019 +0200 EZP-30367: Error: `Location cannot be displayed as it is flagged as invisible.` (#936) * EZP-30367: Error: `Location cannot be displayed as it is flagged as invisible.` * EZP-30367: Check for null locationId commit 3d57889 Author: kzawada <[email protected]> Date: Wed Apr 3 15:32:40 2019 +0200 EZEE-2747 Implement minimal test coverage for Copy subtree commit b9e4329 Merge: a683324 5ecf71b Author: Dariusz Szut <[email protected]> Date: Mon Apr 8 11:33:57 2019 +0200 Merge remote-tracking branch 'origin/1.4' commit 5ecf71b Merge: 993a443 1722df4 Author: Łukasz Serwatka <[email protected]> Date: Mon Apr 8 11:10:07 2019 +0200 Merge pull request #947 from dew326/ezp-29808-wrong-language-mfu EZP-29808: Newly created content via Multi Upload has wrong language set commit a683324 Author: Serhey Dolgushev <[email protected]> Date: Fri Apr 5 09:11:58 2019 -0400 EZP-30386: [Online Editor] Custom Buttons (#943) * EZP-30386: [Online Editor] Custom Buttons * EZP-30386: [Online Editor] Custom Buttons, mention that it will be deprecated in 3.x * EZP-30386: [Online Editor] Custom Buttons, implementing requested changes * EZP-30386: [Online Editor] Compile assets for the BC reasons * EZP-30386: [Online Editor] Custom Buttons, implementing requested changes * EZP-30386: [Online Editor] Compile assets for the BC reasons commit 5cb56bf Author: Jakub Brzegowski <[email protected]> Date: Fri Apr 5 14:36:06 2019 +0200 EZP-30399: Fix lang attribute on <html> element commit 1722df4 Author: Dariusz Szut <[email protected]> Date: Fri Apr 5 10:38:57 2019 +0200 EZP-29808: Newly created content via Multi Upload has wrong language set
* EZP-30386: [Online Editor] Custom Buttons * EZP-30386: [Online Editor] Custom Buttons, mention that it will be deprecated in 3.x * EZP-30386: [Online Editor] Custom Buttons, implementing requested changes * EZP-30386: [Online Editor] Compile assets for the BC reasons * EZP-30386: [Online Editor] Custom Buttons, implementing requested changes * EZP-30386: [Online Editor] Compile assets for the BC reasons
Allows adding Online Editor Custom Buttons using configuration parameters. Please check related ezsystems/ezplatform-richtext#33.
Checklist:
$ composer fix-cs
)