Hidden parts of the feed tabs and the megamenu are left out instead of hidden
Build / Build (push) Successful in 33s
Build / Build (push) Successful in 33s
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W4YtEJrgxG12Pc39Fai8Bd
This commit is contained in:
1 parent
dca046e27d
commit
e150b12437
4 files changed
+23
-5
No files matched your search
@@ -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<WebResult>` for mutations, `Task<List<T>>` (`[]` on error) for lists, `Task<T>` with a default for values |
|
||||
| Localization | Every user-facing string through `Localizer`, its key in **both** `AllStrings.resx` and `AllStrings.it.resx` |
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
<button type="button" class="@Cx("btn", Direction == DDirection.Vertical ? null : "sm:hidden", ToggleClass)" popovertarget="@uid">
|
||||
<button type="button" class="@Cx("btn", ToggleClass)" popovertarget="@uid">
|
||||
@ToggleText
|
||||
</button>
|
||||
}
|
||||
else if (Responsive)
|
||||
{
|
||||
<button type="button" class="btn sm:hidden @ToggleClass" popovertarget="@uid">
|
||||
@ToggleText
|
||||
</button>
|
||||
}
|
||||
|
||||
@@ -17,7 +17,14 @@
|
||||
<DTab Class="gap-1 whitespace-nowrap" AccessibleName="@TabName(type)">
|
||||
<Header>
|
||||
<i class="@type.GetTimelineTypeIcon()" aria-hidden="true"></i>
|
||||
<span class="@(type == Filter.TimelineType ? null : "hidden max-md:inline xl:inline")">@TabName(type)</span>
|
||||
@if (type == Filter.TimelineType)
|
||||
{
|
||||
<span>@TabName(type)</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="hidden max-md:inline xl:inline">@TabName(type)</span>
|
||||
}
|
||||
@if (type is TimelineType.Notifications && UnreadNotifications > 0)
|
||||
{
|
||||
<DBadge Size="DSize.Xs" Color="DColor.Primary" title="@Localizer["{0} unread", UnreadNotifications]" data-unread>@UnreadNotifications</DBadge>
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
<PropertyGroup>
|
||||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||
<HouseRulesFormatHelpers>NumbersExtensions</HouseRulesFormatHelpers>
|
||||
<HouseRulesHiddenToggleAllowed>DValidatorHint.razor,NavMenu.razor</HouseRulesHiddenToggleAllowed>
|
||||
<HouseRulesAutocompleteOmit>Login.razor,Join.razor,Setup.razor,PasswordRecovery.razor,AccountEditor.razor,TotpEditor.razor,Groups.razor,ActDialog.razor,BackupsPanel.razor</HouseRulesAutocompleteOmit>
|
||||
<WarningsAsErrors>$(WarningsAsErrors);HR0001;HR0002;HR0003;HR0004;HR0005;HR0006;HR0007;HR0008;HR0009;HR0010;HR0011;HR0101;HR0102;HR0103;HR0104;HR0105;HR0106;HR0201</WarningsAsErrors>
|
||||
<WarningsAsErrors>$(WarningsAsErrors);HR0001;HR0002;HR0003;HR0004;HR0005;HR0006;HR0007;HR0008;HR0009;HR0010;HR0011;HR0012;HR0013;HR0101;HR0102;HR0103;HR0104;HR0105;HR0106;HR0107;HR0108;HR0201</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Arasaka.HouseRules.Analyzers" Version="1.0.6" PrivateAssets="all" />
|
||||
<PackageReference Include="Arasaka.HouseRules.Analyzers" Version="1.1.0" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in new issue
Block a user