-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Set current master template in template tree #11482
Set current master template in template tree #11482
Conversation
Hi there @bjarnef, 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:
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 🤖 🙂 |
Great improvement! Totally forgot to set the selected item |
It would be great if we could expand the tree in case the selected template is not at root. However there could be multiple root levels in tree, so it would probably expand based on path. I had a look at the source of the tree, but didn't find something specific to expand tree from code. @patrickdemooij9 maybe you know anything we could use here? |
Okay, I found a way to do this using vPxsQXtZBe.mp4 |
With the latest changed it looks like this: ZiFBRVTvSf.mp4However it seems |
@bjarnef, do you think we should make this a generic functionality of the treepicker? Then we could also get this working on other places. I'll see if I can also take a look at it later. |
@patrickdemooij9 yes, it might make sense to have. I tried with It seems we need to pass in a Feel free to commit to this PR or open a separate PR.. I think the Babel stuff is also great as we can use javascript optional chaining operator. In |
@bjarnef, If you pass a currentNode param with a path, it'll use that to load the tree. The only thing is that the styling is a bit different than expected.
|
@patrickdemooij9 thanks for looking into this. Much better 😁 KqI6rlCRMQ.mp4 |
Hi there @bjarnef! Thanks for the contribution here and apologies if it has been a while since you heard from us. We have been in the very fortunate position of having lots of work to do. With this in mind, we are writing to let you know that with the release of the Long Term Support (LTS) version, 8.18, we have now moved into the support phase of Umbraco 8. You can read all about that here but to surmise, we will be keeping Umbraco 8 safe and well by releasing patching for security or regression issues if they arise but no longer will we do that for bug fixes. The same is still true for features, although we stopped merging those some time ago. We'd love for you to keep contributing and while we are not able to merge this to Umbraco 8, if this is still something you'd like to see in Umbraco 9, please take a look and either create an issue to say so or find an issue that already exists. We'll be happy to give you some input around how you can adjust your pull request to target Umbraco 9. Even better, it might be something that Umbraco 9 already does or has. In which case, enjoy! Once again, a huge thank you for the time you have spent working with us. #H5YR |
@nul800sebastiaan I guess these changes are too late for v8 unless we want the changed in a patch update? The Babel changes isn't strictly necessary, but the newer version includes the |
@bjarnef We'd be happy to look at a PR for v9, v8 will now only get "critical" updates as described in the linked articles. |
Prerequisites
Description
Recently the template picker has changed to use a tree picker by @patrickdemooij9 in #11363
I think it would be great to show the selected template, when opening the template picker.
p1deW89CMJ.mp4
Furthermore it seems we currently can't use javascript optional chaining operator without the gulp task is failing.
We could install
@babel/plugin-proposal-optional-chaining
plugin https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining but this is included in a newer version of@babel/preset-env
, which also includes@babel/plugin-proposal-object-rest-spread
https://babeljs.io/docs/en/babel-plugin-proposal-object-rest-spreadOptional chaining has been included in
@babel/preset-env
since v7.8.0: babel/babel#10809