Commit 57b96f7
committed
feat(schema): URL reflects the selected instance so entry views are shareable
Old behaviour: selectInstance(dbId) mutated component state only -- the
URL stayed on /content/schema/:className so an entry view couldn't be
linked, bookmarked, or recovered via browser back.
Add a nested route /content/schema/:className/instance/:dbId pointing at
the same SchemaComponent. The single route.params subscription now keeps
both selectedClass and selectedInstanceId in sync; a dbId in the URL
forces the Entries tab so deep links render the instance browser instead
of the Properties view. selectInstance / clearSelectedInstance /
onInstanceLinkClick all router.navigate now so the URL is the single
source of truth.
Note: clicking a link inside an instance to another object can land us
on a URL whose :className segment doesn't match the loaded instance's
actual schema class. We don't fix the className up after-the-fact yet --
the per-instance "Referrals" section that needs the same load-then-
recompute work is blocked on a new ContentService endpoint (filed
separately).1 parent c09373d commit 57b96f7
2 files changed
Lines changed: 36 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
172 | 180 | | |
173 | 181 | | |
174 | 182 | | |
| |||
Lines changed: 28 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
91 | 96 | | |
92 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
93 | 106 | | |
94 | 107 | | |
95 | 108 | | |
| |||
364 | 377 | | |
365 | 378 | | |
366 | 379 | | |
367 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
368 | 384 | | |
369 | 385 | | |
370 | 386 | | |
371 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
372 | 390 | | |
373 | 391 | | |
374 | 392 | | |
375 | | - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
376 | 400 | | |
377 | 401 | | |
0 commit comments