Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,24 @@ grep -oE 'logseq/[A-Za-z0-9_-]+\.git#[A-Za-z0-9._/-]+' logseq.opam | sort -u |
repository=${pin%%#*}
revision=${pin##*#}
checkout="duniverse/$(basename "$repository" .git)"
if [ -d "$checkout" ] && { [ ! -e "$checkout/.git" ] ||
git -C "$checkout" rev-parse --verify --quiet HEAD >/dev/null; }; then
if [ -d "$checkout" ] && [ ! -e "$checkout/.git" ]; then
continue
fi
if [ -d "$checkout/.git" ]; then
current=$(git -C "$checkout" rev-parse --verify --quiet HEAD 2>/dev/null || true)
case "$revision" in
*[!0-9a-fA-F]* )
if [ -n "$current" ]; then
continue
fi
;;
* )
if [ "$current" = "$revision" ]; then
continue
fi
;;
esac
fi
git init --quiet "$checkout" &&
git -C "$checkout" fetch --quiet --depth=1 "https://github.com/$repository" "$revision" &&
git -C "$checkout" checkout --quiet --detach FETCH_HEAD || exit 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ internal val logseqAppIcons: Map<String, ImageVector> = mapOf(
"more-vert" to circledEllipsis,
"navigation-back" to Icons.AutoMirrored.Filled.ArrowBack,
"open-external" to Icons.AutoMirrored.Outlined.OpenInNew,
"info" to Icons.Outlined.Info,
"outliner-editor-done" to Icons.Filled.Check,
"edit" to Icons.Outlined.Edit,
"refresh" to Icons.Filled.Refresh,
Expand All @@ -246,6 +247,7 @@ internal val logseqAppIcons: Map<String, ImageVector> = mapOf(
"share" to Icons.Outlined.Share,
"sidebar-toggle" to sidebarToggle,
"sign-in" to Icons.Filled.Login,
"account" to Icons.Outlined.AccountCircle,
"sign-out" to Icons.AutoMirrored.Filled.Logout,
"star" to Icons.Outlined.Star,
"star-filled" to Icons.Filled.Star,
Expand Down
6 changes: 6 additions & 0 deletions apple/Sources/Logseq/LGRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ enum LGIconPolicy {
"selection-done": .systemName("checkmark"),
"sidebar-toggle": .assetName("sidebar_toggle"),
"settings": .systemName("gearshape"),
"sign-in": .systemName("person.crop.circle"),
"account": .systemName("person.crop.circle"),
"edit": .systemName("square.and.pencil"),
"terminal": .systemName("terminal"),
"open-external": .systemName("arrow.up.forward.app"),
"info": .systemName("info.circle"),
"star": .assetName("star"),
"status-dot": .assetName("status_dot"),
"outliner-bullet": .assetName("outliner_bullet"),
Expand Down
2 changes: 1 addition & 1 deletion logseq.opam
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pin-depends: [
["melange-transit-core.0.1.2" "git+https://github.com/logseq/melange-transit.git#main"]
["melange-transit-native.0.1.2" "git+https://github.com/logseq/melange-transit.git#main"]
["melange-transit-melange.0.1.2" "git+https://github.com/logseq/melange-transit.git#main"]
["lui.0.1.0" "git+ssh://git@github.com/logseq/lui.git#c44bfe549470d68c578814e603f10ca34fa7384e"]
["lui.0.1.0" "git+ssh://git@github.com/logseq/lui.git#6bc3849e03c2ecd61b355da79df3588b7389a234"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Unfinished drags discard Android settings edits

Dragging the Sync server sheet halfway toward dismissal fires confirmValueChange(Hidden) before the finger lifts. BackOrDismissSettings discards the URL draft even if the user reverses the drag.

Learn more

The Android Gradle module uses the Kotlin renderer from the vendored LUI source. In that renderer, LuiModalSurface emits a model dismiss event from confirmValueChange(Hidden). Compose Foundation 1.12.1 calls that callback from AnchoredDraggableState.updateIfNeeded as a drag crosses the midpoint between anchors, without waiting for release. Returning false vetoes the native state change but does not undo the emitted event. settings_main_sheet routes that event to BackOrDismissSettings, which returns to Settings home and resets the draft.

Example: Type a different server URL without applying it. Drag the sheet downward past the midpoint, then move it back up before lifting your finger. The Sync server screen has already received a dismissal and cleared the draft.

Recommended fix: Keep confirmValueChange free of side effects. Have the renderer emit one dismiss event from a completed dismissal gesture, not from an anchor check during dragging. Preserve the separate hardware Back handler and its medium-detent behavior. Add a regression test that reverses a drag after crossing the midpoint and checks that the URL draft remains editable.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Outside taps also navigate Settings

Tapping outside an Android category triggers BackOrDismissSettings. Settings returns home and stays open, extending the behavior described for hardware Back.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

["sdl3.0.0.1--alpha" "git+https://github.com/logseq/ocaml-sdl3.git#a9919c19bb4a0ba4857142f007ad93dd2563e799"]
["drive.dev" "git+https://github.com/logseq/drive.git#dd735a65ed525d1c36db38ac8e8114aa81d314a1"]
["ocaml-signal.0.1.0" "git+https://github.com/logseq/ocaml-signal.git#02e18cdc5e0ad672aa223f638eaa3ba52fc9421e"]
Expand Down
44 changes: 43 additions & 1 deletion shared/src/logseq/model.ml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,17 @@ type settings_community_link =
; url : string
}

type settings_section =
| SettingsHome
| SettingsAccount
| SettingsGeneral
| SettingsEditor
| SettingsNotifications
| SettingsSyncServer
| SettingsAdvanced
| SettingsAbout
| SettingsCommunity

type runtime_log_record =
{ id : string
; level : string
Expand Down Expand Up @@ -479,6 +490,7 @@ type logseq_model =
; pending_sign_out : bool
; connection_menu_open : bool
; settings_open : bool
; settings_section : settings_section
; settings_tabs_open : bool
; runtime_log_open : bool
; appearance : string
Expand Down Expand Up @@ -729,10 +741,12 @@ type logseq_action =
| SetOutlinerTaskPriority of string * string
| OpenJournalCalendar
| OpenSettings
| OpenSettingsSection of settings_section
| ResumeSettings
| DismissSettings
| OpenSettingsTabs
| BackSettings
| BackOrDismissSettings
| OpenSettingsAppearanceMenu
| CloseSettingsAppearanceMenu
| ChangeAppearance of string
Expand Down Expand Up @@ -916,6 +930,7 @@ let initial () =
pending_sign_out = false;
connection_menu_open = false;
settings_open = false;
settings_section = SettingsHome;
settings_tabs_open = false;
runtime_log_open = false;
appearance = "system";
Expand Down Expand Up @@ -3652,6 +3667,7 @@ let rec update (current : logseq_model) action =
graph_menu_open = false;
connection_menu_open = false;
settings_open = true;
settings_section = SettingsHome;
settings_tabs_open = false;
settings_appearance_menu_open = false;
settings_dark_theme_menu_open = false;
Expand All @@ -3664,16 +3680,41 @@ let rec update (current : logseq_model) action =
{
current with
settings_open = false;
settings_section = SettingsHome;
settings_tabs_open = false;
settings_appearance_menu_open = false;
settings_dark_theme_menu_open = false;
settings_language_menu_open = false;
runtime_log_open = false;
base_url_draft = current.base_url;
}
| OpenSettingsSection section -> { current with settings_section = section }
| OpenSettingsTabs -> { current with settings_tabs_open = true }
| BackSettings ->
{ current with settings_tabs_open = false; runtime_log_open = false }
if current.settings_tabs_open || current.runtime_log_open then
{ current with settings_tabs_open = false; runtime_log_open = false }
else if current.settings_section = SettingsSyncServer then
{ current with settings_section = SettingsHome; base_url_draft = current.base_url }
else { current with settings_section = SettingsHome }
| BackOrDismissSettings ->
if current.settings_tabs_open || current.runtime_log_open then
{ current with settings_tabs_open = false; runtime_log_open = false }
else if current.settings_section = SettingsSyncServer then
{ current with settings_section = SettingsHome; base_url_draft = current.base_url }
else if current.settings_section <> SettingsHome then
{ current with settings_section = SettingsHome }
else
{
current with
settings_open = false;
settings_section = SettingsHome;
settings_tabs_open = false;
settings_appearance_menu_open = false;
settings_dark_theme_menu_open = false;
settings_language_menu_open = false;
runtime_log_open = false;
base_url_draft = current.base_url;
}
| OpenSettingsAppearanceMenu ->
{ current with settings_appearance_menu_open = true }
| CloseSettingsAppearanceMenu ->
Expand Down Expand Up @@ -3751,6 +3792,7 @@ let rec update (current : logseq_model) action =
{
applied with
settings_open = false;
settings_section = SettingsHome;
settings_tabs_open = false;
settings_language_menu_open = false;
runtime_log_open = false;
Expand Down
14 changes: 14 additions & 0 deletions shared/src/logseq/model.mli
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,17 @@ type settings_community_link =
; url : string
}

type settings_section =
| SettingsHome
| SettingsAccount
| SettingsGeneral
| SettingsEditor
| SettingsNotifications
| SettingsSyncServer
| SettingsAdvanced
| SettingsAbout
| SettingsCommunity

type runtime_log_record =
{ id : string
; level : string
Expand Down Expand Up @@ -465,6 +476,7 @@ type logseq_model =
; pending_sign_out : bool
; connection_menu_open : bool
; settings_open : bool
; settings_section : settings_section
; settings_tabs_open : bool
; runtime_log_open : bool
; appearance : string
Expand Down Expand Up @@ -715,10 +727,12 @@ type logseq_action =
| SetOutlinerTaskPriority of string * string
| OpenJournalCalendar
| OpenSettings
| OpenSettingsSection of settings_section
| ResumeSettings
| DismissSettings
| OpenSettingsTabs
| BackSettings
| BackOrDismissSettings
| OpenSettingsAppearanceMenu
| CloseSettingsAppearanceMenu
| ChangeAppearance of string
Expand Down
Loading
Loading