Show app movement controls only while editing

This commit is contained in:
waozi committed 2026-10-22 02:01:51 -03:00
1 parent 5e439147a8
commit 47c46837ca
23 files changed
+170 -38

No files matched your search

+3 -2
View File
@@ -4,7 +4,8 @@
- Connecting an account starts sync automatically, and existing connections recover a missing node address.
- Sync startup failures show their cause and retry correctly instead of remaining queued.
- Move apps only by their handles, including apps not downloaded yet; dragging a row scrolls the list.
- Move apps by their handles in Edit apps, including apps not downloaded yet; dragging a row scrolls the list.
- Open main settings from Apps’ top-right corner instead of a separate Settings app.
- Lists and Leaderboard come preinstalled, the app list uses a simple divider, and every row stays clear of navigation.
- Account IDs use the first and last four characters, and Account has one heading.
- Downloads keep transferring while package installation waits for scrolling and dragging to finish.
@@ -12,7 +13,7 @@
- Open a friend to view and copy their full public ID.
- Account shows one current sync status, and local database size is distinguished from node storage.
- Switch Apps between a scrollable list and a grid; your chosen view is remembered.
- Move apps with their drag handles, and pin Profile and Settings alongside your other apps.
- Pin Profile alongside your other apps.
- Apps opens faster when first showing your apps.
- Arcade switches to newly installed game updates without keeping an older campaign open.
- Shovey's own Back button returns to its game chooser.
@@ -1,6 +1,7 @@
- Connecting an account starts sync automatically, and existing connections recover a missing node address.
- Sync startup failures show their cause and retry correctly instead of remaining queued.
- Move apps only by their handles, including apps not downloaded yet; dragging a row scrolls the list.
- Move apps by their handles in Edit apps, including apps not downloaded yet; dragging a row scrolls the list.
- Open main settings from Apps’ top-right corner instead of a separate Settings app.
- Lists and Leaderboard come preinstalled, the app list uses a simple divider, and every row stays clear of navigation.
- Account IDs use the first and last four characters, and Account has one heading.
- Downloads keep transferring while package installation waits for scrolling and dragging to finish.
@@ -8,7 +9,7 @@
- Open a friend to view and copy their full public ID.
- Account shows one current sync status, and local database size is distinguished from node storage.
- Switch Apps between a scrollable list and a grid; your chosen view is remembered.
- Move apps with their drag handles, and pin Profile and Settings alongside your other apps.
- Pin Profile alongside your other apps.
- Apps opens faster when first showing your apps.
- Arcade switches to newly installed game updates without keeping an older campaign open.
- Shovey's own Back button returns to its game chooser.
+4
View File
@@ -7462,3 +7462,7 @@ Povolit
[package_updates_decline]
Nepovolit
---
[launcher_edit_apps]
Upravit aplikace
---
+4
View File
@@ -7456,3 +7456,7 @@ Erlauben
[package_updates_decline]
Nicht erlauben
---
[launcher_edit_apps]
Apps bearbeiten
---
+4
View File
@@ -7480,3 +7480,7 @@ Allow
[package_updates_decline]
Don't allow
---
[launcher_edit_apps]
Edit apps
---
+4
View File
@@ -7456,3 +7456,7 @@ Permitir
[package_updates_decline]
No permitir
---
[launcher_edit_apps]
Editar apps
---
+4
View File
@@ -7444,3 +7444,7 @@ Autoriser
[package_updates_decline]
Ne pas autoriser
---
[launcher_edit_apps]
Modifier les apps
---
+4
View File
@@ -7445,3 +7445,7 @@ Izinkan
[package_updates_decline]
Jangan izinkan
---
[launcher_edit_apps]
Edit aplikasi
---
+4
View File
@@ -7445,3 +7445,7 @@ Consenti
[package_updates_decline]
Non consentire
---
[launcher_edit_apps]
Modifica app
---
+4
View File
@@ -7441,3 +7441,7 @@ Lumi や日記など、Inner Breeze 内のアプリを waozi.xyz から自動で
[package_updates_decline]
許可しない
---
[launcher_edit_apps]
アプリを編集
---
+4
View File
@@ -7451,3 +7451,7 @@ Lumi, 일기 등 Inner Breeze 안의 앱을 waozi.xyz에서 자동으로 업데
[package_updates_decline]
허용 안 함
---
[launcher_edit_apps]
앱 편집
---
+4
View File
@@ -7454,3 +7454,7 @@ Permitir
[package_updates_decline]
Não permitir
---
[launcher_edit_apps]
Editar apps
---
+4
View File
@@ -7450,3 +7450,7 @@ Inner Breeze обновлён до версии %s.
[package_updates_decline]
Не разрешать
---
[launcher_edit_apps]
Изменить приложения
---
+4
View File
@@ -7456,3 +7456,7 @@ Inner Breeze 已更新至 %s 版本。
[package_updates_decline]
不允许
---
[launcher_edit_apps]
编辑应用
---
+31 -7
View File
@@ -88,12 +88,12 @@ app_launcher_update_drag :: (app: *InnerBreeze, point: Vector2) {
// click and scroll gestures, even after another app has been moved.
app_launcher_drag_handle :: (app: *InnerBreeze, card: ButtonProps,
route: s32, vertical: bool) {
if !app.launcher_editing { return }
key := card.key
previous := TreePrevious(app.ui.session, TreeCurrentParent(app.ui.session),
key, WidgetKindButton)
drag := TreeTakeDragAt(app.ui.session, previous)
if drag.started {
app.launcher_editing = true
app.launcher_drag_key = key
app.launcher_drag_route = route
unused AppCopyText(LauncherLibraryName(route), app.launcher_drag_name[:])
@@ -203,13 +203,11 @@ app_draw_launcher :: (app: *InnerBreeze) {
}
}
if !found {
app.launcher_editing = false
app.launcher_drag_key = 0
app.launcher_drag_moving = false
}
}
if !pointer.down && !pointer.released {
app.launcher_editing = false
app.launcher_drag_key = 0
app.launcher_drag_moving = false
} else {
@@ -239,8 +237,36 @@ app_draw_launcher :: (app: *InnerBreeze) {
Text(app.ui.session, TextProps.{.text = LocaleText("launcher_title"),
.font = AppScale(28), .wrap = cast(TextWrap)TextWrapNone,
.bounds = Rectangle.{cast(float32)x, cast(float32)title_y,
cast(float32)width, cast(float32)AppScale(40)},
cast(float32)(width - AppScale(156)), cast(float32)AppScale(40)},
.class_name = KssClassId(KssMakeName("launcher-title"))})
edit: ButtonProps
edit.key = KeyHash("inbe/apps/edit")
edit.label = LocaleText(ifx app.launcher_editing then "done_button" else "launcher_edit_apps")
edit.fit_content = true
edit.selected = app.launcher_editing
edit.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft
edit.bounds = Rectangle.{cast(float32)(x + width - AppScale(148)),
cast(float32)title_y, cast(float32)AppScale(96), cast(float32)AppScale(44)}
if Button(app.ui.session, edit) != 0 {
app.launcher_editing = !app.launcher_editing
app.launcher_drag_key = 0
app.launcher_drag_moving = false
app_block_current_click(app)
}
settings: ButtonProps
settings.key = KeyHash("inbe/apps/settings")
settings.label = LocaleText("settings_title")
settings.icon_shape = app_nav_route_own_shape(APP_NAV_ROUTE_SETTINGS)
settings.icon_only = true
settings.emphasis = cast(ButtonEmphasis)ButtonEmphasisGhost
settings.bounds = Rectangle.{cast(float32)(x + width - AppScale(44)),
cast(float32)title_y, cast(float32)AppScale(44), cast(float32)AppScale(44)}
if Button(app.ui.session, settings) != 0 {
app_launcher_close(app)
app_apply_nav_route(app, APP_NAV_ROUTE_SETTINGS)
unused End(app.ui.session)
return
}
search_y := title_y + AppScale(56)
typed: [128]u8
field: TextFieldProps
@@ -294,7 +320,7 @@ app_draw_launcher :: (app: *InnerBreeze) {
}
query := AppTextFromCString(*app.launcher_search[0], 128)
routes := LauncherRoutes()
canonical: [LAUNCHER_APP_COUNT]string = .{"Diary", "Habits", "Lists", "Lumi", "Practice", "Leaderboard", "Profile", "Settings",
canonical: [LAUNCHER_APP_COUNT]string = .{"Diary", "Habits", "Lists", "Lumi", "Practice", "Leaderboard", "Profile",
"", "", "", "", "", "", "", ""}
matches: [LAUNCHER_APP_COUNT]s32
match_count: s32 = 0
@@ -468,7 +494,6 @@ app_draw_launcher :: (app: *InnerBreeze) {
target = GridIndexAt(more_cells, point.x, point.y, tile_height, more_count)
LauncherLibraryMove(app, more[:more_count], app.launcher_drag_route, target)
}
app.launcher_editing = false
app.launcher_drag_key = 0
app.launcher_drag_moving = false
app_block_current_click(app)
@@ -510,7 +535,6 @@ app_draw_launcher :: (app: *InnerBreeze) {
unused Button(app.ui.session, preview)
}
} else if app.launcher_drag_released {
app.launcher_editing = false
app.launcher_drag_key = 0
}
unused End(app.ui.session)
+3 -4
View File
@@ -79,7 +79,7 @@ launcher_app_revisions: [2]s64;
launcher_app_button_codec: WidgetButtonPropsCodec;
LauncherAppPackage :: (route: s32) -> s32 {
if route == APP_NAV_ROUTE_PROFILE || route == APP_NAV_ROUTE_SETTINGS { return -1 }
if route == APP_NAV_ROUTE_PROFILE { return -1 }
slot := AppNavNodeSlot(route)
if slot >= 0 { return NodeAppIndex(slot) }
bit := app_nav_route_bit(route)
@@ -91,7 +91,6 @@ LauncherAppPackage :: (route: s32) -> s32 {
LauncherAppID :: (route: s32) -> string {
if route == APP_NAV_ROUTE_PROFILE { return "inbe.profile" }
if route == APP_NAV_ROUTE_SETTINGS { return "inbe.settings" }
return PackageID(LauncherAppPackage(route))
}
@@ -343,7 +342,7 @@ LauncherAppCatalogEntry :: (group: *LauncherAppGroup, bytes: *Vec(u8), route: s3
entry.package = LauncherAppPackage(route)
title := app_nav_route_label(route)
shape := app_nav_route_shape(route)
builtin := route == APP_NAV_ROUTE_PROFILE || route == APP_NAV_ROUTE_SETTINGS
builtin := route == APP_NAV_ROUTE_PROFILE
installed := route >= 0 && (builtin || (group.owner.enabled_apps & app_nav_route_bit(route)) != 0 ||
AppNavNodeSlot(route) >= 0)
// An app from the node is on this device once its package is; until
@@ -425,7 +424,7 @@ LauncherAppCatalogEntry :: (group: *LauncherAppGroup, bytes: *Vec(u8), route: s3
BuilderPrint(bytes, ",\"seen\"")
}
BuilderPrint(bytes, "]")
BuilderPrint(bytes, ",\"reorderable\":true")
BuilderPrint(bytes, ",\"reorderable\":%", ifx group.owner.launcher_editing then "true" else "false")
if !on_device {
BuilderPrint(bytes, ",\"on_device\":false")
if downloading { BuilderPrint(bytes, ",\"downloading\":true") }
+21
View File
@@ -182,6 +182,27 @@ app_profile_record_sync :: (start: float64) {
record(start, ProfileSync)
}
// Name a slow background stage without account IDs, requests or content.
app_profile_work_end :: (start: float64, stage: string) {
if !enabled() || start <= 0.0 { return }
elapsed := (ProfileClock() - start) * 1000.0
if elapsed < 50.0 { return }
line: [192]u8
used: s32 = 0
if !ProfileAppend(line[:], *used, "WORK: ") ||
!ProfileAppend(line[:], *used, stage) ||
!ProfileAppend(line[:], *used, " ms=") ||
!ProfileAppendNumber(line[:], *used, cast(u64)elapsed) { return }
#if #defined(ANDROID_DEBUG) {
tag: [32]u8
if CopyCString("InbePerformance", tag[:]) {
unused ProfileLogAndroid(4, *tag[0], *line[0])
}
} else {
ProfileLogInfo(*line[0])
}
}
#program_export
app_profile_frame_end :: (start: float64) {
if !enabled() || start <= 0.0 { return }
+8 -1
View File
@@ -12,6 +12,7 @@ LOG_INFO :: 3
LOG_WARNING :: 4
LOG_ERROR :: 5
#import "raylib_trace"
#import, file "../platform/trace_log.zi";
SyncLog :: (level: s32, message: string) {
TraceLog(level, message)
}
@@ -219,6 +220,7 @@ app_sync_start_failed :: (result: s32) {
g_sync.sync_running = 0
g_sync.retry_requested = false
app_sync_record_result(ifx result == SYNC_OK then SYNC_REQUEST_FAILED else result)
TraceLogResult(LOG_WARNING, "SYNC: could not start, result=%d", result)
}
#program_export
@@ -714,7 +716,12 @@ app_collect_finished_sync :: () {
g_sync.data_refresh_pending = 1
}
} else {
SyncLog(LOG_WARNING, "SYNC: background sync failed")
#if ASYNC {
TraceLogTwoInts(LOG_WARNING, "SYNC: background sync failed, result=%d http=%d",
result, g_sync_operation.sync.status)
} else {
TraceLogResult(LOG_WARNING, "SYNC: background sync failed, result=%d", result)
}
}
}
+6
View File
@@ -378,7 +378,9 @@ app_update_draw :: (vapp: *void, viewport: Rectangle) {
}
}
settings_sync_account_pump(app)
network_start := app_profile_now()
app_network_pump(app)
app_profile_work_end(network_start, "account sync")
// Lumi and package requests run on the frame thread on every platform.
if !app_practice_holds_frame_work(app) {
// Lumi may still be opening after the first frames; its work waits.
@@ -388,8 +390,12 @@ app_update_draw :: (vapp: *void, viewport: Rectangle) {
defer_packages := AppBackgroundWorkDeferred() || app.ui.pointer_active ||
app.ui.keyboard_active ||
app.ui.route_transition_active || app.ui.route_transition_pending
package_start := app_profile_now()
PackagePump(app.enabled_apps, cast(s32)PackageNow(), defer_packages)
app_profile_work_end(package_start, "package installation")
node_start := app_profile_now()
NodeAppsPump(cast(s32)PackageNow(), app.launcher_open, defer_packages)
app_profile_work_end(node_start, "app loading")
content_generation := AssetGeneration()
// Paid practices need Dew, which the Google Play build does not offer.
practice_paid_allowed = DewAvailable()
+2 -2
View File
@@ -7,13 +7,13 @@ using AppNavRoute;
// Storage follows the app catalog; there is no separate favorites quota.
// The bundled apps, then one route for each slot of an app the node offers.
LAUNCHER_APP_COUNT :: 16
LAUNCHER_APP_COUNT :: 15
LauncherRoutes :: () -> [LAUNCHER_APP_COUNT]s32 {
// Leaderboard comes last of the bundled apps, so adding it moved none.
return .{APP_NAV_ROUTE_DIARY, APP_NAV_ROUTE_HABITS,
APP_NAV_ROUTE_ELIST, APP_NAV_ROUTE_LUMI, APP_NAV_ROUTE_PRACTICE,
APP_NAV_ROUTE_LEADERBOARD, APP_NAV_ROUTE_PROFILE, APP_NAV_ROUTE_SETTINGS, AppNavNodeRoute(0), AppNavNodeRoute(1),
APP_NAV_ROUTE_LEADERBOARD, APP_NAV_ROUTE_PROFILE, AppNavNodeRoute(0), AppNavNodeRoute(1),
AppNavNodeRoute(2), AppNavNodeRoute(3), AppNavNodeRoute(4),
AppNavNodeRoute(5), AppNavNodeRoute(6), AppNavNodeRoute(7)}
}
+5 -1
View File
@@ -126,7 +126,9 @@ with tempfile.TemporaryDirectory(prefix="inbe-settings-entry-") as temporary:
saved = settings()
assert saved["launcher_favorite_count"] == "2", "Opening Apps changed pins"
assert saved["enabled_apps"] == "22", "Opening Apps changed app choices"
# A card moves from Pinned to More; no separate editing or pin control.
# Reordering is explicit; browsing keeps the handles hidden.
assert not driver.find(label="Move app", role="button")
driver.press(label="Edit apps", role="button")
pinned, more = cards()
assert [card["label"] for card in pinned] == ["Lumi", "Habits"], pinned
handle = next(node for node in driver.find(label="Move app", role="button", visible=True)
@@ -141,4 +143,6 @@ with tempfile.TemporaryDirectory(prefix="inbe-settings-entry-") as temporary:
assert saved["enabled_apps"] == "22", "Dragging changed app choices"
pinned, more = cards()
assert [card["label"] for card in pinned] == ["Habits"], pinned
driver.press(label="Done", role="button")
assert not driver.find(label="Move app", role="button")
print("Apps: dragging arranges pins and preserves app choices")
+8 -6
View File
@@ -37,14 +37,16 @@ Answer :: () -> s32 {
PackageSetNodeApp(0, "chess")
every := LauncherRoutes()
length = LauncherOrderText(every[:], cast(s32)every.count, order[:])
if TextView(order[:length]) != "diary,habits,lists,lumi,practices,leaderboard,profile,settings,chess" ||
LauncherOrderRoutes(TextView(order[:length]), read[:]) != 9 {
if TextView(order[:length]) != "diary,habits,lists,lumi,practices,leaderboard,profile,chess" ||
LauncherOrderRoutes(TextView(order[:length]), read[:]) != 8 {
return 24
}
for index: cast(s32)0..8 {
for index: cast(s32)0..7 {
if read[index] != every[index] { return 25 }
}
PackageSetNodeApp(0, "")
if LauncherOrderRoutes("settings,profile,lumi", read[:]) != 2 ||
read[0] != APP_NAV_ROUTE_PROFILE || read[1] != APP_NAV_ROUTE_LUMI { return 28 }
if LauncherOrderRoutes("chess,lumi", read[:]) != 1 || read[0] != APP_NAV_ROUTE_LUMI { return 27 }
// A full buffer keeps whole names only.
tiny: [12]u8
@@ -64,7 +66,7 @@ Answer :: () -> s32 {
if count != 4 || favorites[0] != APP_NAV_ROUTE_PRACTICE ||
favorites[3] != APP_NAV_ROUTE_LUMI { return 3 }
count = LauncherToggleFavorite(favorites[:], count, APP_NAV_ROUTE_SETTINGS)
if count != 5 || favorites[4] != APP_NAV_ROUTE_SETTINGS { return 4 }
if count != 4 { return 4 }
favorites[0] = APP_NAV_ROUTE_LUMI
favorites[1] = APP_NAV_ROUTE_LUMI
if LauncherSanitizeFavorites(favorites[:], 2) != 1 { return 5 }
@@ -94,7 +96,7 @@ Answer :: () -> s32 {
favorites[0] != APP_NAV_ROUTE_DIARY { return 14 }
// Leaderboard is listed after the apps that existed before it, and the
// slots of the apps the node offers after the bundled apps.
if LauncherRoutes()[5] != APP_NAV_ROUTE_LEADERBOARD || LauncherRoutes()[6] != APP_NAV_ROUTE_PROFILE || LauncherRoutes()[7] != APP_NAV_ROUTE_SETTINGS || LauncherRoutes()[8] != AppNavNodeRoute(0) ||
if LauncherRoutes()[5] != APP_NAV_ROUTE_LEADERBOARD || LauncherRoutes()[6] != APP_NAV_ROUTE_PROFILE || LauncherRoutes()[7] != AppNavNodeRoute(0) ||
LauncherRoutes()[LAUNCHER_APP_COUNT - 1] != AppNavNodeRoute(7) { return 21 }
count = LauncherToggleFavorite(favorites[:], count, APP_NAV_ROUTE_HABITS)
count = LauncherPlaceFavorite(favorites[:], count, APP_NAV_ROUTE_HABITS, 1)
@@ -102,7 +104,7 @@ Answer :: () -> s32 {
favorites[2] != APP_NAV_ROUTE_ELIST { return 15 }
count = LauncherPlaceFavorite(favorites[:], count, APP_NAV_ROUTE_SETTINGS, 0)
count = LauncherPlaceFavorite(favorites[:], count, APP_NAV_ROUTE_HABITS, -1)
if count != LAUNCHER_APP_COUNT || favorites[0] != APP_NAV_ROUTE_SETTINGS { return 16 }
if count != LAUNCHER_APP_COUNT || favorites[0] == APP_NAV_ROUTE_SETTINGS { return 16 }
count = LauncherPlaceFavorite(favorites[:], 0, APP_NAV_ROUTE_LUMI, 0)
if count != 1 || favorites[0] != APP_NAV_ROUTE_LUMI { return 17 }
return 42
+32 -13
View File
@@ -169,7 +169,7 @@ with contextlib.ExitStack() as stack:
return matches[0]
def cards():
"""The Apps cards in Pinned and in More apps, in order."""
"""The app cards above and below the library divider, in order."""
tree = driver.tree()
headings = {node["label"]: node for node in tree
if node["kind"] == "text" and node["label"] in ("Pinned", "More apps")}
@@ -217,6 +217,9 @@ with contextlib.ExitStack() as stack:
return matches[0]
def move(card, destination):
if driver.find(label="Edit apps", role="button", visible=True):
driver.press(label="Edit apps", role="button")
driver.wait(label="Done", role="button")
driver.drag(UiDriver.center(handle(card)), destination, steps=16)
driver.wait_idle(frames=3)
@@ -266,6 +269,8 @@ with contextlib.ExitStack() as stack:
def open_profile(log):
"""Profile, an Apps action, replaces Apps with its own page."""
if driver.find(label="Done", role="button", visible=True):
driver.press(label="Done", role="button")
before = len(transitions(log))
driver.press(focus_id=6791, role="text_field")
driver.key("a", control=True)
@@ -344,13 +349,16 @@ with contextlib.ExitStack() as stack:
assert driver.wait(label="List view", role="button")["selected"]
pinned, more, tree = cards()
assert all(abs(card["height"] - 64) <= 1 for card in pinned + more), cards()
assert not driver.find(label="Move app", role="button"), "Browsing shows reorder controls"
driver.press(label="Edit apps", role="button")
pinned, more, tree = cards()
handles = driver.find(label="Move app", role="button", visible=True)
first_handle = next(h for h in handles if abs(h["y"] + h["height"] / 2 - pinned[0]["y"] - 32) < 2)
assert first_handle["x"] + first_handle["width"] <= pinned[0]["x"], first_handle
# The handle moves immediately, without a long press.
# In edit mode the handle moves immediately, without a long press.
driver.drag(UiDriver.center(first_handle), UiDriver.center(pinned[1]), steps=12)
wait_for(lambda: favorites(profile) == [1, 12, 2], "The drag handle did not move the app")
assert not driver.find(label="Done", role="button"), "Moving left Apps in an edit mode"
assert driver.find(label="Done", role="button"), "A move unexpectedly exited edit mode"
# Downloadable offers have the same handle and can be
# moved without installing them or claiming a node slot.
library = reveal_card("Library")
@@ -386,9 +394,17 @@ with contextlib.ExitStack() as stack:
assert favorites(profile) == [1, 12, 2], "View restart lost the app order"
driver.press(label="List view", role="button")
wait_setting(profile, "launcher_grid_view", 0)
# Profile and Settings have ordinary cards and the same
# options as other apps, including pinning.
for label, route in (("Profile", 0), ("Settings", 4)):
# Main settings live in Apps' top-right corner. Profile
# remains an ordinary card, including pinning.
assert not any(card["label"] == "Settings" for card in sum(cards()[:2], []))
settings_button = driver.wait(label="Settings", role="button", visible=True)
assert not under(driver.tree(), settings_button, "scroll"), settings_button
assert settings_button["x"] > width / 2 and settings_button["y"] < 80, settings_button
driver.press(label="Settings", role="button")
driver.wait(label="Settings", role="title_bar")
driver.press(label="Back", role="button")
driver.wait(label="Pinned")
for label, route in (("Profile", 0),):
driver.press(focus_id=6791, role="text_field")
driver.key("a", control=True)
driver.type(label)
@@ -419,7 +435,7 @@ with contextlib.ExitStack() as stack:
driver.key("escape")
driver.wait_gone(label=friend_id[:32] + "\n" + friend_id[32:])
driver.wait(label="@river", role="button")
print("Launcher views: immediate drag handles, grid/list, saved view/order and regular Profile/Settings cards passed")
print("Launcher views: edit-only handles, grid/list, saved view/order, Profile card and Apps settings passed")
raise SystemExit(0)
if arguments.measure:
@@ -688,10 +704,11 @@ with contextlib.ExitStack() as stack:
apps_x, apps_y, apps_width, apps_height = to_pixels(pin("Apps"), tree)
assert apps_y + apps_height > height - 60 and apps_x > width / 2, "Apps left the dock's end"
open_apps(hold=.35)
# The title's corner no longer closes Apps.
tap_pixel(width - 42, 44)
driver.wait_idle(frames=3)
assert apps_open(), "The Apps title corner still dismisses the page"
# Main settings belong to the top-right Apps action.
driver.press(label="Settings", role="button")
driver.wait(label="Settings", role="title_bar")
driver.press(label="Back", role="button")
driver.wait(label="Pinned")
open_profile(log)
open_apps()
assert favorites(profile) == [1, 2], "Opening Apps changed pinned cards"
@@ -731,7 +748,7 @@ with contextlib.ExitStack() as stack:
command("xdotool", "windowsize", window, str(width), str(height))
wait_for(lambda: abs(driver.tree()[0]["height"] - height) < 1, "Phone viewport did not restore")
driver.wait_idle(frames=3)
# A brief hold remains a click; only the visible handle can reorder.
# A brief hold remains a click; edit-mode handles own reordering.
pinned, more, tree = cards()
assert more[0]["label"] == "Diary", more
press(more[0], hold=.3)
@@ -756,7 +773,9 @@ with contextlib.ExitStack() as stack:
move(more[0], UiDriver.center(navigation(tree)[0]))
wait_for(lambda: favorites(profile) == [11, 1, 2], "Dragging a card to navigation did not place it")
assert [item["label"] for item in navigation()] == ["Diary", "Habits", "Practice", "Apps"]
assert not driver.find(label="Done", role="button")
assert driver.find(label="Done", role="button")
driver.press(label="Done", role="button")
assert not driver.find(label="Move app", role="button"), "Done left reorder controls visible"
# Profile stays in Apps after favorite changes.
assert apps_open(), "Dragging closed Apps"
open_profile(log)