Repository navigation
ADFA-5236 fix(connect/clone): always show the manual access (no reveal toggle) - #464
Merged
luisguzman-adfa merged 12 commits intoAug 25, 2026
Merged
Conversation
… reveal toggle
Many phones have no QR scanner and offline users can't fetch one, so the hotspot
Wi-Fi + password and the library URL must be visible without a tap. QrSection now
shows the fallback block ALWAYS (removed the "Scan didn't work?/Hide" toggle,
fbOpen, applyFallbackOpen) and monospaces the values so digits vs letters can't be
misread (0/O, 1/l). Captions carry the intent ("... or use the following
credentials instead:" / "Scan to open the library or visit this website:"), the
Wi-Fi "same Wi-Fi" subcaption is dropped, and the "Available while the app is
open." Connect footer is hidden. Strings updated in EN + ES (other locales later).
…autosize) The always-shown value wrapped at TitleLarge when the URL/IP was long (http://192.168.1.159:8085 -> two lines). Autosize each value uniformly (12-22sp, maxLines 1) with match_parent width, so a long URL shrinks to fit the card on one line while short values keep the full size.
Per the proposed mockup: each fallback value sits in its own rounded
surface-container "field" chip. Credential strings ("Wi-Fi: x" / "Password: y")
split on the first ": " into a muted label + a mono value; a URL (no ": ")
renders as a lone mono value. Values keep the one-line autosize (12-22sp). Chip
fill from colorSurfaceContainerHighest (M3, day/night), label k2go_muted, value
k2go_ink. No new strings, no caller/signature change.
…ouble bg) Now that each value is its own chip, the sec_fallback container's k2go_card_bg + padding sat behind the chips as a second background. Make the container a transparent stacker (no bg, no padding) so only the chip shows.
…double bg) The previous fix only touched the shared view_k2go_qr_section (used by Clone). Connect has its own containers in fragment_k2go_connect.xml (k2go_conn_fallback1/2/S) which still carried k2go_card_bg + padding behind the per-value chip. Removed it on all three so only the chip shows.
Per the v1 spec: Copy in a reserved TRAILING slot (never floating over the value) -- icon-only for the short Wi-Fi/password chips, word+icon "Copy" for the long URL/IP; the whole chip is also tappable to copy. Copies the FULL value and confirms with a "Copied" snackbar (SnackbarDuration.millisForText). No Share on chips (that stays on the Clone payload only). Adds ic_content_copy (tinted teal) and k2go_copied (EN + ES; English placeholder in the other 32 locales pending a translation pass).
…toggle) The Send code payload no longer hides behind "Show the code as text ▸ / Hide"; it shows always under a fixed label "Show the code as text:", with Copy + Share kept at the bottom of the block (Share belongs only on the payload). Repurposes showcode as a static muted label, drops codeExpanded. String updated EN + ES.
… for the IP) The word+icon "Copy" on the URL chip stole width and capped the IP autosize. Drop it; the URL uses the same trailing icon-only Copy as the Wi-Fi/password chips, so a long http://<ip>:8085 keeps the full one-line size. Removed the now unused copyWordButton.
…/ADFA-5236-manual-address-always-visible ADFA-5236 chore(i18n): resolve strings_k2go merge (union) + retranslate reworded strings Merge main into fix/ADFA-5236-manual-address-always-visible. All 34 strings_k2go.xml conflicted — both sides appended new <string>s at the end of <resources>; resolved as union (keep ADFA-5236 k2go_copied and main's k2go_eta_*). Translation repair (ADFA-5236): the 5 reworded strings + k2go_copied were stale/English across 32 locales; retranslated to the new English. es kept (human), sr fixed to Cyrillic. Machine translations pending native-speaker review for bn, gu, ta, sw, az, yo, sr.
…r scanning QR frames 220dp -> 242dp across Connect (join/open/Wi-Fi) and Clone. Already ISO/IEC 18004-compliant (4-module quiet zone, ECC level L = largest modules), so the code was optimal; the +10% just gives weaker guest cameras a bit more to read. Quiet zone and ECC untouched; both screens are in a ScrollView and the bitmap encodes at view size, so no layout break and no pixelation.
…easier scanning QR size moves from a fixed 220dp to @dimen/k2go_qr_size, bucketed by smallest-width: 250dp default (small/old phones) -> 288dp (sw360) -> 308dp (sw400) -> 320dp cap (sw600, tablets). Bigger modules help weak guest cameras; sw = shortest side, so it also bounds landscape/tablets. ISO/IEC 18004 quiet zone + ECC L are baked into the bitmap and scale with it, so decoding/contrast are unchanged.
The QR bitmap was encoded at a fixed size (200dp in QrSection, 500px in CloneFragment) while the frame scales via @dimen/k2go_qr_size, so larger buckets upscaled a small bitmap and softened the modules — the opposite of the goal. Encode from the same dimen (getDimensionPixelSize) so size and resolution share one source of truth and stay sharp per bucket. Also nudge the default 250->252dp onto the 4dp grid.
luisguzman-adfa
deleted the
fix/ADFA-5236-manual-address-always-visible
branch
August 25, 2026 20:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADFA-5236 — Connect/Clone: always show the manual access (no reveal toggle)
Many phones have no QR scanner and offline users can't fetch one, so the manual access — hotspot Wi-Fi + password, or the library URL — must be readable without a tap. This PR makes that block always visible, cleans up its presentation, and then improves QR scannability for weak cameras.
Manual access, always visible. QrSection now shows the fallback block ALWAYS — the "Scan didn't work?/Hide" reveal toggle and its fbOpen/applyFallbackOpen logic are gone. Values render as rounded key:value chips: a muted label over a monospaced value (split on the first ": "), or a lone monospaced value for the URL. Monospace keeps digits vs letters unambiguous (0/O, 1/l). Each chip carries an icon-only Copy in a reserved trailing slot (icon-only so a long URL/IP keeps its width via autosize) and the whole chip is tappable; Share is not here. Captions carry the intent ("… or use the following credentials instead:" / "Scan to open the library or visit this website:"), the Wi-Fi "same Wi-Fi" subcaption is dropped, and the fallback block's duplicate background is removed on both screens.
QR scannability. Design asked for more white space around the QR; we went with the levers that actually help weak cameras on low-end phones. The code is already optimal on the standard (black-on-white regardless of theme, ISO/IEC 18004 four-module quiet zone, ECC level L = largest modules), and extra white beyond the quiet zone gives no decode benefit — inside a fixed card it only shrinks the code and glares in dark mode — so that request was declined, with reason. Instead: (1) QR size scales with the screen via @dimen/k2go_qr_size, bucketed by smallest-width — 252dp default → 288 (sw360) → 308 (sw400) → 320 cap (sw600); sw = shortest side, so it also bounds landscape/tablets; applies to all five QR surfaces. (2) The bitmap is encoded at that rendered size (one source of truth), so it stays sharp per bucket instead of upscaling a fixed bitmap and softening the modules.
Out of scope, recorded. Shortening the Clone payload (denser QR — separate chore, touches the handshake); a border/affordance card (only ever outside the quiet zone — declined: risk without decode gain); physical aids (screen brightness while a QR is shown, keeping the chat FAB off the code).
Localization. Strings updated across all locales — EN and ES by hand, the rest machine-translated and flagged for native review (bn, gu, ta, sw, az, yo, sr).