fix(street-level): four regressions from the merge review

- The selected sequence is drawn past the per-tile caps again, and its
  highlight takes every loaded part, drawn or not: in a dense tile a
  clicked Mapillary or Panoramax line kept its cones but lost its line.
- photoViewer tries :fullscreen and :popover-open one at a time, each in
  its own try: Safari before 16.4 parses neither, and the fallback threw
  on every flat KartaView or Panoramax photo.
- A lit Street View off Google 3D says it needs the Google 3D map again,
  instead of "every provider is switched off".
- Chips carry their provider colour again (--chip-color, as on main).

Each comes with the test that reproduced it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
German KhokhlovandClaude Opus 5.5 committed 2026-10-19 23:14:01 +04:00
1 parent 4e2e0d6900
commit fb777c1c93
9 files changed
+157 -17

No files matched your search

@@ -536,3 +536,38 @@ test('an <img> that turns out too large is refused and let go', async (t) => {
await assert.rejects(aborted);
assert.equal(images.at(-1).src, '', 'its download stops');
});
test('a browser without :fullscreen / :popover-open (Safari < 16.4) still opens a flat photo and hands Esc on', async () => {
let asked = 0;
const viewer = createPhotoViewer({
providerId: 'test',
name: 'Test',
sources: SOURCES,
getPhoto: async (id) => PHOTOS[id],
step: async () => null,
onStep() {},
onEscape: () => ++asked > 0,
load: async (url) => ({ src: url }),
});
const host = fakeHost();
await viewer.mount(host);
const root = host.children[0];
// Safari 16.0–16.3: neither pseudo-class parses, so closest() throws.
root.closest = (selector) => {
if (/:fullscreen|:popover-open/.test(selector))
throw new SyntaxError(`'${selector}' is not a valid selector`);
return null;
};
let failure = null;
try {
await viewer.open('f');
} catch (error) {
failure = error;
}
assert.equal(failure, null, 'opening a flat photo does not throw');
const event = { key: 'Escape' };
event.preventDefault = () => {};
event.stopPropagation = () => {};
assert.doesNotThrow(() => root.fire('keydown', event), 'Esc does not throw');
assert.equal(asked, 1, 'Esc reaches the provider');
});