Skip to content

Commit

Permalink
feat(Azure): Admin UI enhancement containing mostly multi select drop…
Browse files Browse the repository at this point in the history
…down for included Content types on indexed paths
  • Loading branch information
bkapustik committed Apr 9, 2024
1 parent ec2227e commit 065c315
Show file tree
Hide file tree
Showing 15 changed files with 2,248 additions and 2,168 deletions.
2 changes: 1 addition & 1 deletion docs/Managing-Indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ or clicking an existing path in the table at the top of the index configuration
- Included Path - can be an exact relative path of a web page item, (ex: `/path/to/my/page`), or a wildcard path (ex: `/parent-path/%`)
- To determine a web page path, select the web page in the website channel page tree, then view the "Current URL" in the Content tab of the web page. The path will be the relative path excluding the domain
- Available content types - these are the web page content types that can be selected for the path.
- Included ContentType items - each content type in the list enables modification to web pages of that type to trigger an event that your custom indexing strategy can process. If the list is empty, no web pages will trigger these events. The items should be separated by new lines.
- Included ContentType items - these are the web page content types that can be selected for the path. Each content type in the multi-select enables modification to web pages of that type to trigger an event that your custom indexing strategy can process. If no option is selected, no web pages will trigger these events.

## Indexing reusable content items

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public AzureSearchConfigurationModel(
AzureSearchIndexItemInfo index,
IEnumerable<AzureSearchIndexLanguageItemInfo> indexLanguages,
IEnumerable<AzureSearchIncludedPathItemInfo> indexPaths,
IEnumerable<AzureSearchContentTypeItemInfo> contentTypes
IEnumerable<AzureSearchIndexContentType> contentTypes
)
{
Id = index.AzureSearchIndexItemId;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace Kentico.Xperience.AzureSearch.Admin;

public class AzureSearchIndexContentType
{
/// <summary>
/// Name of the indexed content type for an indexed path
/// </summary>
public string ContentTypeName { get; set; } = "";

/// <summary>
/// Displayed name of the indexed content type for an indexed path which will be shown in admin UI
/// </summary>
public string ContentTypeDisplayName { get; set; } = "";

public AzureSearchIndexContentType()
{ }

public AzureSearchIndexContentType(string className, string classDisplayName)
{
ContentTypeName = className;
ContentTypeDisplayName = classDisplayName;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class AzureSearchIndexIncludedPath
/// <summary>
/// A list of content types under the specified <see cref="AliasPath"/> that will be indexed.
/// </summary>
public List<string> ContentTypes { get; set; } = new();
public List<AzureSearchIndexContentType> ContentTypes { get; set; } = new();

/// <summary>
/// The internal identifier of the included path.
Expand All @@ -28,10 +28,10 @@ public class AzureSearchIndexIncludedPath
/// </summary>
/// <param name="indexPath"></param>
/// <param name="contentTypes"></param>
public AzureSearchIndexIncludedPath(AzureSearchIncludedPathItemInfo indexPath, IEnumerable<AzureSearchContentTypeItemInfo> contentTypes)
public AzureSearchIndexIncludedPath(AzureSearchIncludedPathItemInfo indexPath, IEnumerable<AzureSearchIndexContentType> contentTypes)
{
AliasPath = indexPath.AzureSearchIncludedPathItemAliasPath;
ContentTypes = contentTypes.Where(y => indexPath.AzureSearchIncludedPathItemId == y.AzureSearchContentTypeItemIncludedPathItemId).Select(y => y.AzureSearchContentTypeItemContentTypeName).ToList();
ContentTypes = contentTypes.ToList();
Identifier = indexPath.AzureSearchIncludedPathItemId.ToString();
}
}
3,489 changes: 1,670 additions & 1,819 deletions src/Kentico.Xperience.AzureSearch/Admin/Client/package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/Kentico.Xperience.AzureSearch/Admin/Client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"@kentico/xperience-admin-base": "28.2.1",
"@kentico/xperience-admin-components": "28.2.1",
"react": "18.2.0",
"react-dom": "18.2.0"
"react-dom": "18.2.0",
"react-icons": "^5.0.1",
"react-tooltip": "^5.26.3"
},
"devDependencies": {
"@babel/core": "7.23.9",
Expand Down
Loading

0 comments on commit 065c315

Please sign in to comment.