Commit 4b6277e
committed
fix(programa): restore view mode persistence per team feedback
The previous attempt to fix the initial-load 'jump' by ignoring stale
localStorage values was too restrictive. The team wants the user's
choice to actually persist across visits.
New behavior:
- First visit (no saved value): default to visual grid
- After user picks list: save to localStorage, restore list on next visit
- After user picks grid: save to localStorage, restore grid on next visit
Legacy users who had 'list' saved from the old default will see a one-time
jump from grid → list on their first visit after this change. After that
they can click the grid radio to overwrite the saved value and stop the
jump.
Also cleaned up:
- Removed debug console.log statements left over from the filter fix
- Fixed a duplicated function body in the inline script that was
breaking astro check1 parent 48cd9ce commit 4b6277e
1 file changed
Lines changed: 12 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | 154 | | |
159 | 155 | | |
160 | 156 | | |
| |||
184 | 180 | | |
185 | 181 | | |
186 | 182 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
| |||
249 | 252 | | |
250 | 253 | | |
251 | 254 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
| 255 | + | |
258 | 256 | | |
259 | 257 | | |
260 | 258 | | |
| |||
269 | 267 | | |
270 | 268 | | |
271 | 269 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | 270 | | |
276 | 271 | | |
277 | 272 | | |
| |||
280 | 275 | | |
281 | 276 | | |
282 | 277 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | 278 | | |
287 | 279 | | |
288 | 280 | | |
| |||
0 commit comments