Skip to content

K2GO-427 feat(content-manager): category headers, pinned actions, collapsible groups - #698

Merged
luisguzman-adfa merged 9 commits into
mainfrom
feat/K2GO-427-content-manager-headers-accordion
Oct 27, 2026
Merged

luisguzman-adfa merged 9 commits into
mainfrom
feat/K2GO-427-content-manager-headers-accordion

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What changes

The content manager screen now groups content more clearly:

  • Category header bands. Each per-app group (for example "Wikipedia & ZIM",
    "Courses", "Books") gets a tonal background, a teal outline, and a larger bold
    title. The category now reads as a header above its items.
  • Pinned entry actions. "Import from drive" and "Receive over Wi-Fi" move from the
    top to a fixed bar below the list, above the selection action bar (Export /
    Share / Delete). The bar stays visible. List rows never cover it.
  • Collapsible categories. A tap on a category header hides or shows its items. A
    chevron shows the state. Groups start expanded. The group checkbox still selects
    the whole group and shows its size.

Why

The category rows looked weaker than their own items, more so in dark mode. The
top buttons scrolled away on long lists.

Scope

  • ContentManagerAdapter.java: header band style; the accordion (the collapse set
    lives in the adapter; the shown rows drop a collapsed group's items).
  • fragment_k2go_content_manager.xml: the entry actions move to a pinned bottom
    bar; the status view fills the list area so the bar stays pinned during load or
    error.
  • k2go_group_header_bg.xml (new): the category header background (tonal fill plus
    teal outline). Existing color tokens only.

UI changes

  • New string k2go_cx_toggle_group = "Show or hide items" (content description of
    the collapse chevron). Parked in strings_untranslated.xml; migrate it to the 33
    locales before merge.
  • No existing user-facing text changes. Category labels and button labels keep
    their wording.
  • Light and dark verified on device.

Coordination

Based on feat/K2GO-376-share-receiver (it needs that branch's "Receive over
Wi-Fi" button). Merge that PR first. Until then this diff also shows the receiver
changes.

…rt carrier)

Pull the sender-scoped items over the hotspot and import them through the
existing flow. NetworkImportCarrier is the only sender-specific dependency (HTTP
to the sender gate, token in the X-Share-Token header, 409-staging retry,
per-connection Wi-Fi binding); stage and ingest are unchanged from the disk path.
Add ShareUrls and ShareManifestReader (pure, unit-tested), ContentReceiveFragment
(scan, fetch manifest, free-space preflight), ContentImportService.startNetwork,
and ImportCarrier.onAllDelivered (POST /complete on a clean finish). Wi-Fi join
uses the system invite QR (mirrors Clone); no new permission or dependency.
A receiver that is also hosting a hotspot owns 192.168.49.1 (the fixed
LocalOnlyHotspot AP IP, the same one the sender uses), so the kernel traps the
connection to the sender on loopback and the receiver reaches itself. Stop our
own hotspot when Receive starts and wait until the sender IP is no longer a local
interface (NetworkInterface sees p2p0; ConnectivityManager does not) before
connecting.
The receiver pulls each item over plain HTTP from the sender hotspot/Wi-Fi IP; the loopback-only policy (ADFA-4714) blocked it. Share is LAN-only and token-gated, and the ad-hoc QR pairing cannot provision HTTPS.
…efresh

Sender offers a selector when both a hotspot and a Wi-Fi address exist, so a peer on the same network pulls over Wi-Fi instead of the Wi-Fi Direct link. The QR re-renders on any network change (new DHCP IP) so it never carries a stale address.
Import has no box-prepare phase, so the export two-phase bar stayed at 0. Add a single-phase mode that fills 0..100 from the downloaded bytes.
Finish left the progress screen orphaned over the manager; show progress on its own back-stack entry so Finish pops cleanly. Also log the manifest-fetch exception that was silently swallowed.
Export/Share/Delete labels wrapped to two lines in their third-width slots; single line plus autosize (down to ~20%) keeps each on one line.
…, collapsible groups

Category group rows become tonal header bands with title-scale text so they
dominate their item cards. Import and Receive move from the top to a pinned
bottom bar, below the list and above the selection action bar, never inside
the scroll. Tapping a group header collapses or expands its items.
…dark

The tonal fill alone read too close to the item cards in dark. Add a teal
outline (the k2go_card_teal prominent-card pattern) and bold the title so the
category header clearly dominates its items in both themes. Existing tokens only.
@luisguzman-adfa luisguzman-adfa added the ui change or edit to UI label Oct 27, 2026
@luisguzman-adfa
luisguzman-adfa merged commit 6d55aac into main Oct 27, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the feat/K2GO-427-content-manager-headers-accordion branch October 27, 2026 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui change or edit to UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant