-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 option to disable automatic expand of single nc item #12261
added option to disable automatic expand of single nc item #12261
Conversation
Hi @beliskner, Thanks for porting the PR of @patrickdemooij9 to V9 as it was a nice addition! 👍 Referring to one of the remarks in the original PR, I will check with HQ if we really need to limit this logic to the situations where there is max 1 item or if we can update the current logic and change it to "apply whenever there is only 1 item". I also would also suggest to reword a little bit the description of the new property to clarify its usage, but let's first wait for HQ feedback on the logic 😊 I'll come back to you as soon as I have news. |
Hi @mikecp, Thank you for your response. Looking forward to the feedback. Any suggestion on correct phrasing? |
HI @beliskner, I keep you posted on the answer from HQ. |
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.
Hi @beliskner ,
Coming back to you with some feedback from my discussion with HQ.
So, the good news is that we can leave out the "min-max" check and just apply the property value check in all cases where there is only 1 item 🎉
The somewhat "less good" news here is that HQ has released v9.5 RC this week, which is the last minor version of V9. This means that you will need to retarget your PR to the branch V10/contrib, which has just been created and is available in the repository.
But since it is thanks to this switch to V10 that we can simplify the logic (which is a breaking change and would not have been allowed in v9), this is not such a bad news after all I think 😁
I hope you won't mind doing this update, don't hesitate to reach out if you have problems with the retarget.
Thanks!
remove max item 1 conditional to set current node
removed description of first item conditional
@@ -23,6 +23,9 @@ public class NestedContentConfiguration | |||
[ConfigurationField("showIcons", "Show Icons", "boolean", Description = "Show the Element Type icons.")] | |||
public bool ShowIcons { get; set; } = true; | |||
|
|||
[ConfigurationField("expandsOnLoad", "Expands on load", "boolean", Description = "First item is automatically expanded")] |
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.
Maybe replace "First item" by "A single item" to be more accurate?
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.
Thanks @beliskner for the update!
I just left a tiny comment, let me know what you think.
Cheers!
change copy to more accurately describe the feature
Hi @mikecp thanks for the feedback! I adjusted the copy as per your request. If there's anything else you would like me to change please let me know :) |
Hi @beliskner , sorry for the delay, I just re-checked and it all works fine! So we're all ready to merge 😁 Thanks again for this PR! And since it is your first contribution to the CMS, @nul800sebastiaan will be happy to assign our shiny contributor's badge to you 🎉 Cheers! |
Awesome, thanks! https://our.umbraco.com/members/beliskner/ is my Our profile. Looking forward to contributing more! |
Contrib badge added! 👍 Thanks again @beliskner! |
This feature is a reimplementation of PR: #9883 of @patrickdemooij9 to add an option to disable nested content automatically expanding if the max items is set to 1 and the slider is turned off.
Visual of how this works is posted in attached closed PR.
Can be checked with: