mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
Merge branch 'feat/optional-catalog-sources' into refactor/route-imagery-sources
# Conflicts: # CHANGELOG.md # docs/CURRENT-STATE.md
This commit is contained in:
commit
3b840ebdf3
6 files changed
+52
-8
No files matched your search
@@ -5,6 +5,9 @@
|
|||||||
Explicitly removing either source leaves its layer unavailable; standalone
|
Explicitly removing either source leaves its layer unavailable; standalone
|
||||||
defaults preserve the existing providers.
|
defaults preserve the existing providers.
|
||||||
|
|
||||||
|
- Street Level with no providers uses the shared unavailable state and refuses
|
||||||
|
activation before initialization, while keeping its layer identity visible.
|
||||||
|
|
||||||
- Application source configuration accepts replacements and explicit removal.
|
- Application source configuration accepts replacements and explicit removal.
|
||||||
Missing catalog feeds leave their layers unavailable without blocking startup
|
Missing catalog feeds leave their layers unavailable without blocking startup
|
||||||
or making fallback requests; malformed supplied feeds remain configuration errors.
|
or making fallback requests; malformed supplied feeds remain configuration errors.
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ visibility lifecycle before initialization. Invalid supplied methods still fail
|
|||||||
construction. `createStandaloneApplication` and `createStandaloneCatalog` accept
|
construction. `createStandaloneApplication` and `createStandaloneCatalog` accept
|
||||||
`sources` overrides; unspecified entries retain
|
`sources` overrides; unspecified entries retain
|
||||||
standalone defaults, and null entries explicitly remove a source. Street Level
|
standalone defaults, and null entries explicitly remove a source. Street Level
|
||||||
continues to accept an explicit provider list. Directions (`getRoute`) and
|
continues to accept an explicit provider list. An empty Street Level provider
|
||||||
|
list uses the same unavailable lifecycle and disabled layer toggle. Directions (`getRoute`) and
|
||||||
Recent Imagery (`searchHls`, `getThumbnail`, `getTileTemplate`) use the same source
|
Recent Imagery (`searchHls`, `getThumbnail`, `getTileTemplate`) use the same source
|
||||||
configuration boundary. Standalone selects their default adapters; layers retain
|
configuration boundary. Standalone selects their default adapters; layers retain
|
||||||
route normalization, imagery selection and rendering. Recent Imagery adapters
|
route normalization, imagery selection and rendering. Recent Imagery adapters
|
||||||
@@ -21,7 +22,10 @@ An explicit list replaces the default Mapillary provider; an empty list removes
|
|||||||
all imagery providers. Without that option, Mapillary is registered only when
|
all imagery providers. Without that option, Mapillary is registered only when
|
||||||
`sources.mapillary` is supplied. An absent source leaves Street Level registered
|
`sources.mapillary` is supplied. An absent source leaves Street Level registered
|
||||||
with a truthful no-provider state, preserving layer controls and share tokens.
|
with a truthful no-provider state, preserving layer controls and share tokens.
|
||||||
Malformed supplied sources and provider definitions still fail validation.
|
Malformed selected sources and provider definitions still fail validation.
|
||||||
|
An explicit provider list bypasses the unused Mapillary source, including its
|
||||||
|
validation. Layer share identities are preserved; custom provider switches require
|
||||||
|
a corresponding serialization contract.
|
||||||
|
|
||||||
## God's Eye View in conversations — October 2, 2026
|
## God's Eye View in conversations — October 2, 2026
|
||||||
|
|
||||||
|
|||||||
@@ -622,11 +622,17 @@ async function main() {
|
|||||||
await target.click(
|
await target.click(
|
||||||
'.panel-collapse-btn[data-collapse-target="street-level-panel"]',
|
'.panel-collapse-btn[data-collapse-target="street-level-panel"]',
|
||||||
);
|
);
|
||||||
await settle(
|
assert.ok(
|
||||||
target,
|
await settle(
|
||||||
() =>
|
target,
|
||||||
getComputedStyle(document.getElementById('sl-body')).display ===
|
() =>
|
||||||
'flex',
|
!document
|
||||||
|
.getElementById('street-level-panel')
|
||||||
|
.classList.contains('collapsed') &&
|
||||||
|
getComputedStyle(document.getElementById('sl-body')).display ===
|
||||||
|
'flex',
|
||||||
|
),
|
||||||
|
'Street Level panel did not expand before the timeout',
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
await expandStrip();
|
await expandStrip();
|
||||||
|
|||||||
@@ -5,7 +5,11 @@ import * as picking from '../../data/pickRegistry.js';
|
|||||||
import * as input from '../../data/inputOwnership.js';
|
import * as input from '../../data/inputOwnership.js';
|
||||||
import * as render from '../../renderGovernor.js';
|
import * as render from '../../renderGovernor.js';
|
||||||
|
|
||||||
/** Inject providers, or use Mapillary only when its source is supplied. */
|
/**
|
||||||
|
* Inject providers, or use Mapillary only when its source is supplied.
|
||||||
|
* An explicit provider list replaces the default; unused sources.mapillary is
|
||||||
|
* neither constructed nor validated, including when the list is empty.
|
||||||
|
*/
|
||||||
export function createApplicationStreetLevel({
|
export function createApplicationStreetLevel({
|
||||||
surface,
|
surface,
|
||||||
sources = {},
|
sources = {},
|
||||||
|
|||||||
@@ -82,3 +82,20 @@ test('standalone defaults allow exact replacements and explicit removal, and rej
|
|||||||
/Unknown source/,
|
/Unknown source/,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('empty Street Level uses the shared unavailable lifecycle without initialization', async (t) => {
|
||||||
|
const actual = catalog({}, t);
|
||||||
|
const manager = new LayerLifecycle({});
|
||||||
|
manager.register(actual.get('street-level'));
|
||||||
|
assert.equal(await manager.setEnabled('street-level', true), false);
|
||||||
|
assert.equal(manager.layers.get('street-level').initialized, false);
|
||||||
|
const row = manager.getAll()[0];
|
||||||
|
assert.equal(row.stats.status, 'unavailable');
|
||||||
|
assert.equal(row.stats.error, 'No street-level imagery providers configured');
|
||||||
|
assert.equal(await manager.setEnabled('street-level', false), true);
|
||||||
|
const configured = catalog(createStandaloneLayerSources(), t);
|
||||||
|
assert.equal(
|
||||||
|
configured.get('street-level').getSourceAvailability().available,
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
});
|
||||||
@@ -333,6 +333,16 @@ export function createStreetLevelLayer({
|
|||||||
requiresKeyId: requiresKeyIdFor(definitionsFrozen),
|
requiresKeyId: requiresKeyIdFor(definitionsFrozen),
|
||||||
/** Registered providers, in chip order. */
|
/** Registered providers, in chip order. */
|
||||||
providerIds: definitionsFrozen.map((def) => def.id),
|
providerIds: definitionsFrozen.map((def) => def.id),
|
||||||
|
getSourceAvailability() {
|
||||||
|
const available = definitionsFrozen.length > 0;
|
||||||
|
return {
|
||||||
|
available,
|
||||||
|
source: STREET_LEVEL_LAYER_ID,
|
||||||
|
reason: available
|
||||||
|
? null
|
||||||
|
: 'No street-level imagery providers configured',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
init(viewer) {
|
init(viewer) {
|
||||||
if (state.initialized)
|
if (state.initialized)
|
||||||
|
|||||||
Reference in new issue
Block a user