refactor(editor): rename the reference panel's place to citations
Frees the name « references » for the fifth tab (R2.1). The panel's
data-place, PlaceName and ids become citations; no visible change.
EditorTarget, move kind, i18n keys and domain fields keep their names
(removed in R2.1).
R-24 (no assertion removed or weakened): unit editor-route, no-loss,
references-panel, route-recovery ids editor-references-* -> editor-citations-*;
keep-alive inPlace/place('references') -> 'citations'; focus-request
ownedBy 'references' -> 'citations'. e2e support openReferences /
closeReferences, crossing 204/271, journeys 247, layout 234/305,
deselect 229, shell 135 -> place 'citations'; crossing 205 searchbox and
structures 95 « citée 0 fois » -> libraryRoot(page) (new helper).
Gates: typecheck, lint, test:run (app 1382), build, e2e:ui 251 passed,
e2e:shell 7 specs 63 passed / 63 skipped on db:sandbox (editor-equine
not listed); full-row guard: no pre-existing row changed in any table.
This commit is contained in:
1 parent
65a8fd37b8
commit
fc3fec7654
18 files changed
+46
-40
No files matched your search
@@ -19,10 +19,10 @@ export type FocusOutcome = 'found' | 'kept' | 'none'
|
||||
export type PlaceName =
|
||||
| EditorTabId
|
||||
| `annotations.${AnnotationSection}`
|
||||
| 'references'
|
||||
| 'citations'
|
||||
|
||||
export function placeOf(target: EditorTarget): PlaceName {
|
||||
if (target.place === 'references') return 'references'
|
||||
if (target.place === 'references') return 'citations'
|
||||
if (target.tab !== 'annotations') return target.tab
|
||||
return `annotations.${target.section ?? 'drawing'}`
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ function referencesBack(opener: HTMLElement | null): HTMLElement | null {
|
||||
|
||||
/** Where the focus lands after a programmatic move; never `body`. */
|
||||
function landingOf(move: Move, state: NavigationState): HTMLElement | null {
|
||||
if (move.kind === 'references') return headingOf('references')
|
||||
if (move.kind === 'references') return headingOf('citations')
|
||||
const place = state.focus ? placeOf(state.focus.target) : shownPlace(state)
|
||||
return headingOf(place) ?? tabButton(state.tab)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user