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

Added BlockEditorDataConverter method to BlockListPropertyEditorBase … #14960

Merged
merged 4 commits into from
Nov 30, 2023

Conversation

FullStackChef
Copy link
Contributor

@FullStackChef FullStackChef commented Oct 12, 2023

…and updated BlockListEditorPropertyValueEditor to utilize it.

Prerequisites

  • I have added steps to test this contribution in the description below

Fixes #14959

Description

The pull request aims to make it so that the BlockEditorDataConverter used by BlockListPropertyEditorBase can be customised to handle custom property editors.

  1. Created new inline method CreateBlockEditorDataConverter with a return type of BlockEditorDataConverter that defaults to a new instance of the previously hard coded BlockListEditorDataConverter
  2. Method is protected virtual
  3. Updated CreateValueEditor to pass the result of CreateBlockEditorDataConverter to the BlockListEditorPropertyValueEditor
  4. Updated BlockListEditorPropertyValueEditor constructor to accept BlockListEditorDataConverter as a ctor arg
  5. Updated setting of BlockEditorValues to use passed argument
  6. Added additional constructor to BlockListEditorPropertyValueEditor allowing it to be used with a custom property editor
  7. Added xmldocs in areas worked on.
  8. Updated unit tests

Steps for manual testing:

  1. Create a new custom property editor that extends BlockListPropertyEditorBase
  2. Install / configure in umbraco as per usual
  3. Add Content, Click Save
  4. Validate content saved
  5. Smoke test block list editor: Check that still saves as expected

…and updated BlockListEditorPropertyValueEditor to utilize it.
@github-actions
Copy link

github-actions bot commented Oct 12, 2023

Hi there @FullStackChef, thank you for this contribution! 👍

While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:

  • It's clear what problem this is solving, there's a connected issue or a description of what the changes do and how to test them
  • The automated tests all pass (see "Checks" tab on this PR)
  • The level of security for this contribution is the same or improved
  • The level of performance for this contribution is the same or improved
  • Avoids creating breaking changes; note that behavioral changes might also be perceived as breaking
  • If this is a new feature, Umbraco HQ provided guidance on the implementation beforehand
  • 💡 The contribution looks original and the contributor is presumably allowed to share it

Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution.

If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@lauraneto
Copy link
Contributor

Hi @FullStackChef ,

I see this is your first pull request to the Umbraco CMS source code.
That's awesome and thanks for taking the time to try to fix this! #H5YR 🙌

I see this is still in draft, so please let us know once it is ready to review!
And also feel free to reach out if you need any help, as I'm seeing some tests are currently failing! 😉

@FullStackChef FullStackChef marked this pull request as ready for review October 12, 2023 18:52
@FullStackChef
Copy link
Contributor Author

Thanks @lauraneto

I had to park the PR yesterday due to some higher priorities - hopefully good to go now 💯

@umbrabot
Copy link

Hi there @FullStackChef!

First of all: A big #H5YR for making an Umbraco related contribution during Hacktoberfest! We are very thankful for the huge amount of PRs submitted, and all the amazing work you've been doing 🥇

Due to the amazing work you and others in the community have been doing, we've had a bit of a hard time keeping up. 😅 While all of the PRs for Hacktoberfest might not have been merged yet, you still qualify for receiving some Umbraco swag, congratulations! 🎉

In the spirit of Hacktoberfest we've prepared some exclusive Umbraco swag for all our contributors - including you!

As an alternative choice this year, you can opt-out of receiving anything and ask us to help improve the planet instead by planting a tree on your behalf. 🌳

Receive your swag or plant a tree! 👈 Please follow this link to fill out and submit the form, before December 15th, 2022, 23:59:00 UTC.

Following this date we'll be sending out all the swag, but please note that it might not reach your doorstep for a few months, so please bear with us and be patient 🙏

📢 We have just published a summary of all the activity throughout this year's Umbraco Hacktoberfest.

The only thing left to say is thank you so much for participating in Hacktoberfest! We really appreciate the help!

Kind regards,
The various Umbraco teams.

@nul800sebastiaan nul800sebastiaan changed the base branch from contrib to v13/dev November 30, 2023 16:18
@nul800sebastiaan nul800sebastiaan merged commit ecc31a3 into umbraco:v13/dev Nov 30, 2023
11 of 13 checks passed
@nul800sebastiaan
Copy link
Member

Hey there @FullStackChef - what a please of reviewing with the example package in the linked issue! This is looking good and is good to go.

Congratulations as well on your first contribution to Umbraco-CMS! 🎉 You've earned yourself a contributor badge on Our Umbraco as well with this one! https://our.umbraco.com/members/FullStackChef Thanks again and we look forward to seeing more from your hand! 💪

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

Successfully merging this pull request may close these issues.

Custom BlockEditors inheriting from BlockListPropertyEditorBase do not save
5 participants