Skip to content

Commit add104b

Browse files
maxko87claude
andcommitted
Fix tooltip positioning for leftmost table cells to prevent sidebar overflow
- Add horizontal position detection in GridView tooltips - Check if cell is in first 2 columns (colIdx <= 1) to determine alignment - Switch from right-aligned (right: '0') to left-aligned (left: '0') positioning for leftmost cells - Prevents tooltips from sliding under the left sidebar when hovering over leftmost table cells - Matches the existing bottom positioning fix pattern (isNearBottom) with new isNearLeft check This completes the tooltip viewport overflow fixes - tooltips now properly handle: - Bottom edge: shows above cell when near bottom (previously fixed) - Right edge: right-aligned by default (previously fixed) - Left edge: left-aligned for leftmost columns (this fix) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent 7bef64c commit add104b

File tree

3 files changed

+47
-16
lines changed

3 files changed

+47
-16
lines changed

src/components/calculator/common/HowToUseModal.tsx

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,32 +33,43 @@ function HowToUseModal({ isOpen, onClose }: HowToUseModalProps) {
3333
<div className="modal-body">
3434
<section className="modal-section">
3535
<p>
36-
If you're a general partner (or planning to become a GP) in venture or private equity, this calculator lets you fully model your carry compensation. Configure fund parameters, add multiple funds at once, model return scenarios, and see your comp projections over 20 years.
36+
If you're a general partner (or planning to become a GP) in venture or private equity, this calculator lets you fully model your carry compensation.
37+
</p>
38+
<p>
39+
Configure fund parameters, model multiple funds at once, and deep dive into the math behind your carry returns.
3740
</p>
3841
</section>
3942

4043
<section className="modal-section">
4144
<h3>Getting Started</h3>
4245
<ul className="simple-list">
43-
<li>Set up your base fund (size, carry %, per-GP allocation)</li>
44-
<li>Add 2-3 return scenarios (base/up/down case)</li>
45-
<li>Click any cell in the results table for calculation breakdown</li>
46-
<li>Share URL to save your configuration</li>
46+
<li>Set up your fund(s) on the left sidebar. The returns table will automatically update to show how much carry a GP would earn under your assumptions.</li>
47+
<li>Each row in the returns table represents how many years you worked at the fund. Each column shows how far into the future you want to model carry. This lets you model scenarios like working at a fund for 5 years and earning carry for another 5 years into the future (as is typical).</li>
48+
<li>Create multiple return scenarios in each fund, and select which one you're modeling using the dropdowns above the returns table.</li>
49+
<li>Click each cell in the table to explore the math in "Simple" or "Advanced" mode.</li>
4750
</ul>
4851
</section>
4952

5053
<section className="modal-section">
51-
<h3>Multiple Funds</h3>
52-
<p>
53-
Two ways to model multiple funds: check "Raise continuously" and set your cycle time (e.g., every 2 years), or manually add funds with "+ Add Fund" for custom timing.
54-
</p>
54+
<h3>Tips</h3>
55+
<ul className="simple-list">
56+
<li>There are two ways to model multiple funds:
57+
<ul>
58+
<li>For recurring funds of similar size, select "Raise continuously" and set the fund cycle time to the number of years between raises.</li>
59+
<li>If funds aren't raised regularly, or you want to model two different funds at once, use "+ Add Fund" for each one.</li>
60+
</ul>
61+
</li>
62+
<li>To see the total carry for the fund instead of a single GP, you can set "Per GP Carry" to 100%.</li>
63+
<li>Use "+ Preset" to add funds modeled off a typical seed/growth/late-stage fund.</li>
64+
</ul>
5565
</section>
5666

5767
<section className="modal-section">
58-
<h3>Historic Fund Presets</h3>
59-
<p>
60-
Select from real historic funds in the preset dropdown (Apollo IX, KKR XIII, etc). Fund sizes estimated from public pension commitments: CalPERS (~$500B AUM) typically commits 6-20% of fund size depending on scale, OPERS (~$100B AUM) commits 3-18%. These are approximations for modeling purposes.
61-
</p>
68+
<h3>Historic Funds</h3>
69+
<ul className="simple-list">
70+
<li>We've added return profiles for 561 historic funds, including Apollo Fund X, Blackstone Capital Partners VII, and Carlyle Partners VII. You can explore these by clicking "+ Historic".</li>
71+
<li>Note: Fund sizes are estimated from public pension commitments (e.g. CalPERS has ~$500B AUM and typically commits 6-20% of fund size depending on scale, OPERS has ~$100B AUM and commits 3-18%).</li>
72+
</ul>
6273
</section>
6374

6475
</div>

src/components/calculator/results/GridView.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ function GridView({
8787
const isClicked = clickedCell?.row === rowIdx && clickedCell?.col === colIdx;
8888
const isActive = isHovered || isClicked;
8989
const isNearBottom = rowIdx >= calculations.slice(0, maxYears).length - 3;
90+
const isNearLeft = colIdx <= 1; // First 2 columns
9091

9192
return (
9293
<td
@@ -113,7 +114,11 @@ function GridView({
113114
top: '100%',
114115
marginTop: '8px'
115116
}),
116-
right: '0',
117+
...(isNearLeft ? {
118+
left: '0'
119+
} : {
120+
right: '0'
121+
}),
117122
background: 'var(--bg-primary)',
118123
border: '1px solid var(--border-color)',
119124
borderRadius: 'var(--radius-lg)',
@@ -159,6 +164,7 @@ function GridView({
159164
const isClicked = clickedCell?.row === rowIdx && clickedCell?.col === colIdx;
160165
const isActive = isHovered || isClicked;
161166
const isNearBottom = rowIdx >= calculations.slice(0, maxYears).length - 3;
167+
const isNearLeft = colIdx <= 1; // First 2 columns
162168

163169
return (
164170
<td
@@ -185,7 +191,11 @@ function GridView({
185191
top: '100%',
186192
marginTop: '8px'
187193
}),
188-
right: '0',
194+
...(isNearLeft ? {
195+
left: '0'
196+
} : {
197+
right: '0'
198+
}),
189199
background: 'var(--bg-primary)',
190200
border: '1px solid var(--border-color)',
191201
borderRadius: 'var(--radius-lg)',

src/index.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ body {
812812
background: var(--bg-primary);
813813
border-radius: var(--radius-xl);
814814
box-shadow: var(--shadow-xl);
815-
max-width: 700px;
815+
max-width: 900px;
816816
width: 100%;
817817
max-height: 90vh;
818818
display: flex;
@@ -931,6 +931,16 @@ body {
931931
font-weight: 600;
932932
}
933933

934+
.simple-list ul {
935+
margin-top: var(--spacing-xs);
936+
padding-left: var(--spacing-xl);
937+
list-style: circle;
938+
}
939+
940+
.simple-list ul li {
941+
margin-bottom: var(--spacing-sm);
942+
}
943+
934944
.modal-footer-section {
935945
text-align: center;
936946
padding-top: var(--spacing-xl);

0 commit comments

Comments
 (0)