Commit 4adace8
fix(ui): mobile breadcrumb truncation + initial FAB lift on deep links
## Breadcrumb (MastheadRule)
At 375px the masthead showed `~/anyplot.ai · bar-tornado-sensitivi…` —
ellipsis ate the language and library segments, i.e. exactly the parts the
user was currently looking at. Two reasons:
1. `gridTemplateColumns` switched to `1fr auto 1fr` at `sm`, but the center
comment is `display: none` until `md`. The right `1fr` therefore claimed
~half the bar at sm just for the theme toggle, leaving the breadcrumb
~290px when it needed ~360px.
2. Language (`python`) + library (`plotnine`) were always rendered in full,
competing with a long spec-id for the limited room.
Fix:
- Grid stays `1fr auto auto` until `md`, so xs+sm give the breadcrumb the
full remaining width (toggle still hugs the right edge).
- Language and library carry a `short` label (`py` / `p9` via the existing
`LANG_EXT` and `LIB_ABBREV` maps already used in compact catalog tiles).
Rendered with the NavBar dual-span pattern: short on xs+sm, full on md+.
`title=` carries the full name for hover/SR users.
- The `~/anyplot.ai` root marker (and its leading separator) is hidden on
xs only. The NavBar logo `any.plot()` immediately below already anchors
the brand; the masthead becomes a pure breadcrumb on mobile.
Result at 375px:
before: `~/anyplot.ai · bar-tornado-sensitivi…`
after: `bar-tornado-sensitivity · py · p9`
## FAB lift (FeedbackWidget)
On a direct deep link to a spec page the FAB appeared elevated for ~hundreds
of ms before settling at the corner. The lift effect uses
`footer.getBoundingClientRect().top` to detect viewport overlap, and only
recomputes on `scroll` / `resize` — neither fires while React hydrates and
the spec data + images stream in. During that window the footer sits high in
the layout and the FAB lifts dramatically, then drops once content loads.
Watch the body with `ResizeObserver` (in addition to scroll/resize) and
re-run the same RAF-batched update — content growth now triggers a
recompute, so the FAB stays anchored at the corner during initial layout.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e10219b commit 4adace8
2 files changed
Lines changed: 71 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
119 | 126 | | |
120 | 127 | | |
121 | | - | |
122 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
123 | 131 | | |
124 | 132 | | |
125 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| |||
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
86 | | - | |
87 | | - | |
| 91 | + | |
| 92 | + | |
88 | 93 | | |
89 | | - | |
| 94 | + | |
90 | 95 | | |
91 | 96 | | |
92 | 97 | | |
| |||
143 | 148 | | |
144 | 149 | | |
145 | 150 | | |
146 | | - | |
147 | | - | |
148 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
149 | 157 | | |
150 | 158 | | |
151 | 159 | | |
| |||
162 | 170 | | |
163 | 171 | | |
164 | 172 | | |
165 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
166 | 176 | | |
167 | 177 | | |
168 | 178 | | |
169 | 179 | | |
170 | | - | |
| 180 | + | |
171 | 181 | | |
172 | 182 | | |
173 | 183 | | |
174 | 184 | | |
175 | 185 | | |
176 | 186 | | |
177 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
178 | 190 | | |
179 | 191 | | |
180 | 192 | | |
| |||
198 | 210 | | |
199 | 211 | | |
200 | 212 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
212 | 221 | | |
213 | | - | |
214 | | - | |
| 222 | + | |
215 | 223 | | |
216 | 224 | | |
217 | | - | |
218 | | - | |
219 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
220 | 253 | | |
221 | 254 | | |
222 | 255 | | |
| |||
0 commit comments