Skip to content

Give persistent URLs to all selectable options and configurations#54

Merged
CodyCBakerPhD merged 2 commits into
mainfrom
copilot/give-persistent-urls-to-options
Mar 22, 2026
Merged

Give persistent URLs to all selectable options and configurations#54
CodyCBakerPhD merged 2 commits into
mainfrom
copilot/give-persistent-urls-to-options

Conversation

Copilot AI commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

All UI settings were ephemeral — sharing a URL never preserved log scale, prefix, view modes, or non-default geo views. Only dandiset, cumulative, and map=dots were URL-persisted.

Changes

New helpers in plots.js:

  • setUrlParam(params, key, value, defaultValue) — writes a param only when the value is non-default, deletes it otherwise; keeps the base entry URL clean
  • syncFromUrl() — reads all URL params and updates global state + DOM elements atomically, without triggering plot reloads; replaces the piecemeal init code that was scattered through the load handler

New URL parameters:

Setting Param Written when
Log Scale log=true enabled
Prefix prefix=binary binary selected
Over-time view over_time=table table mode
Histogram view histogram=table table mode
Geo view map=dots|table|aws any non-default mode

Behavioural fixes:

  • popstate handler now calls syncFromUrl() before reloading plots, so browser back/forward correctly restores all settings
  • Geo view URL previously only persisted dots; now covers table and aws as well

Example shareable URL with all non-defaults:

?dandiset=000123&log=true&prefix=binary&over_time=table&map=aws
Original prompt

This section details on the original issue you should resolve

<issue_title>Give persistent URLs to all selectable options and configurations</issue_title>
<issue_description>To allow sharing of an exact view, e.g., one with log-scale enabled, base 2, etc.

Do not include default values in the basic URL, however, to avoid a frightening/overwhelming-looking basic entry URL </issue_description>

Comments on the Issue (you are @copilot in this section)


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

@github-actions

github-actions Bot commented Mar 22, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://dandi.github.io/access-page/pr-preview/pr-54/

Built to branch gh-pages at 2026-03-22 18:34 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

…er_time, histogram, map views)"

Co-authored-by: CodyCBakerPhD <51133164+CodyCBakerPhD@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dandi/access-page/sessions/506605e1-ba95-4b5d-b217-7b4dc9652ab8
Copilot AI changed the title [WIP] Add persistent URLs for selectable options and configurations Give persistent URLs to all selectable options and configurations Mar 22, 2026
Copilot AI requested a review from CodyCBakerPhD March 22, 2026 18:35
@CodyCBakerPhD CodyCBakerPhD marked this pull request as ready for review March 22, 2026 18:38
@CodyCBakerPhD CodyCBakerPhD merged commit 56f1e16 into main Mar 22, 2026
2 checks passed
@CodyCBakerPhD CodyCBakerPhD deleted the copilot/give-persistent-urls-to-options branch March 22, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Give persistent URLs to all selectable options and configurations

2 participants