Skip to content

Explorer: extend unified click-semantics (#226) to nearby-samples and search-results panels #227

@rdhyee

Description

@rdhyee

Background

Issue #226 unified click semantics for the map dot and samples table surfaces: click = open detail card; the external link to the source record lives inside the card, never as the default action. The fix shipped alongside the in-map detail card build.

Per Codex's review of the #226 PR, two other surfaces in explorer.qmd still render the old pattern — they emit an <a href={sourceUrl(pid)}> for the sample label and bail row-clicks on anchor targets, so clicking the title navigates externally instead of opening the card.

If we're serious about uniform click semantics, these need the same treatment.

Surfaces still inconsistent

1. Nearby-samples panel (updateSamples())

explorer.qmd lines ~1268-1271 — rendered in the side panel when a cluster is clicked.

```js
const sUrl = sourceUrl(s.pid);
h += `<div class="sample-row">
...
${sUrl ? `<a class="sample-label" href="${sUrl}" ... >${...}` : ...}
```

Click on the title → opens external. Click elsewhere → no row activation at all (this panel has no row click handler today — selecting a nearby sample requires going through some other path).

2. Search results panel

explorer.qmd around lines 3284-3303 — list of search hits. Renders `` for each hit and explicitly returns on anchor clicks in the row handler.

```js
if (e.target.tagName === 'A') return; // let label links work
```

Same bleed-through pattern as the table-row case fixed in #226.

Scope for this issue

Apply the #226 pattern uniformly:

Why a separate PR

  • The fix for the map+table surfaces in Explorer: unify click semantics — click opens detail card, external link is one-hop-away #226 was already moderately scoped; folding two more surfaces in would have inflated the diff and delayed visible progress.
  • The nearby-samples panel needs an additional design decision: it currently has no row-click handler. Activating a nearby sample is a small UX feature, not just a code refactor.
  • The search-results panel rendering lives in a different OJS cell — a clean separate PR keeps the diff comprehensible.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions