From 08396d4176fc69bf18722398734a5f7caf0818da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Dang=C3=A5rden?= Date: Tue, 27 Oct 2026 06:58:28 +0100 Subject: [PATCH] Docs: standalone and agent options in the online generator; no focus ring on h1 - Online generator: add Standalone and Agent mode (preview) switches, passed to ClientGenerator, so the site can produce the same output as the CLI's --standalone and --agent. - Hide the focus outline FocusOnNavigate draws around each page's h1. --- docs/Linq2GraphQL.Docs/Components/GenerateClient.razor | 8 ++++++++ .../Components/GenerateClient.razor.cs | 10 +++++++--- docs/Linq2GraphQL.Docs/wwwroot/css/app.css | 4 ++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/Linq2GraphQL.Docs/Components/GenerateClient.razor b/docs/Linq2GraphQL.Docs/Components/GenerateClient.razor index 3197ee71..c6b8ed29 100644 --- a/docs/Linq2GraphQL.Docs/Components/GenerateClient.razor +++ b/docs/Linq2GraphQL.Docs/Components/GenerateClient.razor @@ -39,6 +39,14 @@ + + + + + + + +
diff --git a/docs/Linq2GraphQL.Docs/Components/GenerateClient.razor.cs b/docs/Linq2GraphQL.Docs/Components/GenerateClient.razor.cs index cf298b24..2eead680 100644 --- a/docs/Linq2GraphQL.Docs/Components/GenerateClient.razor.cs +++ b/docs/Linq2GraphQL.Docs/Components/GenerateClient.razor.cs @@ -1,4 +1,4 @@ -using System.IO.Compression; +using System.IO.Compression; using Linq2GraphQL.Generator; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Forms; @@ -134,7 +134,8 @@ private async Task GenerateClientFromSchema() isLoading = true; var generator = new ClientGenerator(options.Namespace, options.ClientName, options.IncludeSubscriptions, - options.EnumGeneratorStrategy, options.Nullable, options.IncludeDeprecated); + options.EnumGeneratorStrategy, options.Nullable, options.IncludeDeprecated, + agent: options.Agent, standalone: options.Standalone); var entries = IsIntrospectionJson(options.Schema) ? generator.Generate(options.Schema) : generator.GenerateFromSdl(options.Schema); @@ -158,7 +159,8 @@ private async Task GenerateClientAsync() { isLoading = true; var generator = new ClientGenerator(options.Namespace, options.ClientName, options.IncludeSubscriptions, - options.EnumGeneratorStrategy, options.Nullable, options.IncludeDeprecated); + options.EnumGeneratorStrategy, options.Nullable, options.IncludeDeprecated, + agent: options.Agent, standalone: options.Standalone); var entries = await generator.GenerateAsync(new(options.Url), options.Token); await SaveEntriesAsync(entries); } @@ -183,6 +185,8 @@ public class GenerateOptions public string Url { get; set; } public string Token { get; set; } public bool IncludeDeprecated { get; set; } + public bool Standalone { get; set; } + public bool Agent { get; set; } public EnumGeneratorStrategy EnumGeneratorStrategy { get; set; } public string Schema { get; set; } diff --git a/docs/Linq2GraphQL.Docs/wwwroot/css/app.css b/docs/Linq2GraphQL.Docs/wwwroot/css/app.css index 807a91c8..6669fca3 100644 --- a/docs/Linq2GraphQL.Docs/wwwroot/css/app.css +++ b/docs/Linq2GraphQL.Docs/wwwroot/css/app.css @@ -7,6 +7,10 @@ color: #ff8383; } +/* FocusOnNavigate focuses the page's h1 for screen readers; don't draw a focus ring around it. */ +h1:focus { + outline: none; +} #blazor-error-ui { background: lightyellow;