feat: implement dashboard mobile responsiveness v3 overhaul (#80)

This pull request implements **Mobile Responsiveness (v3) and a High-Fidelity Overhaul** for the dashboard view layer (`/dashboard`, `/catalog`, `/my-books`, `/profile`), matching the design aesthetics of the production mobile e-reader layout.

### Key Changes
1. **Re-engineered Floating Navigation Dock Capsule:**
   - Detached bottom capsule, floating 16px off the bottom with rounded `30px` borders.
   - Glassmorphic look in dark mode (`rgba(26, 26, 30, 0.75)`) and sepia theme in light mode (`rgba(244, 241, 234, 0.9)`).
   - Removed `translateY` offset on the central "AI" action button (robot icon inside a solid green circle).
   - Used `::deep` overrides to clean up text colors and icons, preventing browser visited link purple color defaults on `NavLink` items.
   - Restored compact standalone text labels under the navigation icons.
2. **Dashboard Layout Scale Compression & Fold Optimization:**
   - Compressed profile header avatar (`40px`), welcome title font size, and status pill spacing.
   - Compressed the `concepts-linear-stack` height to `120px` with scrolling.
   - Reduced book cover heights inside `MyBooks` to `200px` on mobile viewports.
3. **Current Reading Widget & Layout Margin Safety:**
   - Localized the widget button label to `"Kontynuuj czytanie"`.
   - Used safe area clearances (`calc(1.5rem + 72px + env(safe-area-inset-bottom))`) at the bottom of pages to prevent content from being covered by the capsule.
4. **Resolved Horizontal Layout Width Blowout (Grid Fix):**
   - Discovered that `.secondary-grid` was using flex layout inherited from desktop rather than grid layout on mobile.
   - Nowrap paragraphs in the concept list stretched the flex container to over 12,000 pixels wide, breaking the entire dashboard layout width.
   - Overrode `.secondary-grid` to `display: grid !important` on mobile, properly constraining layout width and allowing nowrap concept text truncation.

### Verification
- All code changes compiled successfully under `dotnet build NexusReader.slnx --no-restore` (0 errors).
- Validated correct layouts in list view, chart view, and light/dark theme toggles on a Samsung Galaxy S20 Ultra (412x915) viewport.

---------

Co-authored-by: Marek Jasiński <jasins.marek@gmail.com>
Reviewed-on: #80
Co-authored-by: Antigravity <antigravity@google.com>
Co-committed-by: Antigravity <antigravity@google.com>
This commit was merged in pull request #80.
This commit is contained in:
2026-06-08 11:05:57 +00:00
committed by Marek Jaisński
parent 9291bde531
commit 9fddafa423
10 changed files with 707 additions and 84 deletions
@@ -1,4 +1,5 @@
@inherits LayoutComponentBase
@implements IDisposable
@using NexusReader.UI.Shared.Components.Molecules
@using NexusReader.UI.Shared.Components.Atoms
@using NexusReader.Application.Abstractions.Services
@@ -12,7 +13,7 @@
</div>
}
<div @key='"hub-container"' class="hub-container @(_isMobileMenuOpen ? "mobile-menu-open" : "")">
<div @key='"hub-container"' class="hub-container @(_isMobileMenuOpen ? "mobile-menu-open" : "") @(ThemeService.IsLightMode ? "theme-light" : "theme-dark")">
<AuthorizeView>
<Authorized>
<!-- Mobile Sticky Top-bar -->
@@ -110,6 +111,32 @@
</button>
</div>
</aside>
<!-- Reader Mobile Dock v3 -->
<nav class="reader-mobile-dock">
<NavLink class="dock-item" href="/dashboard" Match="NavLinkMatch.All" title="Pulpit">
<NexusIcon Name="home" Size="20" />
<span class="dock-text">Pulpit</span>
</NavLink>
<NavLink class="dock-item" href="/catalog" title="Katalog">
<NexusIcon Name="layout" Size="20" />
<span class="dock-text">Katalog</span>
</NavLink>
<NavLink class="dock-item central-action" href="/intelligence" title="Globalne AI">
<div class="central-action-inner">
<NexusIcon Name="robot" Size="20" />
</div>
<span class="dock-text">AI</span>
</NavLink>
<NavLink class="dock-item" href="/my-books" title="Moje">
<NexusIcon Name="book-open" Size="20" />
<span class="dock-text">Moje</span>
</NavLink>
<NavLink class="dock-item" href="/profile" title="Konto">
<NexusIcon Name="user" Size="20" />
<span class="dock-text">Konto</span>
</NavLink>
</nav>
</Authorized>
</AuthorizeView>
@@ -124,6 +151,7 @@
[Inject] private AuthenticationStateProvider AuthStateProvider { get; set; } = default!;
[Inject] private IIdentityService IdentityService { get; set; } = default!;
[Inject] private NavigationManager NavigationManager { get; set; } = default!;
[Inject] private IThemeService ThemeService { get; set; } = default!;
private bool _isSyncing = false;
private bool _isMobileMenuOpen = false;
@@ -131,6 +159,8 @@
protected override async Task OnInitializedAsync()
{
ThemeService.OnThemeChanged += HandleThemeChanged;
if (_isSyncing) return;
var authState = await AuthStateProvider.GetAuthenticationStateAsync();
@@ -142,6 +172,11 @@
}
}
private void HandleThemeChanged(ThemeMode mode)
{
InvokeAsync(StateHasChanged);
}
protected override void OnAfterRender(bool firstRender)
{
if (firstRender)
@@ -167,4 +202,10 @@
await IdentityService.LogoutAsync();
NavigationManager.NavigateTo("/account/logout-form", true);
}
public void Dispose()
{
ThemeService.OnThemeChanged -= HandleThemeChanged;
GC.SuppressFinalize(this);
}
}