From e150b12437eba56e4ece2547a6bbcb21c35c4e1b Mon Sep 17 00:00:00 2001 From: thepra Date: Tue, 10 Nov 2026 08:11:24 +0100 Subject: [PATCH] Hidden parts of the feed tabs and the megamenu are left out instead of hidden A feed tab's name and the megamenu's toggle are now only rendered where they show, rather than rendered and then hidden by a class, so nothing runs or ships for a part no one sees. The validator hint and the phone menu keep their hiding class on purpose: the browser reveals the first, and the second is also the desktop sidebar. The house-rules checks move to 1.1.0. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01W4YtEJrgxG12Pc39Fai8Bd --- CLAUDE.md | 4 ++++ Components/Daisy/Navigation/DMegamenu.razor | 10 ++++++++-- Components/Feed/FeedTabs.razor | 9 ++++++++- Directory.Build.props | 5 +++-- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index e1ffe67..2b8ded4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -867,6 +867,10 @@ ones with an HR id as errors in every build and in Rider, here and in `PrivaPub. | Components | `[Inject]` in `@code`, never `@inject` (HR0101) | | Components | Disable controls with `IsDefaultDisabled` (plus local conditions), never bare offline state (HR0104) | | Components | Every text/number input declares `autocomplete`, except credentials (HR0103, HR0105) | +| Components | Hide by not rendering (HR0107): what a user, role or state should not see is left out with `@if`, never hidden by a class or style a condition switches on. A static responsive class (`hidden max-md:inline`) is fine. Two files keep a hiding class on purpose (`HouseRulesHiddenToggleAllowed`): `DValidatorHint` (daisyUI's `validator-hint hidden` collapses the hint while its field is valid and the browser shows it on `:user-invalid`, so the node must exist) and `NavMenu` (the same panel is the sidebar from md and the phone menu below it, so it stays rendered and only its phone visibility follows `isMenuOpen`) | +| Components | No MudBlazor here, so the picker rules (HR0108, HR0320) don't apply; a list of records to pick from still searches rather than listing everything | +| Services | A server failure's message starts with its code (`[ERR0030006] …`, HR0013 on the server); show it as it comes and never match on it — branch on `ErrorCode` (`FailureCodes`) or the status | +| All | No spreadsheet import or export unless asked for (HR0319) | | Services | A failure the client builds itself is a 400 that names its kind in `ErrorCode` (`FailureCodes`), never a 5XX; only a server's own 5XX passes through (HR0007) | | Services | `Task` for mutations, `Task>` (`[]` on error) for lists, `Task` with a default for values | | Localization | Every user-facing string through `Localizer`, its key in **both** `AllStrings.resx` and `AllStrings.it.resx` | diff --git a/Components/Daisy/Navigation/DMegamenu.razor b/Components/Daisy/Navigation/DMegamenu.razor index fa89ce7..92b6b20 100644 --- a/Components/Daisy/Navigation/DMegamenu.razor +++ b/Components/Daisy/Navigation/DMegamenu.razor @@ -5,9 +5,15 @@ Escape are the browser's. The root is a popover too: with Responsive it turns, below sm, into a vertical menu that the toggle button opens. daisyUI supports at most 10 items. text-inherit undoes the browser's popover CanvasText colour, which daisyUI resets for dropdowns but not here. *@ -@if (Responsive || Direction == DDirection.Vertical) +@if (Direction == DDirection.Vertical) { - +} +else if (Responsive) +{ + } diff --git a/Components/Feed/FeedTabs.razor b/Components/Feed/FeedTabs.razor index 2c169c5..25a0d39 100644 --- a/Components/Feed/FeedTabs.razor +++ b/Components/Feed/FeedTabs.razor @@ -17,7 +17,14 @@
- + @if (type == Filter.TimelineType) + { + @TabName(type) + } + else + { + + } @if (type is TimelineType.Notifications && UnreadNotifications > 0) { @UnreadNotifications diff --git a/Directory.Build.props b/Directory.Build.props index a08573d..f29d0fb 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,12 +3,13 @@ true NumbersExtensions + DValidatorHint.razor,NavMenu.razor Login.razor,Join.razor,Setup.razor,PasswordRecovery.razor,AccountEditor.razor,TotpEditor.razor,Groups.razor,ActDialog.razor,BackupsPanel.razor - $(WarningsAsErrors);HR0001;HR0002;HR0003;HR0004;HR0005;HR0006;HR0007;HR0008;HR0009;HR0010;HR0011;HR0101;HR0102;HR0103;HR0104;HR0105;HR0106;HR0201 + $(WarningsAsErrors);HR0001;HR0002;HR0003;HR0004;HR0005;HR0006;HR0007;HR0008;HR0009;HR0010;HR0011;HR0012;HR0013;HR0101;HR0102;HR0103;HR0104;HR0105;HR0106;HR0107;HR0108;HR0201 - +