Skip to content
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

[3.x] Fix conflicts between native Twill blocks and app/vendor blocks #2135

Merged
merged 2 commits into from
Feb 10, 2023

Conversation

ifox
Copy link
Member

@ifox ifox commented Feb 7, 2023

twill.block_editor.directories contains both Twill and app directories by default. Without this fix, Twill's default text block is taking over in the form instead of the app's text block.

`twill.block_editor.directories` contains both Twill and app directories by default. Without this fix, Twill's default text block is taking over in the form instead of the app's text block.
@what-the-diff
Copy link

what-the-diff bot commented Feb 7, 2023

  • Fix typo in Capsule.php
  • Add new constant to Block class for vendor blocks source type
  • Remove duplicate TwillBlocks::DIRECTORY_TYPE_VENDOR and TwillBlocks::DIRECTORY_TYPE_APP constants, use 'source' instead of 'type' key in block directories array (TwillBlock)
  • Use $data['source'] instead of $data['type'] when reading from directory (TwilServiceProvider)

@codecov
Copy link

codecov bot commented Feb 7, 2023

Codecov Report

Base: 59.92% // Head: 59.92% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (9967a21) compared to base (aa6d0f2).
Patch coverage: 64.28% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##                3.x    #2135   +/-   ##
=========================================
  Coverage     59.92%   59.92%           
- Complexity     3898     3899    +1     
=========================================
  Files           303      303           
  Lines         15014    15018    +4     
=========================================
+ Hits           8997     9000    +3     
- Misses         6017     6018    +1     
Impacted Files Coverage Δ
src/Services/Blocks/Block.php 79.67% <ø> (ø)
src/TwillServiceProvider.php 95.36% <ø> (-0.03%) ⬇️
src/Helpers/Capsule.php 67.85% <50.00%> (ø)
src/TwillBlocks.php 63.07% <66.66%> (+1.78%) ⬆️
src/Helpers/helpers.php 79.79% <0.00%> (-1.02%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@haringsrob haringsrob merged commit 37e16cf into 3.x Feb 10, 2023
@haringsrob haringsrob deleted the fix/twill-blocks-conflict branch February 10, 2023 07:48
@haringsrob
Copy link
Contributor

Weird behavior, when creating it showed the correct then on refresh the Twill's block.

Anyway tested and works perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants