Skip to content

feat(ui): collapse the home navigation bar at the top of the feed - #813

Merged
QuantumExplorer merged 6 commits into
swift-sdk-integrationfrom
feat/home-collapsing-navbar
Jul 16, 2026
Merged

feat(ui): collapse the home navigation bar at the top of the feed#813
QuantumExplorer merged 6 commits into
swift-sdk-integrationfrom
feat/home-collapsing-navbar

Conversation

@QuantumExplorer

Copy link
Copy Markdown
Member

What

At the top of the home feed the navigation bar is now hidden completely, giving the balance header the bar's full height and fixing the clipped "Syncing Balance" shimmer. Once the user scrolls down past 100pt, the bar (Dash logo + avatar + notification bell) slides in; scrolling back under 60pt hides it again (two thresholds = hysteresis, no flicker at the boundary).

Mechanics:

  • A zero-height scroll sentinel in HomeViewContent's ScrollView reports its offset via a PreferenceKey in a named coordinate space.
  • HomeViewController tracks the scroll-derived state, calls setNavigationBarHidden live while it is the top view controller, and exposes the state via NavigationBarDisplayable.isNavigationBarHidden — so BaseNavigationController's existing willShow pass keeps pushed screens' bars visible and restores the correct home state on pop.
  • viewWillAppear also applies the state directly, covering first display and non-BaseNavigationController hosts.

Verification

🤖 Generated with Claude Code

QuantumExplorer and others added 5 commits July 16, 2026 12:42
…home

The home header showed only the transparent balance as the hero, with
platform and shielded amounts squeezed into two label-less columns —
full 9-decimal precision, no fiat, no way to move funds between them.

Now the hero is the COMBINED total (transparent + platform + shielded,
rendered by the existing DashAmount component and its Dash-Đ glyph) with
its fiat value, above a breakdown card with one row per balance: icon,
name, fiat value, Đ amount, and two circular transfer buttons mapping
onto the routes the app supports:
- Transparent: in = Receive, out = Send (existing shortcut actions);
- Platform:    in = Shielded → Platform, out = Platform → Shielded;
- Shielded:    in = Transparent → Shielded, out = Shielded → Transparent.

The buttons push InternalTransferHostingController through a new
init(direction:source:) (user can still flip the route on-screen) via a
new HomeViewDelegate method. PlatformBalanceView is deleted — the
breakdown card supersedes it. Tap-to-hide, the syncing shimmer, and the
long-press currency picker behave as before; the breakdown hides with
the hidden-balance state and (as before) while BLAST isn't running.

Verified on a funded testnet QA simulator: totals sum correctly, rows
show fiat + Đ amounts, all six buttons expose 44pt accessibility
targets, and Shielded-in opens Internal transfer prefilled
Dash Wallet → Shielded.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A push dragged the blue navigation header along; the sheet keeps the
transfer form on its own background with a grabber and swipe-to-dismiss.
The flow's Done now dismisses when presented modally and still pops when
pushed (readiness / payments-landing entries keep their push).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pushed presentations get their top spacing from the navigation bar; the
sheet has no bar, so the title crowded the sheet edge. 28pt inset when
presented modally, unchanged when pushed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
At the top of the home feed the navigation bar is hidden entirely, so
the balance header gets its full height (this also un-clips the
"Syncing Balance" shimmer, which sat under the bar). Scrolling down
past 100pt slides the bar (Dash logo + avatar) in; returning under
60pt hides it again — the two thresholds are hysteresis so the bar
doesn't flicker on the boundary.

Mechanics: a zero-height scroll sentinel feeds a PreferenceKey in the
home ScrollView's coordinate space; HomeViewController tracks the
state, applies it live while it is the top view controller, and
reports it through NavigationBarDisplayable.isNavigationBarHidden so
BaseNavigationController keeps pushes/pops consistent (pushed screens
show their bar; popping back restores the scroll-derived state).
viewWillAppear applies the state directly as well for first display
and non-Base hosts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b9ce080c-c7f5-4913-9048-7337518a0f54

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/home-collapsing-navbar

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The zero-height sentinel sat as a sibling between the blue overscroll
block and the content stack, so the ScrollView's implicit spacing opened
a light hairline across the header. As a .background of the content
stack it contributes no layout; same offset signal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@QuantumExplorer
QuantumExplorer merged commit d7bc7d7 into swift-sdk-integration Jul 16, 2026
2 checks passed
romchornyi pushed a commit that referenced this pull request Aug 3, 2026
…-11)

The DashPay profile entry point lived only on the UIKit navigation bar's
avatar, which #813 made scroll-gated: hidden at the top of the feed and
revealed past `kTopBarShowThreshold`. On a feed shorter than the viewport that
threshold can never be crossed, so the avatar — and with it the only way into
"my profile" — was unreachable.

Move the bar into the balance header, which is always on screen at the top of
Home: `DashUIKit.NavigationBar` with the username row leading, the Dash
wordmark central and the notifications bell trailing. `HomeUsernameRow` reuses
`ContactAvatarView` and the existing `profileAction()` target, so there is one
source of truth for opening the profile rather than a second tap path.

`HomeView` measures scrollable-content height against the ScrollView's own
viewport (`HomeContentHeightKey` / `HomeViewportHeightKey`) and keeps the old
UIKit bar shown when the feed is too short to scroll the threshold, so the
existing reveal gesture cannot strand it either. A zero viewport height means
the first layout pass has not reported yet — it waits for a real measurement
instead of flashing the bar on a feed that is long enough.

The bell's unread state and the username/avatar are read from the same
app-owned identity and contacts snapshots the UIKit bar uses, refreshed on
`DWDashPayRegistrationStatusUpdated` and the contacts snapshot notification so
a new username or incoming request lands without leaving Home.

All of it is `#if DASHPAY`; the non-DashPay build compiles the bar out.

Not verified by a build: the SwiftDashSDK package in ../platform is on a
feature branch and does not compile, so the app target was never reached.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@QuantumExplorer
QuantumExplorer deleted the feat/home-collapsing-navbar branch August 7, 2026 08:23
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.

1 participant