The open-source Arc replacement for macOS. Spaces, pinned tabs, split view, Little Windows and Arc's shortcuts on Chromium, with your Arc sidebar imported in one go.
Reveal the hidden sidebar over the whole 10 pt margin
Victor17b1b4a9c6e2
diff --git a/Sources/Cra/UI/Windows/FloatingSidebarGeometry.swift b/Sources/Cra/UI/Windows/FloatingSidebarGeometry.swiftindex 9b92c25..f927482 100644--- a/Sources/Cra/UI/Windows/FloatingSidebarGeometry.swift+++ b/Sources/Cra/UI/Windows/FloatingSidebarGeometry.swift@@ -3,10 +3,10 @@ import Foundation/// Both the shell's tracking area and the floating panel's pointer poll use the/// same window-local boundaries.enum FloatingSidebarGeometry {- /// Arc 1.170, measured with the pointer on a window away from the screen edge (29 Oct):- /// the hidden sidebar comes out within 5 pt of the window's left edge (not at 6 or 9 pt)- /// and from just outside it (2–4 pt).- static let revealInside: CGFloat = 5+ /// The hidden sidebar comes out over the whole 10 pt margin left of the page and from just+ /// outside the window (2–4 pt, as in Arc). Arc 1.170's own strip is 5 pt (measured 29 Oct:+ /// out at 1–5 pt, not at 6 or 9 pt); the full margin is a deliberate choice, easier to hit.+ static let revealInside: CGFloat = 10static let revealOutside: CGFloat = 4static let margin: CGFloat = 8static let leaveSlack: CGFloat = 24diff --git a/Tests/FloatingSidebarTests.swift b/Tests/FloatingSidebarTests.swiftindex af5f35e..0a70ca2 100644--- a/Tests/FloatingSidebarTests.swift+++ b/Tests/FloatingSidebarTests.swift@@ -71,8 +71,8 @@ enum FloatingSidebarTests {// Nonzero bounds also check that both paths use shell-local geometry.let bounds = CGRect(x: 20, y: 10, width: 1400, height: 880)expect(FloatingSidebarGeometry.shouldReveal(at: CGPoint(x: 20, y: 100), in: bounds), "left edge reveals")- expect(FloatingSidebarGeometry.shouldReveal(at: CGPoint(x: 25, y: 100), in: bounds), "5 pt in reveals, as in Arc")- expect(!FloatingSidebarGeometry.shouldReveal(at: CGPoint(x: 26, y: 100), in: bounds), "6 pt in does not reveal, as in Arc")+ expect(FloatingSidebarGeometry.shouldReveal(at: CGPoint(x: 30, y: 100), in: bounds), "the whole 10 pt margin reveals")+ expect(!FloatingSidebarGeometry.shouldReveal(at: CGPoint(x: 30.1, y: 100), in: bounds), "page content does not reveal")expect(FloatingSidebarGeometry.shouldReveal(at: CGPoint(x: 16, y: 100), in: bounds), "just outside the window reveals, as in Arc")expect(!FloatingSidebarGeometry.shouldReveal(at: CGPoint(x: 15.9, y: 100), in: bounds), "further outside does not reveal")expect(!FloatingSidebarGeometry.shouldReveal(at: CGPoint(x: 22, y: 9.9), in: bounds), "above the window does not reveal")diff --git a/docs/floating-sidebar-testing.md b/docs/floating-sidebar-testing.mdindex 598abea..63b65f6 100644--- a/docs/floating-sidebar-testing.md+++ b/docs/floating-sidebar-testing.md@@ -4,7 +4,7 @@ Run `bash scripts/test-floating-sidebar.sh` on macOS. The test compiles the prodfloating-sidebar controller with lightweight theme/layout stubs. It uses an offscreendisposable AppKit panel, does not install the pointer poll, and does not post input events.-Checks cover the shared reveal strip (Arc's: 5 pt inside the window's left edge, 4 pt outside), window bounds, matching leave slack,+Checks cover the shared reveal strip (the 10 pt margin left of the page, plus 4 pt outside the window), window bounds, matching leave slack,held-button retention outside those bounds and dismissal after release,re-entry during a hide animation, repeated reversals, anchoring while a hide is inflight, and immediate dismissal while an animated hide is pending. The tests wait@@ -12,8 +12,8 @@ for real AppKit animation completions; they do not establish physical hover behaIn an isolated CraDev profile, verify:-- Hide the sidebar with Command-S and move to within 5 pt of the window's left edge,- or just outside it. It should reveal there, and not 6 pt or more into the window.+- Hide the sidebar with Command-S and move into the 10 pt margin left of the page, or+ just outside the window. It should reveal there, and not over the page.- Move beyond the floating sidebar's right edge and quickly return to the gutter,repeatedly. The latest reveal should stay visible and interactive.- Press Command-S while the floating sidebar is entering or leaving. It should