Skip to content

Commit

Permalink
feat(sln): v29.6.1.13 - blog and Q&A search UX, email channel member …
Browse files Browse the repository at this point in the history
…emails
  • Loading branch information
seangwright committed Nov 11, 2024
1 parent 3cd6c6d commit 7bce337
Show file tree
Hide file tree
Showing 63 changed files with 1,862 additions and 1,021 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<!-- See https://aka.ms/dotnet/msbuild/customize for more details on customizing your build -->
<PropertyGroup>
<VersionPrefix>29.6.1.10</VersionPrefix>
<VersionPrefix>29.6.1.13</VersionPrefix>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Kentico.Community.Portal.Core.Modules;
using Kentico.Xperience.Admin.Base;
using Kentico.Xperience.Admin.Base.UIPages;
using Kentico.Xperience.Admin.Websites;
using Kentico.Xperience.Admin.Websites.UIPages;

[assembly: UIPage(
Expand Down Expand Up @@ -156,7 +157,7 @@ private TableRowLinkProps QuestionLinkModelRetriever(object value, IDataContaine

string pageUrl = pageLinkGenerator.GetPath<ContentTab>(new()
{
{ typeof(WebPageLayout), $"{PortalWebSiteChannel.DEFAULT_LANGUAGE}_{webPageItemID}" },
{ typeof(WebPageLayout), new WebPageUrlIdentifier(PortalWebSiteChannel.DEFAULT_LANGUAGE, webPageItemID) },
{ typeof(WebPagesApplication), $"webpages-{websiteChannelID}" },
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Kentico.Community.Portal.Core.Content;
using Kentico.Xperience.Admin.Base;
using Kentico.Xperience.Admin.Base.UIPages;
using Kentico.Xperience.Admin.Websites;
using Kentico.Xperience.Admin.Websites.UIPages;

[assembly: UIPage(
Expand Down Expand Up @@ -100,7 +101,7 @@ private TableRowLinkProps QuestionPageLinkModelRetriever(object value, IDataCont

string pageUrl = pageLinkGenerator.GetPath<ContentTab>(new()
{
{ typeof(WebPageLayout), $"{PortalWebSiteChannel.DEFAULT_LANGUAGE}_{webPageItemID}" },
{ typeof(WebPageLayout), new WebPageUrlIdentifier(PortalWebSiteChannel.DEFAULT_LANGUAGE, webPageItemID) },
{ typeof(WebPagesApplication), $"webpages-{websiteChannelID}" },
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Kentico.Community.Portal.Core;
using Kentico.Community.Portal.Core.Modules;
using Kentico.Xperience.Admin.Base;
using Kentico.Xperience.Admin.Websites;
using Kentico.Xperience.Admin.Websites.UIPages;

[assembly: UIPage(
Expand Down Expand Up @@ -100,7 +101,7 @@ private TableRowLinkProps QuestionPageLinkModelRetriever(object value, IDataCont

string pageUrl = pageLinkGenerator.GetPath<ContentTab>(new()
{
{ typeof(WebPageLayout), $"{PortalWebSiteChannel.DEFAULT_LANGUAGE}_{webPageItemID}" },
{ typeof(WebPageLayout), new WebPageUrlIdentifier(PortalWebSiteChannel.DEFAULT_LANGUAGE, webPageItemID) },
{ typeof(WebPagesApplication), $"webpages-{websiteChannelID}" },
});

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Diagnostics.Contracts;

namespace System.Linq;

public static class CollectionExtensions
{
[Pure]
public static IEnumerable<T> WhereNotNull<T>(this IEnumerable<T?> o) where T : class =>
o.Where(x => x != null)!;

[Pure]
public static IEnumerable<T> WHereNotNull<T>(this IEnumerable<T?> enumerable) where T : struct =>
enumerable.Where(e => e.HasValue).Select(e => e!.Value);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using CMS.Helpers;
using CMS.Websites.Routing;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Options;

namespace Kentico.Community.Portal.Core.Operations;
Expand All @@ -15,7 +16,8 @@ public class QueryCachingPipelineBehavior<TQuery, TResult>(
IEnumerable<IQueryCacheKeysCreator<TQuery, TResult>> creators,
IEnumerable<IQueryCacheSettingsCustomizer<TQuery, TResult>> cacheCustomizers,
IWebsiteChannelContext channelContext,
IOptions<DefaultQueryCacheSettings> settings) : IPipelineBehavior<TQuery, TResult>
IOptions<DefaultQueryCacheSettings> settings,
IHttpContextAccessor contextAccessor) : IPipelineBehavior<TQuery, TResult>
where TQuery : IQuery<TResult>
{
private readonly IProgressiveCache cache = cache;
Expand All @@ -26,16 +28,23 @@ public class QueryCachingPipelineBehavior<TQuery, TResult>(
private readonly IEnumerable<IQueryCacheKeysCreator<TQuery, TResult>> creators = creators;
private readonly IEnumerable<IQueryCacheSettingsCustomizer<TQuery, TResult>> cacheCustomizers = cacheCustomizers;
private readonly IWebsiteChannelContext channelContext = channelContext;
private readonly IHttpContextAccessor contextAccessor = contextAccessor;
private readonly DefaultQueryCacheSettings settings = settings.Value;

public async Task<TResult> Handle(TQuery query, RequestHandlerDelegate<TResult> next, CancellationToken cancellationToken)
{
var creator = creators.FirstOrDefault();

/*
* Guard against IWebsiteChannelContext.IsPreview throwing an exception
* when no HttpContext is available (e.g. background process)
*/
bool isPreview = contextAccessor.HttpContext is not null && channelContext.IsPreview;

/*
* Skip caching is we are in preview mode, caching is disabled, or we cannot generate cache keys for the current query
*/
if (channelContext.IsPreview ||
if (isPreview ||
!this.settings.IsEnabled ||
creator is null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,27 @@
</ExcludedObjectTypes> -->

<IncludedObjectTypes>
<ObjectType>cms.class</ObjectType>
<ObjectType>cms.contenttype</ObjectType>
<ObjectType>cms.contentitem</ObjectType>
<ObjectType>cms.contentitemcommondata</ObjectType>
<ObjectType>cms.contentitemlanguagemetadata</ObjectType>
<ObjectType>emaillibrary.emailconfiguration</ObjectType>
</IncludedObjectTypes>

<ObjectFilters>
<IncludedCodeNames ObjectType="cms.contenttype">
placeholder;
kenticocommunity.qandaquestionpage;
kenticocommunity.autoresponderemail;
</IncludedCodeNames>

<IncludedCodeNames ObjectType="cms.contentitem">
MemberRegistrationEmailConfirmation-6wjw8hge;
MemberResetPasswordConfirmation-ahw9v8cj;
</IncludedCodeNames>

<IncludedCodeNames ObjectType="cms.class">
CMS.ContentItemCommonData
</IncludedCodeNames>
</ObjectFilters>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<controlname>Kentico.Administration.TextInput</controlname>
</settings>
</field>
<field column="AutoresponderEmailContent" columnprecision="0" columntype="longtext" enabled="true" guid="bdb2afe2-b1f2-4b67-a055-9b2c17b7dccb" visible="true">
<field column="AutoresponderEmailContent" columnprecision="0" columntype="richtexthtml" enabled="true" guid="bdb2afe2-b1f2-4b67-a055-9b2c17b7dccb" visible="true">
<properties>
<explanationtextashtml>False</explanationtextashtml>
<fieldcaption>Content</fieldcaption>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<controlname>Kentico.Administration.DateInput</controlname>
</settings>
</field>
<field column="NewsletterEmailIntroContent" columnprecision="0" columntype="longtext" enabled="true" guid="4ea49558-4614-43cc-87ea-75c093619de0" visible="true">
<field column="NewsletterEmailIntroContent" columnprecision="0" columntype="richtexthtml" enabled="true" guid="4ea49558-4614-43cc-87ea-75c093619de0" visible="true">
<properties>
<explanationtextashtml>False</explanationtextashtml>
<fieldcaption>Content</fieldcaption>
Expand Down Expand Up @@ -108,7 +108,7 @@
<SelectionType>contentTypes</SelectionType>
</settings>
</field>
<field column="NewsletterEmailOutroContent" columnprecision="0" columntype="longtext" enabled="true" guid="a3d5d40d-9309-4367-a6ca-eee5fa8190f8" visible="true">
<field column="NewsletterEmailOutroContent" columnprecision="0" columntype="richtexthtml" enabled="true" guid="a3d5d40d-9309-4367-a6ca-eee5fa8190f8" visible="true">
<properties>
<explanationtextashtml>False</explanationtextashtml>
<fieldcaption>Outro Content</fieldcaption>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@
<field column="QAndAQuestionPageAuthorMemberID" columnprecision="0" columntype="integer" enabled="true" guid="9cf3c9fc-bd1c-4b33-b7b3-d791356ff81c" visible="true">
<properties>
<defaultvalue>0</defaultvalue>
<explanationtext>
<![CDATA[Member ID of the author, 0 if created by the system]]>
</explanationtext>
<explanationtextashtml>False</explanationtextashtml>
<fieldcaption>Author</fieldcaption>
<fielddescriptionashtml>False</fielddescriptionashtml>
</properties>
<settings>
<controlname>Kentico.Administration.SingleObjectIdSelector</controlname>
<ObjectType>CMS.Member</ObjectType>
<Placeholder>0</Placeholder>
<controlname>Kentico.Administration.NumberInput</controlname>
</settings>
</field>
<field allowempty="true" column="QAndAQuestionPageDiscussionType" columnprecision="0" columntype="taxonomy" enabled="true" guid="22ef0471-1e20-432b-9af4-fd7004dcfbda" visible="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<cms.scheduledtask>
<TaskAssemblyName>CMS.LicenseProvider</TaskAssemblyName>
<TaskClass>CMS.LicenseProvider.LicenseReporter</TaskClass>
<TaskData />
<TaskData>1</TaskData>
<TaskDeleteAfterLastRun>False</TaskDeleteAfterLastRun>
<TaskDisplayName>Periodically contacts license server</TaskDisplayName>
<TaskEnabled>True</TaskEnabled>
<TaskGUID>d82be54b-d55b-4aae-bd3d-3ef859a312fb</TaskGUID>
<TaskInterval>
<![CDATA[day;6/20/2024 7:37:40 AM;1;Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday]]>
<![CDATA[day;7/1/2024 5:04:01 PM;1;Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday]]>
</TaskInterval>
<TaskName>LicenseReporter</TaskName>
</cms.scheduledtask>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<cms.contentitem>
<ContentItemChannelID>
<CodeName>KenticoCommunityEmails</CodeName>
<GUID>1b41b848-ddd2-4a8d-9bc7-850a93e147c4</GUID>
<ObjectType>cms.channel</ObjectType>
</ContentItemChannelID>
<ContentItemContentTypeID>
<CodeName>KenticoCommunity.AutoresponderEmail</CodeName>
<GUID>70764325-6007-438e-93fe-dc319714c7a6</GUID>
<ObjectType>cms.contenttype</ObjectType>
</ContentItemContentTypeID>
<ContentItemGUID>a00b9bc8-fd48-4ba9-a57b-dea12798e23b</ContentItemGUID>
<ContentItemIsReusable>False</ContentItemIsReusable>
<ContentItemIsSecured>False</ContentItemIsSecured>
<ContentItemName>MemberRegistrationEmailConfirmation-6wjw8hge</ContentItemName>
</cms.contentitem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<cms.contentitem>
<ContentItemChannelID>
<CodeName>KenticoCommunityEmails</CodeName>
<GUID>1b41b848-ddd2-4a8d-9bc7-850a93e147c4</GUID>
<ObjectType>cms.channel</ObjectType>
</ContentItemChannelID>
<ContentItemContentTypeID>
<CodeName>KenticoCommunity.AutoresponderEmail</CodeName>
<GUID>70764325-6007-438e-93fe-dc319714c7a6</GUID>
<ObjectType>cms.contenttype</ObjectType>
</ContentItemContentTypeID>
<ContentItemGUID>4eb4da09-d82b-4224-92be-f8bfa76d5a94</ContentItemGUID>
<ContentItemIsReusable>False</ContentItemIsReusable>
<ContentItemIsSecured>False</ContentItemIsSecured>
<ContentItemName>MemberResetPasswordConfirmation-ahw9v8cj</ContentItemName>
</cms.contentitem>
36 changes: 36 additions & 0 deletions ...tion..firmation-6wjw8hge@05bb3aa664/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<cms.contentitemcommondata>
<ContentItemCommonDataContentItemID>
<CodeName>MemberRegistrationEmailConfirmation-6wjw8hge</CodeName>
<GUID>a00b9bc8-fd48-4ba9-a57b-dea12798e23b</GUID>
<ObjectType>cms.contentitem</ObjectType>
</ContentItemCommonDataContentItemID>
<ContentItemCommonDataContentLanguageID>
<CodeName>en-US</CodeName>
<GUID>6c743a9e-8a63-425b-bef6-756c12c1bbf5</GUID>
<ObjectType>cms.contentlanguage</ObjectType>
</ContentItemCommonDataContentLanguageID>
<ContentItemCommonDataFirstPublishedWhen>2024-11-06 20:26:45Z</ContentItemCommonDataFirstPublishedWhen>
<ContentItemCommonDataGUID>276a786f-446f-45e2-a7da-e214d40d7041</ContentItemCommonDataGUID>
<ContentItemCommonDataIsLatest>True</ContentItemCommonDataIsLatest>
<ContentItemCommonDataLastPublishedWhen>2024-11-11 13:56:32Z</ContentItemCommonDataLastPublishedWhen>
<ContentItemCommonDataVersionStatus>2</ContentItemCommonDataVersionStatus>
<EmailDefaults>
<![CDATA[[{"Identifier":"a0222552-0368-4784-9661-fd5660bfe492"}]]]>
</EmailDefaults>
<ContentItemReferences>
<cms.contentitemreference>
<ContentItemReferenceGroupGUID>f8e8d7f5-688a-46d3-9d98-ae157e3e32fd</ContentItemReferenceGroupGUID>
<ContentItemReferenceGUID>45fcfad2-ea4d-47be-9fb4-3e4347051cdd</ContentItemReferenceGUID>
<ContentItemReferenceSourceCommonDataID>
<GUID>276a786f-446f-45e2-a7da-e214d40d7041</GUID>
<ObjectType>cms.contentitemcommondata</ObjectType>
</ContentItemReferenceSourceCommonDataID>
<ContentItemReferenceTargetItemID>
<CodeName>KenticoCommunityEmailDefaults-1do1ulq8</CodeName>
<GUID>a0222552-0368-4784-9661-fd5660bfe492</GUID>
<ObjectType>cms.contentitem</ObjectType>
</ContentItemReferenceTargetItemID>
</cms.contentitemreference>
</ContentItemReferences>
</cms.contentitemcommondata>
36 changes: 36 additions & 0 deletions ...swor..firmation-ahw9v8cj@69d7c8613a/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<cms.contentitemcommondata>
<ContentItemCommonDataContentItemID>
<CodeName>MemberResetPasswordConfirmation-ahw9v8cj</CodeName>
<GUID>4eb4da09-d82b-4224-92be-f8bfa76d5a94</GUID>
<ObjectType>cms.contentitem</ObjectType>
</ContentItemCommonDataContentItemID>
<ContentItemCommonDataContentLanguageID>
<CodeName>en-US</CodeName>
<GUID>6c743a9e-8a63-425b-bef6-756c12c1bbf5</GUID>
<ObjectType>cms.contentlanguage</ObjectType>
</ContentItemCommonDataContentLanguageID>
<ContentItemCommonDataFirstPublishedWhen>2024-11-11 13:59:37Z</ContentItemCommonDataFirstPublishedWhen>
<ContentItemCommonDataGUID>9ba20fad-01f1-49da-bfa9-ff4280145266</ContentItemCommonDataGUID>
<ContentItemCommonDataIsLatest>True</ContentItemCommonDataIsLatest>
<ContentItemCommonDataLastPublishedWhen>2024-11-11 13:59:37Z</ContentItemCommonDataLastPublishedWhen>
<ContentItemCommonDataVersionStatus>2</ContentItemCommonDataVersionStatus>
<EmailDefaults>
<![CDATA[[{"Identifier":"a0222552-0368-4784-9661-fd5660bfe492"}]]]>
</EmailDefaults>
<ContentItemReferences>
<cms.contentitemreference>
<ContentItemReferenceGroupGUID>f8e8d7f5-688a-46d3-9d98-ae157e3e32fd</ContentItemReferenceGroupGUID>
<ContentItemReferenceGUID>9aba55ca-d130-4dcc-b647-3e15aff9bd30</ContentItemReferenceGUID>
<ContentItemReferenceSourceCommonDataID>
<GUID>9ba20fad-01f1-49da-bfa9-ff4280145266</GUID>
<ObjectType>cms.contentitemcommondata</ObjectType>
</ContentItemReferenceSourceCommonDataID>
<ContentItemReferenceTargetItemID>
<CodeName>KenticoCommunityEmailDefaults-1do1ulq8</CodeName>
<GUID>a0222552-0368-4784-9661-fd5660bfe492</GUID>
<ObjectType>cms.contentitem</ObjectType>
</ContentItemReferenceTargetItemID>
</cms.contentitemreference>
</ContentItemReferences>
</cms.contentitemcommondata>
28 changes: 28 additions & 0 deletions ...tion..firmation-6wjw8hge@05bb3aa664/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<cms.contentitemlanguagemetadata>
<ContentItemLanguageMetadataContentItemID>
<CodeName>MemberRegistrationEmailConfirmation-6wjw8hge</CodeName>
<GUID>a00b9bc8-fd48-4ba9-a57b-dea12798e23b</GUID>
<ObjectType>cms.contentitem</ObjectType>
</ContentItemLanguageMetadataContentItemID>
<ContentItemLanguageMetadataContentLanguageID>
<CodeName>en-US</CodeName>
<GUID>6c743a9e-8a63-425b-bef6-756c12c1bbf5</GUID>
<ObjectType>cms.contentlanguage</ObjectType>
</ContentItemLanguageMetadataContentLanguageID>
<ContentItemLanguageMetadataCreatedByUserID>
<CodeName>SeanW_kentico.com</CodeName>
<GUID>d6a0d252-e67a-4090-8610-1a9f9b6a2cb3</GUID>
<ObjectType>cms.user</ObjectType>
</ContentItemLanguageMetadataCreatedByUserID>
<ContentItemLanguageMetadataCreatedWhen>2024-11-06 20:23:25Z</ContentItemLanguageMetadataCreatedWhen>
<ContentItemLanguageMetadataDisplayName>Member registration email confirmation</ContentItemLanguageMetadataDisplayName>
<ContentItemLanguageMetadataGUID>2c19ca5e-48a9-4401-8c59-06bc3da8f00d</ContentItemLanguageMetadataGUID>
<ContentItemLanguageMetadataHasImageAsset>False</ContentItemLanguageMetadataHasImageAsset>
<ContentItemLanguageMetadataLatestVersionStatus>2</ContentItemLanguageMetadataLatestVersionStatus>
<ContentItemLanguageMetadataModifiedByUserID>
<CodeName>SeanW_kentico.com</CodeName>
<GUID>d6a0d252-e67a-4090-8610-1a9f9b6a2cb3</GUID>
<ObjectType>cms.user</ObjectType>
</ContentItemLanguageMetadataModifiedByUserID>
</cms.contentitemlanguagemetadata>
28 changes: 28 additions & 0 deletions ...swor..firmation-ahw9v8cj@69d7c8613a/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<cms.contentitemlanguagemetadata>
<ContentItemLanguageMetadataContentItemID>
<CodeName>MemberResetPasswordConfirmation-ahw9v8cj</CodeName>
<GUID>4eb4da09-d82b-4224-92be-f8bfa76d5a94</GUID>
<ObjectType>cms.contentitem</ObjectType>
</ContentItemLanguageMetadataContentItemID>
<ContentItemLanguageMetadataContentLanguageID>
<CodeName>en-US</CodeName>
<GUID>6c743a9e-8a63-425b-bef6-756c12c1bbf5</GUID>
<ObjectType>cms.contentlanguage</ObjectType>
</ContentItemLanguageMetadataContentLanguageID>
<ContentItemLanguageMetadataCreatedByUserID>
<CodeName>SeanW_kentico.com</CodeName>
<GUID>d6a0d252-e67a-4090-8610-1a9f9b6a2cb3</GUID>
<ObjectType>cms.user</ObjectType>
</ContentItemLanguageMetadataCreatedByUserID>
<ContentItemLanguageMetadataCreatedWhen>2024-11-07 23:08:02Z</ContentItemLanguageMetadataCreatedWhen>
<ContentItemLanguageMetadataDisplayName>Member reset password confirmation</ContentItemLanguageMetadataDisplayName>
<ContentItemLanguageMetadataGUID>99529439-fd5e-450d-9545-a1e019b9efce</ContentItemLanguageMetadataGUID>
<ContentItemLanguageMetadataHasImageAsset>False</ContentItemLanguageMetadataHasImageAsset>
<ContentItemLanguageMetadataLatestVersionStatus>2</ContentItemLanguageMetadataLatestVersionStatus>
<ContentItemLanguageMetadataModifiedByUserID>
<CodeName>SeanW_kentico.com</CodeName>
<GUID>d6a0d252-e67a-4090-8610-1a9f9b6a2cb3</GUID>
<ObjectType>cms.user</ObjectType>
</ContentItemLanguageMetadataModifiedByUserID>
</cms.contentitemlanguagemetadata>
Loading

0 comments on commit 7bce337

Please sign in to comment.