Pages MetaData Editing Mode Support#29
Conversation
…d EditScripts TagHelper
…d in editing config request. Updated related tests
…DictionaryService
…th customisable HeaderCollection instead
…ons as its not supported by MetaData Editing
Good catch @jballe, I'd forgotten about the iGQL in use on that control. I've updated the error handling in the I think this will work for now, and we can say that anything implemented with a custom Rendering Contents Resolvers, or with iGQL that changes the structure of the data returned will no longer be editable. We can then have a look at how to better handle deserialisation of these custom types, as the strong typing model in dotnet will make this more challenging than in node as you mentioned! |
|
Thank you @robearlam that was really fast! I have tried it and it is now working with those changes. I have two other comments - with the risk of delaying the PR (and especially when I have been poking @IvanLieckens it might not be the best timing) - so let me just give the input and then you can decide if it should actually be part of this PR or a future improvement - or maybe even something unrelated to this... When using metadata editing in Pages there is a request to config endpoint, implemented in the PagesSetupController. I had to make two changes here to get rid of console/CORS errors, so I have added More important: In this example I have moved the Promo view to a subfolder and changed the view name with a registration like this: renderingEngineOptions.AddModelBoundView<Promo>("Promo", "HeadlessExperienceAccelerator/Promo")
For ViewComponents it is actually worse, the extension method to register the view component But the method signature is changed to have a locator as a second paramter, so we end up with a registration with an empty componentName I can see you have had a bit back and forth on how this actually should be so it was probably not changed everywhere. But, from what I see, I think we need to store the actual component name that is used to build the predicate so that it can be exposed in the config endpoint. Right now I think there is a bit confusion on what is the component name used in the layout response and what is the name used to render the component. |
|
Thanks again for the feedback @jballe. Chatting with Ivan, we're hoping to get this completed and merged in the next couple of weeks. With the points you raised above:
I also noticed we weren't handling the naming for PartialView registration either so added that in as well. You're right, we have gone back and forth a bit having discussions about what will be supported in this Component list. The main thing that won't be is the predicate matching e.g. After discussing, we didn't want to hold up the release of this feature and figured as predicate matching isn't a feature offered by JSS, we would move without Pages MetaData supporting it for now and we can figure that out after the fact. |
|
So fast again. We are really looking forward to this, thank you. I agree, it looks tempting with such generic block and registration (which is then a new feature in the ASP.NET SDK, even though the default view is using that internally) but then you cannot expect that to work in Pages. When making the "usual" registrations it should work in Pages out of the box (and I see the matching more as an implementation detail on the inside) |
|
@robearlam, there seems to be an issue in this PR where the placeholders are not rendering properly. After lots of digging around, it seems that Pages is not properly outputting the needed HTML DOM elements. Compared to the chrome mode, it seems that the elements and attributes needed inside the |
…ect use of placeholder key
Good spot Amir. Turns out I was using the incorrect placeholder ID for nested placholder code blocks, that was causing them to render incorrectly, when empty. Should be fixed now. |
|
Please be aware that ExperienceEditor will still need to be enabled for Preview to work in Pages (and taking Thumbnails in Content Editor but I am in doubt if that is really supported) |
Yeah that is true. This is the same situation with the JS based ContentSDK, and there is work being performed internally to shift Preview away from using the EE. We can still merge this in for now, and once that work is complete then add the functionality in to the SDK here at that point. |
+ QL vs Ql fixed (added QL to abbreviations) + Added additional options for valid methods and headers + Moved strings to constants + Adjusted multi return functions to single result + Resolved logging style warnings + Removed vars + Fixed variable naming + EE added to abbreviations
sc-ivanlieckens
left a comment
There was a problem hiding this comment.
Srry about that one @robearlam. Seeing the new situation I realized it's not optimal for cognitive understanding of the usage as per our teams conversation.





This PR adds support for Pages MetaData Editing.
Description / Motivation
Testing
Terms
Closes #17