Repository navigation
Migrate UI to libadwaita 1.8 and align with GNOME HIG - #7
Merged
Merged
Conversation
Previously check_smb_host_reachable ran on the GTK main loop, freezing
the UI for up to 4 seconds (DNS + TCP connect timeout) when the host
could not be reached. Now the call runs in a daemon thread, the result
is marshalled back via GLib.idle_add, and cancellation is driven by a
Gio.Cancellable so that:
- typing more characters cancels the in-flight check and starts a
fresh one (no stale result clobbers the UI),
- closing the dialog cancels the check so its callback never touches
destroyed widgets.
The Add Share success toast claimed the share would mount when accessed, but request_helper_create mounts the share immediately and the refreshed row already reflects the mounted state. Drop the speculative claim and just confirm the action.
Drop the speculative "will mount when accessed" suffix from the upgrade toast for the same reason as the create toast: the refreshed row already reflects the actual mount state, so the toast should only confirm the action.
mount_manager_ui.py does 'from mount_manager import ...', which failed in the built AppImage because the build script installed mount_manager.py as 'mount-manager' (renamed, no .py extension, hyphenated -- unimportable as a Python module). Install it under its real filename and create a 'mount-manager' symlink for the AppRun entry point. Retarget the helper patch to mount_manager.py accordingly.
Owner
|
Hey I haven't forgotten about this PR just so you know. I am just swamped with family stuff. Some patience and I will review it and merge it. I srsly appreciate the time you have put on this ❤️ |
Owner
|
the share path is missing the hint text in the field with the example \hostname\share so the user knows what to input from the example. also the progressive reveal described in the PR does not exist as the modal that adds the share already shows the credentials fields. |
UX fixes for the Add SMB Share dialog: - Show example syntax as the Share group's description so users see "//hostname/sharename" before typing. - Hide the credentials group until the host check succeeds, instead of just disabling it, so the form clearly progresses. - Replace Adw.PreferencesPage with Adw.Clamp + Gtk.Box so the dialog grows to fit revealed content instead of pinning a fixed height behind a scrollbar. - Drop the redundant header-bar close button; Cancel + Esc remain. - Use canonical Adwaita icon names (object-select-symbolic, dialog-error-symbolic) for the host-check status indicator. Main window polish: - Make the Add Share header button icon-only per GNOME HIG. - Drop the redundant empty-state description. Refactor mount_manager_ui.py (no behavior change): - Add a bind_action helper to collapse repeated SimpleAction wiring. - Extract _cancel_pending_host_check and _run_helper_action helpers. - Inline the GLib_VariantType wrapper, table-drive the shortcuts items, simplify the host-check worker and row-clearing loop. Docs: - Update AGENTS.md and the libadwaita migration design spec to reflect the Clamp + Box body and the visible (rather than sensitive) credentials-group reveal. 623 -> 603 lines in mount_manager_ui.py. All tests still pass.
Owner
|
Hey! just an update the reason I havent merged the PR yet is that I dont want to break the native package I have on terra. After I am done with some things I have IRL I will remove the terra package and then merge the PR. |
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.
Summary
Full migration of the SMB Mount Manager GTK4 UI to libadwaita, followed by a
GNOME HIG audit pass and a libadwaita 1.8 baseline bump that adopts newer APIs.
Libadwaita migration
Adw.Application+Adw.StyleManager(delegated color scheme; no custom CSS)Adw.ApplicationWindowwithToolbarViewandToastOverlayAdwPreferencesGroup/AdwActionRow(hybrid row pattern:switch + inline primary suffix + kebab menu for destructive actions)
Adw.StatusPageAdwDialog(progressive reveal) for Add Share, with debounced host checkthat runs off the main thread and is cancelled on close
Adw.AlertDialogfor delete confirmations,Adw.AboutDialogfor AboutAdw.Toastmount_manager_ui.py;mount_manager.pystaysimportable without a display so the polkit
--helperre-exec pathdoesn't pull in GTK/Adw
GNOME HIG fixes
libadwaita 1.8 baseline
Adw.Spinnerin Add Share dialogAdw.ShortcutsDialogreplaces the deprecatedGtk.ShortcutsWindowfamilyGtk.FileLauncherreplacesxdg-openfor opening mount foldersAdwPreferencesGroup.set_separate_rows(True)— mount rows render asseparate cards
Packaging
packaging/build-appimage.shinstalls both Python modules under their realfilenames and symlinks
mount-manager→mount_manager.py(needed sofrom mount_manager import …resolves at runtime)packaging/appimage-helper.patchre-anchored and retargeted tomount_manager.pyDocs
docs/specs/anddocs/plans/AGENTS.mdupdated with new architecture, UI conventions, and packaging notesTest Plan
python3 -m unittest discover -s tests -v— 9/9 passpython3 -X importtime mount_manager.py --helper …shows no Gtk/Adw imports)