Skip to content

armgit / cogit

Public Imported from GitHub
0

Git for the intent behind agent-written code. Records what your coding agent decided and why, and links every commit to it.

fix(map): show a ? explanation that opens above its button

Erenb88b0cad80ff
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3ff50d4..0a1545e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
+### Fixed
+- A **?** explanation that opens above its button (every Shape tool but the last, and Settings rows near the bottom) shows again; it was pushed off the window.
## [0.25.4] - 2026-10-31
### Added
diff --git a/packages/template/src/HelpTip.tsx b/packages/template/src/HelpTip.tsx
index d4c79f6..81abd86 100644
--- a/packages/template/src/HelpTip.tsx
+++ b/packages/template/src/HelpTip.tsx
@@ -103,10 +103,19 @@ export function bubblePlace(
const below = height - rect.bottom - 6 - EDGE;
const above = rect.top - 6 - EDGE;
if (bubbleHeight <= below || (bubbleHeight > above && below >= above))
- return { position: "fixed", left, top: rect.bottom + 6, maxHeight: below, overflowY: "auto" };
+ return {
+ position: "fixed",
+ left,
+ top: rect.bottom + 6,
+ bottom: "auto",
+ maxHeight: below,
+ overflowY: "auto",
+ };
return {
position: "fixed",
left,
+ // The stylesheet places the bubble with `top`; clear it, or both apply.
+ top: "auto",
bottom: height - rect.top + 6,
maxHeight: above,
overflowY: "auto",
diff --git a/packages/template/test/shape-modal.test.tsx b/packages/template/test/shape-modal.test.tsx
index 2b18ecf..280e4ef 100644
--- a/packages/template/test/shape-modal.test.tsx
+++ b/packages/template/test/shape-modal.test.tsx
@@ -194,6 +194,7 @@ describe("the help bubble", () => {
position: "fixed",
left: 92,
top: 124,
+ bottom: "auto",
maxHeight: 668,
overflowY: "auto",
});
@@ -201,6 +202,7 @@ describe("the help bubble", () => {
expect(bubblePlace(low, 200, 1200, 800)).toEqual({
position: "fixed",
left: 832,
+ top: "auto",
bottom: 106,
maxHeight: 686,
overflowY: "auto",