Skip to content

Migrate timeline chrome to Lui_element_combine.buttons - #28

Merged
RCmerci merged 4 commits into
mainfrom
devin/1790503207-buttons-migration
Sep 27, 2026
Merged

RCmerci merged 4 commits into
mainfrom
devin/1790503207-buttons-migration

Conversation

@RCmerci

@RCmerci RCmerci commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates the timeline page's remaining toolbar surfaces to the V.buttons glass-capsule composite, on lui 0c93a00 (logseq/lui#64) which adds a Menu action variant:

  • buttons_action is now a variant — Press of {label; icon; text; on_press} | Menu of {label; icon; text; menu : Lui_elements.t list; on_dismiss}. V.buttons maps both onto the lui-level Lui_element_combine.action variants. V.buttons_action retains the old (label, icon, text, handler) signature so existing press callers are unchanged.
  • New V.buttons_menu_action ~label ~icon ?text ~on_select entries builds a Menu action from the existing V.Menu.entry vocabulary (ids/roles/dividers/submenus preserved); Menu.entry_elements/to_elements were hoisted so Menu.create and the buttons wrapper share the same entry conversion.
  • app/journal_header.ml: the top-right Account menu moves from V.Menu.create (which produced a chevron-down system row) to buttons_menu_action — a single-member glass capsule whose menu_trigger hosts the same five account actions. The destinations pair (Journals/Favorites) collapses from a V.Toolbar.group of two V.buttons into one V.buttons Press capsule.
  • Behavior change: the destinations capsule no longer carries per-item selected state (the selected binding and navigation helper are deleted) — the pressed item navigates, and the destination itself is conveyed by the page content, matching how other buttons behave.
  • logseq_journal.opam (+.locked) pin lui to 0c93a0000b1…; test/source_boundary_test.ml updated for the new pin and the header's new required symbols (V.buttons, V.buttons_menu_action in place of V.button/V.Menu.create).

Known preexisting failure on main (unchanged by this PR): source_boundary_test also requires "V.progress" in app/journal_timeline.ml, which has been absent since commit 316b159 removed it — the test fails on main too.

Depends on logseq/lui#64 — the pin should be repointed to that PR's merge commit once it lands.

Link to Devin session: https://app.devin.ai/sessions/3bce435625ba4bc086c09520e0920db5
Open in Devin Desktop: https://app.devin.ai/desktop/session/3bce435625ba4bc086c09520e0920db5?variant=devin
Requested by: @RCmerci

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration

Copy link
Copy Markdown
Contributor

iOS sim verification — timeline chrome migrated to Lui_element_combine.buttons ✅

Verified on iPhone 17 sim (iOS 27.0), signed in, ocaml-sync-test graph, timeline loaded:

Timeline chrome — fused destinations + capture + account capsules
Account capsule opens native menu
Diagnostics sheet fires from menu item
Composer from capture capsule

  • Fused Journals+Favorites capsule navigates both directions; off-glyph taps inside a cell work (44pt hit area)
  • Account capsule → native menu with Attachment settings / Diagnostics / Switch graph / Delete local graph copy / Sign out; "Diagnostics" opens the diagnostics sheet
  • Capture capsule opens the composer; sheet/menu presentations dismiss cleanly

Caveat: taps within ~4pt of the capsule's rounded extremity can fall outside the cell — consistent with frame-based hit-testing, not a regression.

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review September 27, 2026 10:11
@devin-ai-integration

Copy link
Copy Markdown
Contributor

Fused error+account capsule (053fea9) verified under real error state ✅

The two top-right controls were previously separate chrome slots each hosting its own V.buttons → two capsules. They now compose into one V.buttons cluster (error ! leads, account menu trails) mounted in the account slot; the error slot is only used when no account action exists.

Induced a live sync failure on the iOS sim (api.logseq.io blackholed via /etc/hosts — sims have no Airplane Mode):

Fused error+account capsule — single pill, no double-glass
Error half opens error-info sheet showing the real failure
Person half opens the account menu

  • ! half → error-info sheet with "TLS connection setup failed"
  • Person half → account menu opens (4 items; "Delete local graph copy" correctly hidden while local_deletion_available is false)
  • Single glass capsule, no double ring; account-only case (no error) verified separately — bottom-bar capsules unaffected

The .bottomBar toolbar reserves container safe-area space, so the
FloatingChrome GeometryReader (and the list inside it) was inset above
the bar region and the band showed the opaque window background.

Hide the bottomBar toolbar background and let the content extend under
it so the bottom capsules float over scrollable content, matching the
floating top-right controls.
@RCmerci
RCmerci merged commit d4fbe23 into main Sep 27, 2026
1 check passed
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