address code review: POI order matches plan, self-documenting height reserve
Reorders the Verbrannte Straße POIs to plan §8's authored sequence (hunt, investigate, search, then the scout) — purely a keyboard tab-order fix, since hotspots are placed by percentage, not list order. Rewrites the location page's viewport-height reserve as a calc() over the same rem values the top bar and footer already declare as their own min-block-size, with file:line pointers to both, instead of an opaque 191px constant. Doesn't remove the underlying coupling (still no ResizeObserver / shared token), but a future edit to either component's minimum height now has a documented, unit-matching term to update instead of an unexplained magic number. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,19 +45,6 @@ export const BURNED_ROAD_LOCAL_CONTENT: LocalLocationContent = {
|
|||||||
yPercent: 33,
|
yPercent: 33,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: 'wounded-scout',
|
|
||||||
title: 'Verwundeter Kundschafter',
|
|
||||||
actionLabel: 'Sprechen',
|
|
||||||
type: 'NPC',
|
|
||||||
iconKey: 'speak',
|
|
||||||
xPercent: 17,
|
|
||||||
yPercent: 62,
|
|
||||||
enabled: true,
|
|
||||||
resultTitle: 'Verwundeter Kundschafter',
|
|
||||||
resultText:
|
|
||||||
'„Die Straße ist nicht mehr sicher. Die Plünderer kommen aus Richtung des alten Wachtpostens. Wenn du weitergehst, halte die Augen offen."',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: 'inspect-tracks',
|
key: 'inspect-tracks',
|
||||||
title: 'Verdächtige Spuren',
|
title: 'Verdächtige Spuren',
|
||||||
@@ -84,6 +71,19 @@ export const BURNED_ROAD_LOCAL_CONTENT: LocalLocationContent = {
|
|||||||
resultText:
|
resultText:
|
||||||
'Der Wagen wurde gründlich geplündert. Zwischen verbrannten Brettern findest du nur leere Kisten und Spuren eines hastigen Aufbruchs.',
|
'Der Wagen wurde gründlich geplündert. Zwischen verbrannten Brettern findest du nur leere Kisten und Spuren eines hastigen Aufbruchs.',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'wounded-scout',
|
||||||
|
title: 'Verwundeter Kundschafter',
|
||||||
|
actionLabel: 'Sprechen',
|
||||||
|
type: 'NPC',
|
||||||
|
iconKey: 'speak',
|
||||||
|
xPercent: 17,
|
||||||
|
yPercent: 62,
|
||||||
|
enabled: true,
|
||||||
|
resultTitle: 'Verwundeter Kundschafter',
|
||||||
|
resultText:
|
||||||
|
'„Die Straße ist nicht mehr sicher. Die Plünderer kommen aus Richtung des alten Wachtpostens. Wenn du weitergehst, halte die Augen offen."',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
localPrimaryActions: [
|
localPrimaryActions: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -262,15 +262,15 @@ describe('seedVisibleVerticalSlice', () => {
|
|||||||
}[];
|
}[];
|
||||||
expect(pointsOfInterest.map((poi) => poi.key)).toEqual([
|
expect(pointsOfInterest.map((poi) => poi.key)).toEqual([
|
||||||
'hunt-area',
|
'hunt-area',
|
||||||
'wounded-scout',
|
|
||||||
'inspect-tracks',
|
'inspect-tracks',
|
||||||
'search-abandoned-wagon',
|
'search-abandoned-wagon',
|
||||||
|
'wounded-scout',
|
||||||
]);
|
]);
|
||||||
expect(pointsOfInterest.map((poi) => poi.type)).toEqual([
|
expect(pointsOfInterest.map((poi) => poi.type)).toEqual([
|
||||||
'HUNT',
|
'HUNT',
|
||||||
'NPC',
|
|
||||||
'INVESTIGATE',
|
'INVESTIGATE',
|
||||||
'SEARCH',
|
'SEARCH',
|
||||||
|
'NPC',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const primaryActions = burnedRoad.localPrimaryActions as {
|
const primaryActions = burnedRoad.localPrimaryActions as {
|
||||||
|
|||||||
@@ -23,16 +23,6 @@ export const BURNED_ROAD_POIS: LocationPointOfInterest[] = [
|
|||||||
yPercent: 44,
|
yPercent: 44,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: 'wounded-scout',
|
|
||||||
title: 'Verwundeter Kundschafter',
|
|
||||||
actionLabel: 'Sprechen',
|
|
||||||
type: 'NPC',
|
|
||||||
iconKey: 'speak',
|
|
||||||
xPercent: 20,
|
|
||||||
yPercent: 60,
|
|
||||||
enabled: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: 'inspect-tracks',
|
key: 'inspect-tracks',
|
||||||
title: 'Verdächtige Spuren',
|
title: 'Verdächtige Spuren',
|
||||||
@@ -53,6 +43,16 @@ export const BURNED_ROAD_POIS: LocationPointOfInterest[] = [
|
|||||||
yPercent: 68,
|
yPercent: 68,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'wounded-scout',
|
||||||
|
title: 'Verwundeter Kundschafter',
|
||||||
|
actionLabel: 'Sprechen',
|
||||||
|
type: 'NPC',
|
||||||
|
iconKey: 'speak',
|
||||||
|
xPercent: 20,
|
||||||
|
yPercent: 60,
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const BURNED_ROAD_ACTIONS: LocationPrimaryAction[] = [
|
export const BURNED_ROAD_ACTIONS: LocationPrimaryAction[] = [
|
||||||
|
|||||||
@@ -5,9 +5,18 @@
|
|||||||
// size instead of clamping, letting the artwork push the action bar off
|
// size instead of clamping, letting the artwork push the action bar off
|
||||||
// screen. Giving this page its own definite, viewport-bounded height fixes
|
// screen. Giving this page its own definite, viewport-bounded height fixes
|
||||||
// that without touching the shell, which other screens still size freely.
|
// that without touching the shell, which other screens still size freely.
|
||||||
// Reserve = top bar (~90px) + footer (~53px) + this page's own padding
|
//
|
||||||
// (2 × var(--ar-space-5) = 48px), both stable across breakpoints.
|
// Reserve terms are the shell chrome's own `min-block-size` values plus this
|
||||||
$app-shell-chrome-reserve: 191px;
|
// page's own padding, so the number tracks its sources rather than sitting as
|
||||||
|
// an opaque constant — if the top bar or footer ever needs more room than its
|
||||||
|
// current floor (a longer name, a wrapped nav row), bump the matching term
|
||||||
|
// here too:
|
||||||
|
// apps/web/src/app/layout/top-bar/top-bar.component.scss (5.6rem)
|
||||||
|
// + apps/web/src/app/layout/game-footer/game-footer.component.scss (3.3rem)
|
||||||
|
// + this page's own padding, 2 × var(--ar-space-5) (3rem)
|
||||||
|
// A small safety margin (0.5rem) absorbs sub-pixel/line-height drift so a
|
||||||
|
// few px of unplanned growth doesn't immediately reopen the clipping bug.
|
||||||
|
$app-shell-chrome-reserve: calc(5.6rem + 3.3rem + 3rem + 0.5rem);
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@@ -85,9 +85,9 @@ describe('LocationPageComponent', () => {
|
|||||||
expect(hotspots).toHaveLength(4);
|
expect(hotspots).toHaveLength(4);
|
||||||
expect([...hotspots].map((poi) => poi.querySelector('button')?.dataset['poi'])).toEqual([
|
expect([...hotspots].map((poi) => poi.querySelector('button')?.dataset['poi'])).toEqual([
|
||||||
'hunt-area',
|
'hunt-area',
|
||||||
'wounded-scout',
|
|
||||||
'inspect-tracks',
|
'inspect-tracks',
|
||||||
'search-abandoned-wagon',
|
'search-abandoned-wagon',
|
||||||
|
'wounded-scout',
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -56,9 +56,9 @@ describe('LocationSidebarComponent', () => {
|
|||||||
|
|
||||||
expect([...interactions].map((item) => item.textContent?.trim())).toEqual([
|
expect([...interactions].map((item) => item.textContent?.trim())).toEqual([
|
||||||
'Jagd beginnen',
|
'Jagd beginnen',
|
||||||
'Sprechen',
|
|
||||||
'Untersuchen',
|
'Untersuchen',
|
||||||
'Durchsuchen',
|
'Durchsuchen',
|
||||||
|
'Sprechen',
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user