Skip to content

fix(ui): make vault options mounting tab scrollable - #4227

Merged
infeo merged 1 commit into
cryptomator:developfrom
yugui923:fix/vault-options-mount-scroll
Apr 27, 2026
Merged

infeo merged 1 commit into
cryptomator:developfrom
yugui923:fix/vault-options-mount-scroll

Conversation

@yugui923

@yugui923 yugui923 commented Apr 25, 2026 •

Copy link
Copy Markdown
Contributor

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 VBox inside a TabPane whose hosting Stage has a setMinHeight(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

cryptomator-bugfix

Steps to reproduce

  1. Open Cryptomator with at least one vault configured.
  2. Select a vault and click Show Vault Options.
  3. Open the Mounting tab.
  4. Resize the window down to its minimum height.
  5. Switch Volume Type between options that expose different mount-point capabilities (e.g. WinFsp Local Drive on Windows, FUSE on Linux/macOS).
  6. The path text field / drive-letter row that becomes visible cannot be reached without enlarging the window — there is no scrollbar.

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 in addvault_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 into MountOptionsController, 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">. Move fx:controller to the new root. All fx:ids, bindings, padding and content unchanged — only the wrapping element and the indent level of the inner block.

Test plan

  • mvn -DskipTests package succeeds.
  • mvn test — 308 passed, 4 skipped (OS-gated), 0 failures.
  • App launches; main window opens; settings persist.
  • Manual: opened Vault Options → Mounting, shrank the window to minimum, switched Volume Type — vertical scrollbar appears and reaches all revealed rows. Other Vault Options tabs (General, Masterkey, Hub) unchanged.
  • Cross-OS verification (Windows + WinFsp Local Drive, macOS + FUSE-T) welcomed from reviewers.

@CLAassistant

CLAassistant commented Apr 25, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Apr 25, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ea06cb8b-53ed-4491-b8eb-4b3c2f98da33

📥 Commits

Reviewing files that changed from the base of the PR and between 31de783 and cd9e315.

📒 Files selected for processing (1)
  • src/main/resources/fxml/vault_options_mount.fxml
✅ Files skipped from review due to trivial changes (1)
  • src/main/resources/fxml/vault_options_mount.fxml

Walkthrough

The Vault Options mounting FXML was restructured: the root VBox was replaced by a ScrollPane (horizontal bar disabled, fitToWidth="true") that contains an inner VBox. All existing UI controls (volume type controls, restart-required label, loopback port row, read-only checkbox, custom mount flags, and mount-point auto/drive-letter/custom-directory controls) were moved under the inner VBox. Existing fx:id attributes, bindings, and onAction handler references were preserved.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: wrapping the vault mounting tab in a ScrollPane to enable scrolling.
Description check ✅ Passed The description comprehensively explains the problem, the chosen solution, implementation details, and testing approach—all directly related to the changeset.
Linked Issues check ✅ Passed The PR directly addresses issue #3150 by wrapping the VBox in a ScrollPane to prevent clipping and enable scrolling of hidden content.
Out of Scope Changes check ✅ Passed All changes are scoped to the vault_options_mount.fxml file for implementing scrollability; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 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 ScrollPane renders a viewport with a 1px gray border and a non-transparent background, which may be visually inconsistent with the other Vault Options tabs (still bare VBoxs). 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

📥 Commits

Reviewing files that changed from the base of the PR and between d67aa9c and 31de783.

📒 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]>
@yugui923

Copy link
Copy Markdown
Contributor Author

🧹 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 ScrollPane renders a viewport with a 1px gray border and a non-transparent background, which may be visually inconsistent with the other Vault Options tabs (still bare VBoxs). 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

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.

Copilot AI left a comment

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.

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 ScrollPane to enable vertical scrolling when the content exceeds the viewport.
  • Keep existing layout/bindings intact by moving the prior root VBox under the new ScrollPane root and moving fx:controller accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@overheadhunter overheadhunter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

fix itself lgtm, but @infeo should decide if a "local" fix is desired or rather make this a global default for all views

@yugui923

Copy link
Copy Markdown
Contributor Author

Sounds good. Let me know either way. I'm happy to continue working on this. Thanks for the review.

@infeo infeo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The local fix is enough. No need to make a big change here.

@infeo infeo added this to the next milestone Apr 27, 2026
@infeo
infeo merged commit 2fe7fe8 into cryptomator:develop Apr 27, 2026
5 checks passed
@yugui923
yugui923 deleted the fix/vault-options-mount-scroll branch April 27, 2026 12:53
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.

Bottom of Vault Options 'Mounting' window cuts off half the chosen directory text box.

5 participants