Skip to content

Second responsive pass: fix ProjectDetailView + refactor grids to in-place mutation#774

Merged
dangershony merged 7 commits intomainfrom
second-responsive-pass
Apr 22, 2026
Merged

Second responsive pass: fix ProjectDetailView + refactor grids to in-place mutation#774
dangershony merged 7 commits intomainfrom
second-responsive-pass

Conversation

@Zazawowow
Copy link
Copy Markdown
Collaborator

@Zazawowow Zazawowow commented Apr 21, 2026

Summary

  • Fixes ProjectDetailView not collapsing to single-column on resize — root cause was missing x:Name attributes (TopSectionGrid, StatsGrid, InvestInfoGrid, FundInfoGrid, SubInfoGrid, StatCard0-2, TopLeftCard, TopRightCard, StickyNavBar, ProjectNamePill, ContentStack, NavSpacer) so FindControl returned null and ApplyResponsiveLayout silently did nothing.
  • Refactors every responsive grid (ProjectDetailView, InvestPageView, FundsView) from the banned ColumnDefinitions.Clear() + Add() pattern to SIGABRT-safe in-place Width = GridLength(...) mutation, with pre-declared RowDefinitions in XAML to support compact stacked rows.
  • Adds responsive layout to InvestmentDetailView, SettingsView, and InvestPageView (mobile header stats, mobile submit button, SubmitOpacity computed property for Border :disabled workaround).
  • Unifies SendFundsModal sizing to MinWidth=320 MaxWidth=1030 MaxHeight=720 Margin=16 to match the other overlays.

Test plan

  • Desktop: drag-resize window from ≥1024px down to <768px and back — verify ProjectDetail stats stack vertically and nav bar hides/reveals
  • Desktop: same resize test for InvestPage (3-col grid → stacked) and FundsView (stats grid → stacked)
  • Android APK: sideload io.angor.app-Signed.apk and spot-check project detail, invest, funds pages render in mobile layout
  • Verify SendFundsModal sizing matches WalletDetailModal / CreateWalletModal / ReceiveFundsModal / ShareModal on desktop and mobile

Dorian and others added 7 commits April 21, 2026 11:58
… mutation

ProjectDetailView: add missing x:Names (StickyNavBar, ProjectNamePill,
ContentStack, NavSpacer, TopSectionGrid, TopLeftCard, TopRightCard,
StatsGrid, StatCard0-2, InvestInfoGrid, FundInfoGrid, SubInfoGrid) so
FindControl resolves them at runtime. Refactor ApplyResponsiveLayout
from banned Clear()+Add() pattern to in-place Width = GridLength(...)
mutation with pre-declared RowDefinitions in XAML. Fixes stats cards
that stayed in 3-column layout on window resize.

InvestmentDetailView, InvestPageView, FundsView: port responsive
layout sections (NavBar, ProgressSteps, stats grids, info grids,
mobile submit button) using the same in-place mutation pattern.

SettingsView: port responsive layout logic.
SendFundsModal: unify modal sizing to MinWidth=320 MaxWidth=1030
MaxHeight=720 Margin=16 to match other overlays.

InvestPageViewModel: add SubmitOpacity computed property so the
submit button dims via Opacity binding when !CanSubmit (works around
Border :disabled pseudo-class limitations).
Border:disabled pseudo-class was unreliable; use [IsEnabled=False]
attribute selector instead, applied to both desktop and mobile submit
buttons. Drop the subscription pattern1 auto-select so the CTA stays
disabled until the user picks a plan (matches Fund/Invest paths).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add a second grid row and move the action-button StackPanel into it when
LayoutModeService.IsCompact so buttons don't get clipped on phone widths.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
On Release Android, managed code was running via the Mono interpreter/JIT
because RunAOTCompilation was off — the single biggest cause of the
desktop-vs-mobile perf gap for top-level navigation and first-frame layout.
Flip RunAOTCompilation=true with AndroidEnableProfiledAot=true so only the
hot paths are AOTed, limiting APK size growth.

Bump Avalonia to 11.3.14 to pick up the virtualization ghost-item fixes
(#20700, #20784, #20870), VSP buffer cache (#18646), glyph cache rewrite
(#17727), layout perf (#18315), effect render perf (#20191) and the
Android duplicated-pointer-event fix (#19440). Patch-level only, no
breaking changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
.NET Android rejects RunAOTCompilation=true unless PublishTrimmed=true
(error XA1030). TrimMode=partial only trims assemblies explicitly
marked [IsTrimmable]=true — Avalonia and the BCL are annotated,
Angor.Sdk and other third-party packages are not, so reflection paths
there stay intact. APK size went from ~28.5 MB → 27.7 MB despite adding
AOT because partial trim offsets the AOT code bloat.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@dangershony dangershony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good I just need to test

@dangershony dangershony merged commit c19cd35 into main Apr 22, 2026
3 checks passed
@dangershony dangershony deleted the second-responsive-pass branch April 22, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants