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 render for blocks #2192

Merged
merged 5 commits into from
Mar 30, 2023
Merged

[3.x] Fix render for blocks #2192

merged 5 commits into from
Mar 30, 2023

Conversation

haringsrob
Copy link
Contributor

Fixes #2177

@what-the-diff
Copy link

what-the-diff bot commented Mar 17, 2023

  • Added CanRenderForBlocks interface and RenderForBlocks trait
  • Implemented the new interfaces in Columns, BaseFormField, InlineRepeater classes
  • Used the renderForBlocks method to call it on subfields when rendering for blocks (Columns) or calling render() directly from a block (InlineRepeater). This is needed because we don't want to use twill-form component but rather our own custom form components that are more adapted for blocks editing experience.

@codecov
Copy link

codecov bot commented Mar 17, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.04 ⚠️

Comparison is base (0d52a57) 59.84% compared to head (9968367) 59.80%.

Additional details and impacted files
@@             Coverage Diff              @@
##                3.x    #2192      +/-   ##
============================================
- Coverage     59.84%   59.80%   -0.04%     
- Complexity     3912     3915       +3     
============================================
  Files           304      305       +1     
  Lines         15059    15068       +9     
============================================
  Hits           9012     9012              
- Misses         6047     6056       +9     
Impacted Files Coverage Δ
src/Services/Forms/Columns.php 0.00% <0.00%> (ø)
src/Services/Forms/Fields/BaseFormField.php 74.46% <ø> (ø)
src/Services/Forms/Fieldset.php 0.00% <ø> (ø)
src/Services/Forms/Form.php 44.82% <ø> (ø)
src/Services/Forms/InlineRepeater.php 0.00% <ø> (ø)
src/Services/Forms/Traits/RenderForBlocks.php 0.00% <0.00%> (ø)

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@what-the-diff
Copy link

what-the-diff bot commented Mar 27, 2023

PR Summary

  • 🎨 Added CanRenderForBlocks interface and RenderForBlocks trait
    This update brings a new interface and trait to help manage how components are rendered for blocks.
  • 🏗️ Implemented the interfaces in Columns, BaseFormField, InlineRepeater classes
    The new interfaces are now implemented in the essential classes for better organization and handling.
  • 🖼️ Changed field rendering for blocks
    Thanks to the new method, fields will now be rendered differently for blocks (e.g., without labels), improving the overall appearance.

@ifox ifox changed the title 2177 fix render for blocks [3.x] Fix render for blocks Mar 29, 2023
@what-the-diff
Copy link

what-the-diff bot commented Mar 30, 2023

PR Summary

  • Add "CanRenderForBlocks" Interface and "RenderForBlocks" Trait
    Introducing an interface and trait to customize rendering of fields for blocks.

  • Implemented New Interfaces in "Columns", "BaseFormField", and "InlineRepeater" Classes
    The new interface and trait have been implemented in relevant classes for better customization options.

  • Updated Field Rendering for Blocks with "renderForBlocks" Method
    Using the "renderForBlocks" method, fields are now rendered without labels when inside blocks, resulting in cleaner and less cluttered output.

@haringsrob haringsrob merged commit c90bcce into 3.x Mar 30, 2023
@haringsrob haringsrob deleted the 2177-fix-renderForBlocks branch March 30, 2023 08:44
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.

Columns field inside block component don't have block ids
2 participants