-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add editor-config-bundle and make fragment configuration more simple #21
Open
mike4git
wants to merge
8
commits into
v1
Choose a base branch
from
feature/use-editor-config
base: v1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4365242
add editor-config-bundle and make fragment configuration more simple
mike4git ad672d1
use WIP version of editor-config-bundle (atm)
mike4git 4a861a5
add missing use statements
mike4git a4c61a0
add missing use statements
mike4git 4a91957
Merge branch 'v1' of https://github.com/teamneusta/pimcore-presentati…
mike4git 8be50ff
small cs fixes
mike4git 8cf9e88
areabrick config bundle: do not use custom repo, use dev-main
nehlsen 27b9377
fixed namespaces
nehlsen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/DocumentAreabrick/Base/AbstractConfigurableAreabrick.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php declare(strict_types=1); | ||
|
||
namespace Neusta\Pimcore\PresentationBundle\DocumentAreabrick\Base; | ||
|
||
use Neusta\Pimcore\AreabrickConfigBundle\HasDialogBox; | ||
use Neusta\Pimcore\AreabrickConfigBundle\DialogBoxBuilder; | ||
use Pimcore\Extension\Document\Areabrick\AbstractTemplateAreabrick; | ||
use Pimcore\Extension\Document\Areabrick\EditableDialogBoxInterface; | ||
use Pimcore\Model\Document\Editable; | ||
use Pimcore\Model\Document\Editable\Area\Info; | ||
|
||
class AbstractConfigurableAreabrick extends AbstractTemplateAreabrick implements EditableDialogBoxInterface | ||
{ | ||
/** @template-use HasDialogBox<DialogBoxBuilder> */ | ||
use HasDialogBox; | ||
|
||
protected function createDialogBoxBuilder(Editable $area, ?Info $info): DialogBoxBuilder | ||
{ | ||
return new DialogBoxBuilder(); | ||
} | ||
Comment on lines
+17
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need to overwrite this, it's the same as the default in the trait. |
||
|
||
protected function buildDialogBox(DialogBoxBuilder $dialogBox, Editable $area, ?Info $info): void | ||
{ | ||
$dialogBox | ||
->addTab('Fragment Settings', | ||
$dialogBox->createSelect( | ||
'fragment-style', | ||
[ | ||
'none' => 'none', | ||
'fade-in' => 'fade in', | ||
'fade-out' => 'fade out', | ||
'fade-up' => 'fade up', | ||
'fade-in-then-out' => 'fade in then out', | ||
'fade-in-then-semi-out' => 'fade in then semi out', | ||
'grow' => 'grow', | ||
'shrink' => 'shrink', | ||
'strike' => 'strike', | ||
'highlight-current-blue' => 'highlight current blue', | ||
'highlight-red' => 'highlight red', | ||
'highlight-blue' => 'highlight blue', | ||
'highlight-green' => 'highlight green', | ||
] | ||
) | ||
->setLabel('Fragments Style') | ||
->setDefaultValue('none'), | ||
$dialogBox->createNumeric('fragments-order', 0, 20), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,45 +7,3 @@ | |
{% set isFragment = fragmentStyle | ||
? 'fragment' | ||
: '' %} | ||
|
||
<div class="brick-{{ brickName }} {{ isFragment }} {{ fragmentStyle }}" {{ fragmentOrder }}> | ||
{% block brick %}{% endblock %} | ||
</div> | ||
Comment on lines
-11
to
-13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this should be removed. |
||
|
||
{% if editmode %} | ||
<div class="brick-settings"> | ||
<h1>Brick settings</h1> | ||
|
||
<div class="flex-container"> | ||
<div class="flex-child"> | ||
<h2>Fragments style</h2> | ||
{{ pimcore_select('fragment-style',{ | ||
'store': [ | ||
['none', 'none'], | ||
['fade-in', 'fade in'], | ||
['fade-out', 'fade out'], | ||
['fade-up', 'fade up'], | ||
['fade-in-then-out', 'fade in then out'], | ||
['fade-in-then-semi-out', 'fade in then semi out'], | ||
['grow', 'grow'], | ||
['shrink', 'shrink'], | ||
['strike', 'strike'], | ||
['highlight-current-blue', 'highlight current blue'], | ||
['highlight-red', 'highlight red'], | ||
['highlight-blue', 'highlight blue'], | ||
['highlight-green', 'highlight green'], | ||
], | ||
'defaultValue': 'none' | ||
}) }} | ||
</div> | ||
|
||
<div class="flex-child"> | ||
<h2>Fragments order</h2> | ||
{{ pimcore_numeric('fragment-order', { | ||
'minValue': 0, | ||
'maxValue': 20 | ||
}) }} | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We should wait for a
v1.0
to be released before this is merged.