Umbraco-CMS icon indicating copy to clipboard operation
Umbraco-CMS copied to clipboard

Fix issue toggling boolean between true/false after Save without refr…

Open justin-nevitech opened this issue 2 years ago • 1 comments

Changed booleanEditorController in boolean.controller.js to use local copy of the config and not $scope.model.config as this gets cleared after clicking Save. This was stopping toggle buttons from working after clicking Save for a member.

Fixes #13027

Tested scenario as described in issue #13027 and also tested boolean property on a content to ensure toggle can be changed from true to false to true again between consecutive clicks of Save.

All tests checked and passed.

justin-nevitech avatar Sep 18 '22 15:09 justin-nevitech

Hi there @justin-nevitech, 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
  • [x] 💡 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 🤖 🙂

github-actions[bot] avatar Sep 18 '22 15:09 github-actions[bot]

Thanks @justin-nevitech for spotting this issue and for providing the fix for it 👍 I have tested it and it now works as expected, so let's go ahead a merge 😁 And since this is your first contribution to the CMS 🎉, you can provide us with your account name on Our, and @nul800sebastiaan will be happy to assign our shiny contributor's badge to you 🥇

As for me, I'll be looking forward to your next PR 😉‼

Cheers!

mikecp avatar Sep 27 '22 00:09 mikecp

Thanks @justin-nevitech for spotting this issue and for providing the fix for it 👍 I have tested it and it now works as expected, so let's go ahead a merge 😁 And since this is your first contribution to the CMS 🎉, you can provide us with your account name on Our, and @nul800sebastiaan will be happy to assign our shiny contributor's badge to you 🥇

As for me, I'll be looking forward to your next PR 😉‼

Cheers!

Thanks @mikecp - my username on Our is [email protected] :-)

justin-nevitech avatar Sep 27 '22 06:09 justin-nevitech

Wouldn't it be same issue for other property editors using same approach?

Color Picker https://github.com/umbraco/Umbraco-CMS/blob/v10/contrib/src/Umbraco.Web.UI.Client/src/views/propertyeditors/colorpicker/colorpicker.controller.js#L11-L15

Eye Dropper https://github.com/umbraco/Umbraco-CMS/blob/v10/contrib/src/Umbraco.Web.UI.Client/src/views/propertyeditors/eyedropper/eyedropper.controller.js#L12-L16

Date Picker https://github.com/umbraco/Umbraco-CMS/blob/v10/contrib/src/Umbraco.Web.UI.Client/src/views/propertyeditors/datepicker/datepicker.controller.js#L25-L26

Dropdown Flexible https://github.com/umbraco/Umbraco-CMS/blob/v10/contrib/src/Umbraco.Web.UI.Client/src/views/propertyeditors/dropdownFlexible/dropdownFlexible.controller.js#L10-L14

and maybe Color Picker prevalue editor as well: https://github.com/umbraco/Umbraco-CMS/blob/v10/contrib/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/colorpicker.controller.js#L12-L13

bjarnef avatar Sep 27 '22 18:09 bjarnef