Skip to content

ADFA-5157 refactor(clone,connect): extract the QrSection holder into … - #413

Merged
luisguzman-adfa merged 1 commit into
mainfrom
fix/ADFA-5157-extract-qr-section
Aug 15, 2026
Merged

luisguzman-adfa merged 1 commit into
mainfrom
fix/ADFA-5157-extract-qr-section

Conversation

@luisguzman-adfa

@luisguzman-adfa luisguzman-adfa commented Aug 15, 2026 •

Copy link
Copy Markdown
Collaborator

ADFA-5157 — extract QrSection as a shared class

Enabler for the Clone (Send) half of ADFA-5154. Java-only refactor; the layout is untouched,
so there is no visual change.

What changed

ADFA-5154's Connect PR built the QR "section" — the slot (frame + code + placeholder),
caption/subcaption, and the reveal-on-tap fallback — as a private Section holder inside
ConnectFragment, with setQr / setFallback / applyFallbackOpen beside it. The Clone
redesign needs the same section, so it moves to a shared public QrSection:

  • QrSection holds the views + reveal state (fbOpen) and carries setQr(ctx, …) /
    setFallback(ctx, …) as methods. It holds no Context — the two methods that need one take it
    as a parameter — so it can be built in onCreateView and driven from anywhere.
  • ConnectFragment uses it for its three sections (Join / Open / single); the private class and
    the three helpers are gone, dead imports dropped (~80 fewer lines).

Deliberately not here

The shared section card layout is not extracted yet. Clone's sections differ (Wi-Fi Join has
no QR; Get-app carries the amber banner), so the common markup is extracted during the Clone
redesign, with both shapes concrete — not guessed now. The reusable logic (this class) is what
has identical needs across both, so it is what gets shared first.

Verification

Connect is unchanged — verify by screenshot: Hotspot two-section (top + scrolled), Wi-Fi single,
and the no-system Recover state. The layout is untouched, so the bar is "no visible difference".
No behavior change, no new strings.

…a shared class

ADFA-5154's Connect PR built the QR "section" — the slot (frame + code + placeholder),
caption/subcaption, and the reveal-on-tap fallback — as a private Section holder inside
ConnectFragment, with setQr / setFallback / applyFallbackOpen helpers beside it. The Clone
(Send) redesign needs the same section, so it moves to a shared public QrSection class
rather than being copied into a second fragment.

QrSection holds the views + the reveal state (fbOpen) and carries setQr(ctx, ...) /
setFallback(ctx, ...) as methods; it holds no Context, taking one where needed.
ConnectFragment uses it for its three sections; the private class and the three helpers
are gone, dead imports dropped (~80 fewer lines). The layout is untouched, so there is no
visual change — a Java-only refactor.

The shared section CARD layout is deliberately not extracted yet: Clone's sections differ
(Wi-Fi Join has no QR; Get-app carries the amber banner), so the common markup is extracted
during the Clone redesign, with both shapes concrete, rather than guessed now.
@luisguzman-adfa
luisguzman-adfa merged commit ca8c39d into main Aug 15, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/ADFA-5157-extract-qr-section branch August 15, 2026 09:15
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