From 28944c155ac4aa66d789f8ef5c300bac7c9cad39 Mon Sep 17 00:00:00 2001 From: tleininger Date: Tue, 29 Sep 2026 21:35:53 +0200 Subject: [PATCH] Sort FAQ entries by editor-defined order within each topic --- Elternbeirat.PocketBase/PocketBaseClient.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Elternbeirat.PocketBase/PocketBaseClient.cs b/Elternbeirat.PocketBase/PocketBaseClient.cs index 7b7189f..23e13f4 100644 --- a/Elternbeirat.PocketBase/PocketBaseClient.cs +++ b/Elternbeirat.PocketBase/PocketBaseClient.cs @@ -71,13 +71,14 @@ public sealed class PocketBaseClient(HttpClient httpClient) /// /// Gets all public FAQ entries, ordered by , then by - /// . + /// the editor's order within each topic. /// /// /// The second sort key makes the order total: sorting by topic alone leaves /// entries within a topic in an undefined order, so the same content could - /// render differently between requests. Adding the question as a tie-breaker - /// keeps the FAQ list and any teaser drawn from it stable. + /// render differently between requests. The per-topic order field lets + /// an editor arrange the questions within a topic and keeps that arrangement + /// stable between requests; the topic groups themselves stay alphabetical. /// /// /// @@ -85,7 +86,7 @@ public sealed class PocketBaseClient(HttpClient httpClient) /// /// public Task> GetFaqsAsync(CancellationToken token = default) - => GetRecordsAsync("faqs", "topic,question", token); + => GetRecordsAsync("faqs", "topic,order", token); /// /// Gets all public records of a collection in a single request.