Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bb946a5
MetaData Config & Render calls configured
robearlam Nov 28, 2024
3c023f6
Configured metadata render method to correctly render page using new …
robearlam Dec 6, 2024
5a1d70d
Moved GQL logic out of LC.CLient and back into Pages logic. Introduce…
robearlam Dec 11, 2024
1c8752e
Wired up Placeholder and Rendering chromes
robearlam Dec 16, 2024
bd0dcde
Metadata editing now working
robearlam Jan 22, 2025
2b99fc6
Wired up EditingDictionaryQuery requests
robearlam Jan 29, 2025
5f34722
Fixed failing unit tests
robearlam Jan 31, 2025
5494e8e
Added UnitTests for EditingScriptsTagHelper
robearlam Feb 3, 2025
d007e5b
Added UnitTests for Pages GQL Factory, and RenderingEngine TagHelpers
robearlam Feb 4, 2025
b92f31d
ComponentName is now persisted in rendering collection, to be returne…
robearlam Feb 5, 2025
01a9228
Added UnitTests for Pages Config Middleware
robearlam Feb 5, 2025
5be1780
Added Unit Tests for Pages Setup Render Middleware call
robearlam Feb 5, 2025
4ea37ae
Added UniTests for GraphQLEditingServiceHandler
robearlam Feb 10, 2025
ddb0716
Added UniTests for EditingChromes being added to response for Pages r…
robearlam Feb 17, 2025
328561f
Restructured test for Pages config middleware
robearlam Feb 17, 2025
c2851cb
Fixed bug with ImageTagHelper and ViewCompponent
robearlam Mar 4, 2025
4d1c1dd
Moved PagesSetupMiddleware in a Controller, other small fixes
robearlam Mar 14, 2025
9e5608e
Moved log messages into Resources RESX
robearlam Mar 14, 2025
fb2f772
Added Resources RESX to Pages project
robearlam Mar 14, 2025
d0938ba
Refactored PlaceHolder processing to use Stack approach instead of re…
robearlam Mar 14, 2025
d380f8e
Improved logic controlling when Pages middleware executes
robearlam Mar 16, 2025
4570f44
Moved Dictionary functionality out of PagesGQLHandler into dedicated …
robearlam Mar 25, 2025
fa5202e
Removed GraphQlClient used for EditingHandler, added GraphQLClient wi…
robearlam Mar 26, 2025
f8eee28
Changed to no longer persist component names for predicate registrati…
robearlam Mar 26, 2025
ac8a933
Code TidyUp, fixed all warnings
robearlam Mar 26, 2025
1af1068
Removed ID property from EdtiableField as didnt need to be added
robearlam Mar 26, 2025
af13261
Created Integration tests for PagesSetupController
robearlam Mar 28, 2025
8109f8b
Added Integration test for succesful call to get editing layout with …
robearlam Apr 1, 2025
0a08769
Added csproj missing from previous commit
robearlam Apr 1, 2025
17e0b09
Improved logic for when to enable editing of Fields in MetaData editi…
robearlam Apr 1, 2025
21f0e77
Added handling for /config route OPTIONS request
robearlam Apr 7, 2025
4371c24
Fixed correct component naming for ViewComponents and PartialViews
robearlam Apr 7, 2025
17e6f29
Aligned empty placeholder classname with jss
robearlam Apr 22, 2025
8fd259f
Fixed issue with rendering of empty nested placeholders due to incorr…
robearlam Apr 22, 2025
0bc23b7
Style refactor
IvanLieckens May 26, 2025
64cb3d7
Fixed incorrect error being thrown from Config call
robearlam May 26, 2025
8cfecbf
Changes from PR Review
robearlam May 27, 2025
7e2b893
Moved MetaData Queries back from constants to improve readability
robearlam May 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public static RenderingEngineOptions AddPartialView(
return AddPartialView(
options,
name => layoutComponentName.Equals(name, StringComparison.OrdinalIgnoreCase),
partialViewPath);
partialViewPath,
layoutComponentName);
}

/// <summary>
Expand All @@ -61,17 +62,19 @@ public static RenderingEngineOptions AddPartialView(
/// <param name="options">The <see cref="RenderingEngineOptions"/> to configure.</param>
/// <param name="match">The predicate to use when attempting to match a layout component.</param>
/// <param name="partialViewPath">The path of the partial view.</param>
/// <param name="sitecoreComponentName">The name of the component as defined on the Sitecore Rendering Item.</param>
/// <returns>The <see cref="RenderingEngineOptions"/> so that additional calls can be chained.</returns>
public static RenderingEngineOptions AddPartialView(
this RenderingEngineOptions options,
Predicate<string> match,
string partialViewPath)
string partialViewPath,
string sitecoreComponentName = "")
{
ArgumentNullException.ThrowIfNull(options);
ArgumentNullException.ThrowIfNull(match);
ArgumentException.ThrowIfNullOrWhiteSpace(partialViewPath);

ComponentRendererDescriptor descriptor = PartialViewComponentRenderer.Describe(match, partialViewPath);
ComponentRendererDescriptor descriptor = PartialViewComponentRenderer.Describe(match, partialViewPath, sitecoreComponentName);

options.RendererRegistry.Add(options.RendererRegistry.Count, descriptor);

Expand Down Expand Up @@ -151,7 +154,7 @@ public static RenderingEngineOptions AddViewComponent(
ArgumentNullException.ThrowIfNull(match);
ArgumentException.ThrowIfNullOrWhiteSpace(viewComponentName);

ComponentRendererDescriptor descriptor = ViewComponentComponentRenderer.Describe(match, viewComponentName);
ComponentRendererDescriptor descriptor = ViewComponentComponentRenderer.Describe(match, viewComponentName, viewComponentName);

options.RendererRegistry.Add(options.RendererRegistry.Count, descriptor);

Expand Down Expand Up @@ -198,7 +201,8 @@ public static RenderingEngineOptions AddModelBoundView<TModel>(
return AddModelBoundView<TModel>(
options,
match => match.Equals(layoutComponentName, StringComparison.OrdinalIgnoreCase),
viewName);
viewName,
layoutComponentName);
}

/// <summary>
Expand All @@ -208,11 +212,13 @@ public static RenderingEngineOptions AddModelBoundView<TModel>(
/// <param name="options">The <see cref="RenderingEngineOptions"/> to configure.</param>
/// <param name="match">A predicate to use when attempting to match a layout component.</param>
/// <param name="viewName">The view name.</param>
/// <param name="sitecoreComponentName">The Component name as defined on the Sitecore Rendering Item.</param>
/// <returns>The <see cref="RenderingEngineOptions"/> so that additional calls can be chained.</returns>
public static RenderingEngineOptions AddModelBoundView<TModel>(
this RenderingEngineOptions options,
Predicate<string> match,
string viewName)
string viewName,
string sitecoreComponentName = "")
{
ArgumentNullException.ThrowIfNull(options);
ArgumentNullException.ThrowIfNull(match);
Expand All @@ -224,7 +230,7 @@ public static RenderingEngineOptions AddModelBoundView<TModel>(
sp,
RenderingEngineConstants.SitecoreViewComponents.DefaultSitecoreViewComponentName,
viewName),
viewName);
sitecoreComponentName);
Comment thread
robearlam marked this conversation as resolved.

options.RendererRegistry.Add(options.RendererRegistry.Count, descriptor);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ public PartialViewComponentRenderer(string locator)
/// </summary>
/// <param name="match">A predicate to use when attempting to match a layout component.</param>
/// <param name="locator">The string to use when locating the Partial View.</param>
/// <param name="sitecoreComponentName">The component name defined on the Sitecore Rendering Item.</param>
/// <returns>An instance of <see cref="ComponentRendererDescriptor"/> that describes the <see cref="PartialViewComponentRenderer"/>.</returns>
public static ComponentRendererDescriptor Describe(Predicate<string> match, string locator)
public static ComponentRendererDescriptor Describe(Predicate<string> match, string locator, string sitecoreComponentName = "")
{
ArgumentNullException.ThrowIfNull(match);
ArgumentException.ThrowIfNullOrWhiteSpace(locator);
return new ComponentRendererDescriptor(
match,
sp => ActivatorUtilities.CreateInstance<PartialViewComponentRenderer>(sp, locator));
sp => ActivatorUtilities.CreateInstance<PartialViewComponentRenderer>(sp, locator),
sitecoreComponentName);
}

/// <inheritdoc />
Expand Down