Skip to content

Commit 3845cd5

Browse files
authored
Merge branch 'main' into dependabot/nuget/system-io-abstractions-fcdc35e9a8
2 parents 596d84c + 5719f0a commit 3845cd5

File tree

18 files changed

+181
-161
lines changed

18 files changed

+181
-161
lines changed

src/Elastic.ApiExplorer/OpenApiGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ private async Task<IFileInfo> Render<T>(INavigationItem current, T page, ApiRend
288288
if (!outputFile.Directory!.Exists)
289289
outputFile.Directory.Create();
290290

291-
var navigationRenderResult = await navigationRenderer.RenderNavigation(current.NavigationRoot, new Uri("http://ignored.example"), INavigationHtmlWriter.AllLevels, ctx);
291+
var navigationRenderResult = await navigationRenderer.RenderNavigation(current.NavigationRoot, INavigationHtmlWriter.AllLevels, ctx);
292292
renderContext = renderContext with
293293
{
294294
CurrentNavigation = current,

src/Elastic.Documentation.Site/Navigation/INavigationHtmlWriter.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ public interface INavigationHtmlWriter
1010
{
1111
const int AllLevels = -1;
1212

13-
Task<NavigationRenderResult> RenderNavigation(IRootNavigationItem<INavigationModel, INavigationItem> currentRootNavigation, Uri navigationSource,
14-
int maxLevel, Cancel ctx = default);
13+
Task<NavigationRenderResult> RenderNavigation(IRootNavigationItem<INavigationModel, INavigationItem> currentRootNavigation, int maxLevel, Cancel ctx = default);
1514

1615
async Task<string> Render(NavigationViewModel model, Cancel ctx)
1716
{

src/Elastic.Documentation.Site/Navigation/IsolatedBuildNavigationHtmlWriter.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ public class IsolatedBuildNavigationHtmlWriter(BuildContext context, IRootNaviga
1313
{
1414
private readonly ConcurrentDictionary<(string, int), string> _renderedNavigationCache = [];
1515

16-
public async Task<NavigationRenderResult> RenderNavigation(IRootNavigationItem<INavigationModel, INavigationItem> currentRootNavigation,
17-
Uri navigationSource, int maxLevel, Cancel ctx = default)
16+
public async Task<NavigationRenderResult> RenderNavigation(
17+
IRootNavigationItem<INavigationModel, INavigationItem> currentRootNavigation, int maxLevel, Cancel ctx = default
18+
)
1819
{
1920
var navigation = context.Configuration.Features.PrimaryNavEnabled || currentRootNavigation.IsUsingNavigationDropdown
2021
? currentRootNavigation

src/Elastic.Documentation.Site/package-lock.json

Lines changed: 34 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Elastic.Documentation.Site/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"private": true,
3333
"devDependencies": {
3434
"@elastic/datemath": "5.0.3",
35-
"@elastic/eui": "104.1.0",
36-
"@elastic/eui-theme-borealis": "3.1.0",
35+
"@elastic/eui": "105.0.0",
36+
"@elastic/eui-theme-borealis": "3.2.0",
3737
"@emotion/css": "11.13.5",
3838
"@emotion/react": "11.14.0",
3939
"@eslint/js": "9.30.1",
@@ -48,7 +48,7 @@
4848
"postcss": "8.5.6",
4949
"postcss-import": "16.1.1",
5050
"prettier": "3.6.2",
51-
"prettier-plugin-tailwindcss": "0.6.13",
51+
"prettier-plugin-tailwindcss": "0.6.14",
5252
"react": "18.3.1",
5353
"react-dom": "18.3.1",
5454
"typescript-eslint": "8.35.1"

src/Elastic.Markdown/HtmlWriter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ private async Task<RenderResult> RenderLayout(MarkdownFile markdown, MarkdownDoc
5656
var html = MarkdownFile.CreateHtml(document);
5757
await DocumentationSet.Tree.Resolve(ctx);
5858

59-
var fullNavigationRenderResult = await NavigationHtmlWriter.RenderNavigation(markdown.NavigationRoot, markdown.NavigationSource, INavigationHtmlWriter.AllLevels, ctx);
60-
var miniNavigationRenderResult = await NavigationHtmlWriter.RenderNavigation(markdown.NavigationRoot, markdown.NavigationSource, 1, ctx);
59+
var fullNavigationRenderResult = await NavigationHtmlWriter.RenderNavigation(markdown.NavigationRoot, INavigationHtmlWriter.AllLevels, ctx);
60+
var miniNavigationRenderResult = await NavigationHtmlWriter.RenderNavigation(markdown.NavigationRoot, 1, ctx);
6161

6262
var navigationHtmlRenderResult = DocumentationSet.Context.Configuration.Features.LazyLoadNavigation
6363
? miniNavigationRenderResult

src/Elastic.Markdown/IO/MarkdownFile.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ DocumentationSet set
5757
ScopeDirectory = build.Configuration.ScopeDirectory;
5858

5959
NavigationRoot = set.Tree;
60-
NavigationSource = set.Source;
6160
}
6261

6362
public bool PartOfNavigation { get; set; }
@@ -66,8 +65,6 @@ DocumentationSet set
6665

6766
public IRootNavigationItem<INavigationModel, INavigationItem> NavigationRoot { get; set; }
6867

69-
public Uri NavigationSource { get; set; }
70-
7168
private IDiagnosticsCollector Collector { get; }
7269

7370
public string? UrlPathPrefix { get; }

src/Elastic.Markdown/IO/Navigation/DocumentationGroup.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Elastic.Markdown.IO.Navigation;
1313

14-
[DebuggerDisplay("Group >{Depth} {FolderName} ({NavigationItems.Count} items)")]
14+
[DebuggerDisplay("Toc: {Depth} {NavigationSource} > ({NavigationItems.Count} items)")]
1515
public class DocumentationGroup : INodeNavigationItem<MarkdownFile, INavigationItem>
1616
{
1717
private readonly TableOfContentsTreeCollector _treeCollector;
@@ -138,7 +138,6 @@ void AddToNavigationItems(INavigationItem item, ref int fileIndex)
138138
// TODO these have to be refactor to be pure navigational properties
139139
md.ScopeDirectory = file.TableOfContentsScope.ScopeDirectory;
140140
md.NavigationRoot = rootNavigationItem;
141-
md.NavigationSource = NavigationSource;
142141

143142
foreach (var extension in lookups.EnabledExtensions)
144143
extension.Visit(d, tocItem);

src/Elastic.Markdown/IO/Navigation/TableOfContentsTree.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace Elastic.Markdown.IO.Navigation;
1010

11-
[DebuggerDisplay("Toc >{Depth} {FolderName} ({NavigationItems.Count} items)")]
11+
[DebuggerDisplay("Toc: {Depth} {NavigationSource} > ({NavigationItems.Count} items)")]
1212
public class TableOfContentsTree : DocumentationGroup, IRootNavigationItem<MarkdownFile, INavigationItem>
1313
{
1414
public Uri Source { get; }

src/Elastic.Markdown/IO/Navigation/TableOfContentsTreeCollector.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ public class TableOfContentsTreeCollector
1111
{
1212
private Dictionary<Uri, TableOfContentsTree> NestedTableOfContentsTrees { get; } = [];
1313

14-
public void Collect(Uri source, TableOfContentsTree tree) =>
15-
NestedTableOfContentsTrees[source] = tree;
16-
17-
public void Collect(TocReference tocReference, TableOfContentsTree tree) =>
18-
NestedTableOfContentsTrees[tocReference.Source] = tree;
14+
public void Collect(Uri source, TableOfContentsTree tree) => NestedTableOfContentsTrees[source] = tree;
1915

2016
public bool TryGetTableOfContentsTree(Uri source, [NotNullWhen(true)] out TableOfContentsTree? tree) =>
2117
NestedTableOfContentsTrees.TryGetValue(source, out tree);

0 commit comments

Comments
 (0)