Repository navigation
fix(ui): make vault options mounting tab scrollable - #4227
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughThe Vault Options mounting FXML was restructured: the root Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/resources/fxml/vault_options_mount.fxml (1)
18-22: Consider transparent ScrollPane styling for visual parity with other tabs.By default, JavaFX
ScrollPanerenders a viewport with a 1px gray border and a non-transparent background, which may be visually inconsistent with the other Vault Options tabs (still bareVBoxs). If reviewers spot a subtle box outline or background mismatch in the Mounting tab during the requested cross-OS verification, consider neutralizing it, e.g.:♻️ Optional styling tweak
<ScrollPane xmlns:fx="http://javafx.com/fxml" xmlns="http://javafx.com/javafx" fx:controller="org.cryptomator.ui.vaultoptions.MountOptionsController" fitToWidth="true" - hbarPolicy="NEVER"> + hbarPolicy="NEVER" + style="-fx-background-color:transparent;-fx-background-insets:0;-fx-padding:0;">(or attach a styleClass and handle it in the existing CSS.)
Please confirm during the Windows + WinFsp / macOS + FUSE manual checks that the Mounting tab still looks visually identical to the other Vault Options tabs (no extra border/background around the content area).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/resources/fxml/vault_options_mount.fxml` around lines 18 - 22, The ScrollPane in vault_options_mount.fxml (fx:controller="org.cryptomator.ui.vaultoptions.MountOptionsController") is rendering a visible viewport border/background that breaks parity with other tabs; remove the visual box by making the ScrollPane transparent—either add an inline style attribute (e.g., set background-color: transparent; -fx-background: transparent; -fx-background-color: transparent; -fx-border-color: transparent) or add a styleClass (e.g., styleClass="transparent-scrollpane") and implement the corresponding CSS rule in the existing stylesheet to neutralize border/background so the Mounting tab visually matches the other VBox-based tabs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/main/resources/fxml/vault_options_mount.fxml`:
- Around line 18-22: The ScrollPane in vault_options_mount.fxml
(fx:controller="org.cryptomator.ui.vaultoptions.MountOptionsController") is
rendering a visible viewport border/background that breaks parity with other
tabs; remove the visual box by making the ScrollPane transparent—either add an
inline style attribute (e.g., set background-color: transparent; -fx-background:
transparent; -fx-background-color: transparent; -fx-border-color: transparent)
or add a styleClass (e.g., styleClass="transparent-scrollpane") and implement
the corresponding CSS rule in the existing stylesheet to neutralize
border/background so the Mounting tab visually matches the other VBox-based
tabs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 37f9e2ba-0577-4e1e-a5a6-da1b02840440
📒 Files selected for processing (1)
src/main/resources/fxml/vault_options_mount.fxml
Wrap the mounting-options VBox in a ScrollPane so that conditionally shown rows (drive-letter selector, custom mount-point picker, custom mount flags) remain reachable when the Vault Options window is at or near its 300px minimum height. Previously the rows were clipped past the bottom of the tab with no scrollbar, forcing the user to enlarge the window manually before the controls could be seen or interacted with. Fixes #3150 Co-Authored-By: Yuri Gui <[email protected]>
Thanks. Skipping for now: the existing usages in addvault_new_location.fxml and notification.fxml both use the bare default (no styleClass, no inline transparency), and the theme CSS files don't define a transparent-scrollpane class. Adopting the suggestion would introduce a new convention through a one-file fix. Happy to address project-wide ScrollPane theming separately if there's appetite — let me know. |
There was a problem hiding this comment.
Pull request overview
Makes the Vault Options → Mounting tab content scrollable so newly revealed configuration rows (after changing the Volume Type) remain reachable even when the dialog is at its minimum height (fixes clipped UI reported in #3150).
Changes:
- Wrap Mounting tab content in a
ScrollPaneto enable vertical scrolling when the content exceeds the viewport. - Keep existing layout/bindings intact by moving the prior root
VBoxunder the newScrollPaneroot and movingfx:controlleraccordingly.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
overheadhunter
left a comment
There was a problem hiding this comment.
fix itself lgtm, but @infeo should decide if a "local" fix is desired or rather make this a global default for all views
|
Sounds good. Let me know either way. I'm happy to continue working on this. Thanks for the review. |
infeo
left a comment
There was a problem hiding this comment.
The local fix is enough. No need to make a big change here.
Problem
On the Vault Options → Mounting tab, switching the Volume Type can make additional configuration rows appear (drive-letter selector, custom mount-point radio + path picker, custom mount flags, etc.). Because the tab content is laid out as a plain
VBoxinside aTabPanewhose hosting Stage has asetMinHeight(300)floor, the newly-revealed rows extend beyond the tab's viewport with no way to scroll. The user has to manually drag the bottom edge of the window down to see them — which is not discoverable, and on Windows 11 with WinFsp (Local Drive) selected it cuts the path text field literally in half.Fixes #3150
Steps to reproduce
Failure mode
Clipped, non-scrollable content. Functional impact is minor (the controls still work once the window is enlarged) but discoverability is poor — for a user who does not know to resize, the option appears missing.
Two solutions considered
Option A — wrap the tab in a
ScrollPane(chosen). Adds a vertical scrollbar that appears only when the content overflows the viewport. Mirrors the pattern already used inaddvault_new_location.fxml. Smallest diff, no controller or layout logic changes, no impact on other tabs.Option B — listen for
selectedMountService/ capability changes and programmatically resize the Stage to fit the new content. Requires plumbing a layout listener intoMountOptionsController, recomputing preferred height across font/locale/DPI variations, and deciding what to do if the user has manually resized the window. More moving parts and more edge cases; a worse fit for an FXML-only fit-and-finish issue.Option A was chosen for minimal blast radius and consistency with existing FXML patterns in the repo.
Fix
src/main/resources/fxml/vault_options_mount.fxml: wrap the existing<VBox>in<ScrollPane fitToWidth="true" hbarPolicy="NEVER">. Movefx:controllerto the new root. Allfx:ids, bindings, padding and content unchanged — only the wrapping element and the indent level of the inner block.Test plan
mvn -DskipTests packagesucceeds.mvn test— 308 passed, 4 skipped (OS-gated), 0 failures.